Sunday, March 25, 2012
Cluster Name Failing...
Unfortunately running MSCS on Win2k Adv Server so most of the help mentioned
is towards Win2k3...Any luck guys...?
Event ID: 1052 and 1069
TIA
CLuster name failing is a Cluster service issue, not SQL, yes?
SQL Name failing is different.
What to the application and system event logs say?
Kevin Hill
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.expertsrt.com - not your average tech Q&A site
"Vai2000" <nospam@.microsoft.com> wrote in message
news:%23MuguCnMGHA.500@.TK2MSFTNGP15.phx.gbl...
> Hi All, Cluster Group is failing to come online due to cluster name.
> Unfortunately running MSCS on Win2k Adv Server so most of the help
> mentioned
> is towards Win2k3...Any luck guys...?
> Event ID: 1052 and 1069
> TIA
>
Cluster installation & Domain Group requirements...
Why does a cluster install of SQL2005 require access to a domain group and what is the purpose of having to create a domain group for the cluster installation? Other than the blurb mentioned in BOL I'm having a hard time finding any information out about this requirement.
From BOL: How to create a failover cluster.
Section 18: On the Domain Groups for Clustered Services page, provide a DomainName\GroupName for each clustered service being installed: the SQL Server service, SQL Server Agent service, Analysis Services service, and Full-Text Search service must run as domain accounts that are members of the built-in administrators group on each node of the cluster. To proceed, click Next. For more information, see Domain Groups for Clustered Services.
The purpose for domain groups in cluster installation is security consideration. As SQL Server service accounts in a local group can be changed or removed after SQL Server 2005 is installed. Then the security setting like ACL will be lost. That is why domain group\account is introduced.
|||Ok, that's kind of what I thought it was for.
Is there any way to change the group after installation? Can I just move the account to another group and be done with it? Or is there somewhere (in SQL Server) that I need to update the group if we desire to change groups?
sqlsqlCluster install...domain group.
As part of the cluster install a domain group is required now.
My question is, can I remove this group after the install or change the group without affecting the server?
No, you cannot. All permissions - i.e. file system, registry, sql, etc. - are assigned to the group now in SQL 2005 rather than the user. This is to allow better control over the appropriate service accounts at the domain level, plus ease the case where you want to change service accounts for your server.
Thursday, March 22, 2012
Cluster Group and SQL Question
running on one node of the cluster. This cluster only has one group on it
and want to install SQL 2005. Would it install into this group? Is it
possible to have more than one group on one device? I was able to get DTC
working so I was thinking I could install SQL.
thanks
Yes, you can install SQL Server 2005 into that cluster. However, the SQL
Server requires its own disk resources that are not shared with anything
else. You can't configure a disk device into multiple groups.
Mike
http://www.solidqualitylearning.com
Disclaimer: This communication is an original work and represents my sole
views on the subject. It does not represent the views of any other person
or entity either by inference or direct reference.
"Roger" <roger@.nospam.com> wrote in message
news:%23T7iPR$JGHA.668@.TK2MSFTNGP11.phx.gbl...
> We have a cluster that has been running for a couple of years. It has
> MSDE running on one node of the cluster. This cluster only has one group
> on it and want to install SQL 2005. Would it install into this group?
> Is it possible to have more than one group on one device? I was able to
> get DTC working so I was thinking I could install SQL.
> thanks
>
>
|||Would I have to rebuild the cluster to get another disk device if everything
is allocated now? It was not known at the time when the cluster was built
that we were going to install SQL.
thanks
"Michael Hotek" <mike@.solidqualitylearning.com> wrote in message
news:ecxJngBKGHA.3728@.tk2msftngp13.phx.gbl...
> Yes, you can install SQL Server 2005 into that cluster. However, the SQL
> Server requires its own disk resources that are not shared with anything
> else. You can't configure a disk device into multiple groups.
> --
> Mike
> http://www.solidqualitylearning.com
> Disclaimer: This communication is an original work and represents my sole
> views on the subject. It does not represent the views of any other person
> or entity either by inference or direct reference.
>
> "Roger" <roger@.nospam.com> wrote in message
> news:%23T7iPR$JGHA.668@.TK2MSFTNGP11.phx.gbl...
>
|||No, the cluster doesn't need to be rebuilt. You just have to add the disk
resource into the cluster before you can use it with the failover cluster
instance.
Mike
http://www.solidqualitylearning.com
Disclaimer: This communication is an original work and represents my sole
views on the subject. It does not represent the views of any other person
or entity either by inference or direct reference.
"Roger" <roger@.nospam.com> wrote in message
news:%236s%23kwLKGHA.1288@.TK2MSFTNGP09.phx.gbl...
> Would I have to rebuild the cluster to get another disk device if
> everything is allocated now? It was not known at the time when the
> cluster was built that we were going to install SQL.
> thanks
> "Michael Hotek" <mike@.solidqualitylearning.com> wrote in message
> news:ecxJngBKGHA.3728@.tk2msftngp13.phx.gbl...
>
|||Where would I get the disk resource from? I know if I add more disks I can
use that. I have 60 gig free on what I currenly have and I was thinking to
delete and redo the partitions to get what I would need for SQL.
thanks again for your help.
"Michael Hotek" <mike@.solidqualitylearning.com> wrote in message
news:uA7unAvKGHA.3912@.TK2MSFTNGP10.phx.gbl...
> No, the cluster doesn't need to be rebuilt. You just have to add the disk
> resource into the cluster before you can use it with the failover cluster
> instance.
> --
> Mike
> http://www.solidqualitylearning.com
> Disclaimer: This communication is an original work and represents my sole
> views on the subject. It does not represent the views of any other person
> or entity either by inference or direct reference.
>
> "Roger" <roger@.nospam.com> wrote in message
> news:%236s%23kwLKGHA.1288@.TK2MSFTNGP09.phx.gbl...
>
Tuesday, March 20, 2012
Cluster does not restart SQL group after network failure
We have just rebuilt a SQL 7.0/NT cluster with Windows 2003/SQL2000 in an
active/passive configuration using 2 nodes. During the course of testing it
we had a general network failure in which the network was unavailable. The
virtual SQL and Windows IP address resources went down and did not come up
automatically once the network was available again. The nodes are configured
for automatic failback.
I can't imagine that in the 2 1/2 years the original cluster was running
that we never once had the network go down, but I do know that during that
time I never had a outage where I had to manually move the cluster group
(which causes the cluster to re-initialize both resources and brings
everything back to normal).
I'm thinking that maybe I'm missing a dependency somewhere or something's
changed between NT and 2003 that I'm not accounting for. Anyone seen this or
have any tips? Thanks in advance!
-Dan
Nope, that is pretty much expected behavior. The cluster manager will try
and restart the resources on each possible node until the retry count is
exhausted. Unfortunately, until the network resource is restored, no node
has the ability to run the SQL group. With the physical network port
offline, the IP address(es) will not come online. Nothing dependant on them
will come online, including the Network Name and the SQL Server. If the
network comes back before the retry timeout and count is exhausted, the
cluster will bring the system online. Otherwise it stays down.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"Dan" <Dan@.discussions.microsoft.com> wrote in message
news:74592016-0B61-4834-8C28-1AD1B864B688@.microsoft.com...
> All,
> We have just rebuilt a SQL 7.0/NT cluster with Windows 2003/SQL2000 in
an
> active/passive configuration using 2 nodes. During the course of testing
it
> we had a general network failure in which the network was unavailable.
The
> virtual SQL and Windows IP address resources went down and did not come up
> automatically once the network was available again. The nodes are
configured
> for automatic failback.
> I can't imagine that in the 2 1/2 years the original cluster was running
> that we never once had the network go down, but I do know that during that
> time I never had a outage where I had to manually move the cluster group
> (which causes the cluster to re-initialize both resources and brings
> everything back to normal).
> I'm thinking that maybe I'm missing a dependency somewhere or something's
> changed between NT and 2003 that I'm not accounting for. Anyone seen this
or
> have any tips? Thanks in advance!
> -Dan
|||Geoff,
Thanks for the post! I guess I'll just have to make sure the retry &
timeout are set high.
"Geoff N. Hiten" wrote:
> Nope, that is pretty much expected behavior. The cluster manager will try
> and restart the resources on each possible node until the retry count is
> exhausted. Unfortunately, until the network resource is restored, no node
> has the ability to run the SQL group. With the physical network port
> offline, the IP address(es) will not come online. Nothing dependant on them
> will come online, including the Network Name and the SQL Server. If the
> network comes back before the retry timeout and count is exhausted, the
> cluster will bring the system online. Otherwise it stays down.
> --
> Geoff N. Hiten
> Microsoft SQL Server MVP
> Senior Database Administrator
> Careerbuilder.com
> I support the Professional Association for SQL Server
> www.sqlpass.org
> "Dan" <Dan@.discussions.microsoft.com> wrote in message
> news:74592016-0B61-4834-8C28-1AD1B864B688@.microsoft.com...
> an
> it
> The
> configured
> or
>
>
|||Be careful adjusting those numbers. TOo high can cause just as many
problems as too low. Given the frequency of the network outage and the fact
that something like that will NEVER go unnoticed, I would not change
anything. The cluster failover is designed to reduce the typical 30-45
minute human reponse time for a down server. You shouldn't expect the
clustering software do deal with anything beyond that scope. Adjusting the
parameters to try and expand that coverage will only expose a gap somewhere
else. Just document a cluster check as part of your network failure
recovery procedure and you will be fine.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"Dan" <Dan@.discussions.microsoft.com> wrote in message
news:34AB2749-41BF-4A68-8E55-04AEAAE75C38@.microsoft.com...[vbcol=seagreen]
> Geoff,
> Thanks for the post! I guess I'll just have to make sure the retry &
> timeout are set high.
> "Geoff N. Hiten" wrote:
try[vbcol=seagreen]
node[vbcol=seagreen]
them[vbcol=seagreen]
in[vbcol=seagreen]
testing[vbcol=seagreen]
come up[vbcol=seagreen]
running[vbcol=seagreen]
that[vbcol=seagreen]
group[vbcol=seagreen]
something's[vbcol=seagreen]
this[vbcol=seagreen]
cluster discrimination scores
Dear all here:
I have a question about the cluster mining result.
In the discrimination tab shows the different between group 1 and group 2.
I just wonder how to calculate the discremination scores.
Do any expertise can answer the question?
Regards!
Jerry
This is calculated with statistical method. We assume each cluster constitutes a Gaussian/Multinomial distribution on a continuous/discrete attribute. The parameters of these distributions are then calculated for each cluster. For each specific attribute value, we can then evaluate its probability by combining the cluster distributions, the given attribute value (all other attribute are set to unknown). The discrimination score for each attribute value is calculated based on the above probability. Anyway, the math formulas used to calculate the final scores are very complicated and undocumented yet. So I won’t go into every detail here.
Thanks,
Yimin Wu, SQL Server Data Mining
Monday, March 19, 2012
Clueless ... SBA and ACCESS
Hello,
Hopefully I'm near the right discussion group.
I'm trying to get started with integrating some of my manufacturing company's ACCESS databases with Microsoft's Small Business Accounting (SBA). The SDK for SBA provides plenty of VB code one I get past a certain point.
Can ACCESS be used as a front end for SBA?
Can anyone offer a sample .mdb with code that logs in to the db and adds a new customer (for example)?
TIA
rick
Definitely not the right group, Rick, as Access/VBA can not directly use ADO.NET. I don't know much about SBA, but I took a quick look, and on my system SBA stores its data in a SQL Server instance called ServerName\MICROSOFTSMLBIZ. You should, as far as I know, be able to connect to it from Access using any of the standard methods commonly used to connect to any SQL Server database, e.g. ADP, ODBC-linked tables, or programmatically via ADO 'classic' or DAO. If you haven't already done so, try asking in a forum dealing with Access ADPs or Access and ODBC. -- Brendan Reynolds Access MVP> Hello, >
> Hopefully I'm near the right discussion group. >
> I'm trying to get started with integrating some of my manufacturing
> company's ACCESS databases with Microsoft's Small Business Accounting
> (SBA). The SDK for SBA provides plenty of VB code one I get past a
> certain point. >
> Can ACCESS be used as a front end for SBA? >
> Can anyone offer a sample .mdb with code that logs in to the db and adds
> a new customer (for example)? >
> TIA > > >
> rick >
>
Sunday, March 11, 2012
CLR Stored Procedure "Failed to get permission to execute"
This is variant/continuation of a problem I've discussed on the
sqlserver.programming group (Thanks to Erland for a lot of help over there).
I thought it might benefit me to raise the issue here as well.
In a nutshell:
I have a C# stored procedure (called SProc, in cs.dll, but "imported" as
"csfn") that uses PInvoke to access a function in a C++ dll (called
cpp.dll). The function is __declspec(dllexport)'d. If the C++ dll is
UNMANAGED this now seems to work OK. (Thank again to Erland helping me get
this far). Now, if I add some managed code to the C++ dll (leaving the
unmanaged entry point unchanged, but now compiling with /clr) I get a
"Failed to get permisssion to execute" message as below.
I've tried all the obvious (to me anyway) ways of adding the appropriate
permissions. I've used the "Trust Assembly" node of the .Net 2.0
Configuration tool to give "Full Trust" to both cs.dll AND cpp.dll but it
still fails. I've confirmed that I can call the C++ dll from a c# EXE from
the command line, and that works OK.
I'd really appreciate any help.
/john
Error text follows.
Msg 6522, Level 16, State 1, Procedure csfn, Line 0
A .NET Framework error occurred during execution of user defined routine or
aggregate 'csfn':
System.IO.FileLoadException: Could not load file or assembly 'cpp,
Version=11.0.1.0, Culture=neutral, PublicKeyToken=eb5ebc232de94dcf' or one
of its dependencies. Failed to grant permission to execute. (Exception from
HRESULT: 0x80131418) --> System.Security.Policy.PolicyException: Execution
permission cannot be acquired.
System.Security.Policy.PolicyException:
at System.Security.SecurityManager.ResolvePolicy(Evidence evidence,
PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset,
PermissionSet& denied, Boolean checkExecutionPermission)
at System.Security.SecurityManager.ResolvePolicy(Evidence evidence,
PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset,
PermissionSet& denied, Int32& securitySpecialFlags, Boolean
checkExecutionPermission)
System.IO.FileLoadException:
at DotNetFun.SqlServer.SProc.CPPTest()
at DotNetFun.SqlServer.SProc.CPPTest()
at DotNetFun.SqlServer.SProc.PrintMessage(String Message)
.Hello Eric,
The consensus is (I think), that you can use pInvoke to call an
unmanaged DLL from a managed stored procedure. However, it looks like
calling a MIXED (ie managed and unmanaged) DLL is not going to work. You can
look at the thread I started on the sqlserver.programming group for more
information.
It seems that mixed and/or managed DLLs need to be added to SQL with
CREATE ASSEMBLY, and this fails on a mixed dll, even if set it as UNSAFE.
I'd like to establish if that is expected to work, but I suspect it is
failing for good reason.
/john
"Eric" wrote in message news:200762618736eric_hackett@.kindermorg
an.com...
> Did you find any satisfaction for this? I have a nearly identical problem.
> Using a third party dll, wrapping it with my own dll, and then writing CLR
> stored proc to use wrapped function. Other functions in the stored proc
> dll work. Only the ones that need external resources are choking.
> Please reply here if you get this working.
> EggHeadCafe.com - .NET Developer Portal of Choice
> http://www.eggheadcafe.com
Saturday, February 25, 2012
Close cursor in another procedure (part II)
Hi David,
I have a lot of reasons to using cursor and I don't know better way to do
this.
For example;
I control datas in the cursor like this:
----
CREATE TRIGGER MY_TRIGGER ON dbo.MY_TABLE FOR INSERT
...
DECLARE MyCursor CURSOR LOCAL FAST_FORWARD FOR SELECT MyField FROM INSERTED
OPEN MyCursor
FETCH NEXT FROM MyCursor INTO @.MyVariable
WHILE @.@.FETCH_STATUS = 0
BEGIN
...
SELECT @.BLABLA = BLABLA FROM BLABLA
IF @.MyVariable < @.BLABLA THEN
BEGIN
RAISEERROR(...)
..
END
IF @.@.ERROR <> 0
BEGIN
EXEC MY_ERROR_SP
RETURN
END
...
END
...
----
And this is insert script: "INSERT INTO TableA(...) SELECT ... FROM xxx"
Better idea?CREATE TRIGGER MY_TRIGGER ON dbo.MY_TABLE FOR INSERT
AS
IF EXISTS
(SELECT *
FROM blabla AS B
JOIN Inserted AS I
ON I.myfield < B.blabla
WHERE ... /* ' unspecified */)
BEGIN
EXEC my_error_sp
RAISERROR ...
END
GO
David Portas
SQL Server MVP
--|||Thanks David,
Let me ask last question.
I have a log system like this:
CREATE TRIGGER MY_TRIGGER ON dbo.MY_TABLE FOR INSERT
DECLARE @.RESULT BIGINT
DECLARE @.TABLE_NAME VARCHAR(128)
DECLARE @.OBJ_ID INT
SELECT @.OBJ_ID = parent_obj FROM sysobjects WHERE id = @.@.PROCID
SELECT @.TABLE_NAME = OBJECT_NAME(@.OBJ_ID)
DECLARE MyCursor CURSOR LOCAL FAST_FORWARD FOR SELECT MyField FROM INSERTED
OPEN MyCursor
FETCH NEXT FROM MyCursor INTO @.TABLE_NAME, @.MyVariable
WHILE @.@.FETCH_STATUS = 0
BEGIN
EXEC @.RESULT = SpLog @.TABLE_NAME, @.MyVariable
//if log inserted successful then do other operations else rollback and
exit
IF @.RESULT = -1
BEGIN
IF @.@.TRANCOUNT > 0
ROLLBACK
CLOSE MyCursor
DEALLOCATE MyCursor
RETURN
END
DoSomething
IF @.@.ERROR <> 0
BEGIN
EXEC MY_ERROR_SP
RETURN
END
END
--
DECLARE PROCEDURE SpLog (@.TABLE_NAME varchar(128), ID int)
...
INSERT INTO LOG_TABLE (TABLE_NAME, ID, OPERATION_DATE) values (...)
IF @.@.ERROR <> 0
RETURN -1
...
--
How can I do without any cursor?|||See if this helps:
How do I audit changes to SQL Server data?
http://www.aspfaq.com/show.asp?id=2448
AMB
"Tod" wrote:
> Thanks David,
> Let me ask last question.
> I have a log system like this:
> --
> CREATE TRIGGER MY_TRIGGER ON dbo.MY_TABLE FOR INSERT
> DECLARE @.RESULT BIGINT
> DECLARE @.TABLE_NAME VARCHAR(128)
> DECLARE @.OBJ_ID INT
> SELECT @.OBJ_ID = parent_obj FROM sysobjects WHERE id = @.@.PROCID
> SELECT @.TABLE_NAME = OBJECT_NAME(@.OBJ_ID)
> DECLARE MyCursor CURSOR LOCAL FAST_FORWARD FOR SELECT MyField FROM INSERTE
D
> OPEN MyCursor
> FETCH NEXT FROM MyCursor INTO @.TABLE_NAME, @.MyVariable
> WHILE @.@.FETCH_STATUS = 0
> BEGIN
> EXEC @.RESULT = SpLog @.TABLE_NAME, @.MyVariable
> //if log inserted successful then do other operations else rollback and
> exit
> IF @.RESULT = -1
> BEGIN
> IF @.@.TRANCOUNT > 0
> ROLLBACK
> CLOSE MyCursor
> DEALLOCATE MyCursor
> RETURN
> END
> DoSomething
> IF @.@.ERROR <> 0
> BEGIN
> EXEC MY_ERROR_SP
> RETURN
> END
> END
> --
> DECLARE PROCEDURE SpLog (@.TABLE_NAME varchar(128), ID int)
> ...
> INSERT INTO LOG_TABLE (TABLE_NAME, ID, OPERATION_DATE) values (...)
> IF @.@.ERROR <> 0
> RETURN -1
> ...
> --
> How can I do without any cursor?
>
>|||The problem here is that you apparently want to call an SP for each row
in the INSERT. In itself, that is a weak concept for writing modular
data-manipulation code. You should aim to write set-based stored procs
that operate on SETS of data rather than one row at a time (except for
code supporting the UI where you often want to support single row
updates). Everything you want still can be possible without a cursor
but you may need to adjust the logic of your SpLog code. Since you
haven't told us what it does, I can't show you how to do it.
Also, note that if you need common code in triggers you can generate
the code semi-automatically from the metadata which reduces the need
for code re-use through procs. In general you want to minimize calling
other procs from a trigger.
David Portas
SQL Server MVP
--
Friday, February 24, 2012
Client Web Browser & Remote SQL Script Error?
I know that this is a long shot, but I have a problem which someone
reading this group *may* just be able to shed some light on.
We have a new internal personnel planner/attendance system in place. It
uses a web interface to allow members of staff to select their site
location for any week, request leave and record absences.
The server-side scripting is composed of VB/ASP and Javascript which
ultimately queries & writes to an MS SQL Server 2000 database via an
ODBC connection between webserver (IIS6.0).
Here is the problem and I *know* that it sounds unlikely/impossible but
we carried out exhaustive tests.
-> I open a web browser on my local PC (XP Pro SP2)
-> Login to the web-based planning system
-> Update information
-> Submit Changes
At this point I get a script error:
--error message--
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax
near ')'.
/staff/wfp/Whereabouts/writeAbsence_v2_5.asp, line 108
------
Which is fair enough as it probably points to a problem with the SQL
statement being passed by the .asp page.
***BUT*** I _only_ get this message when I access the page via a browser
from certain PCs!
I have tried 3 browsers: MSIE6, Firefox1.5, Opera8.5.
I have obviously ensured that it isn't any kind of browser caching issue.
I have no issues using scripted-based web pages in general from the PC
in question.
I have checked the regional settings to ensure that I am using a
standard character set.
I *can* submit database changes via web browsers from most other PCs on
our network, without incurring the error message.
Even when I get the error message, the values are written to the db and
the information is updated.
The other PCs from which I am experiencing the same difficulty are
servers running Win2000 & Win2003 respectively.
Is there any kind of OS/User Profile setting which would mean that
scripts running on a remote webserver would fall over when trying to
perform an SQL write?
Could it be some kind of character encoding issue, which means that the
parameters that are received by the .asp script and then written via the
SQL statement are mangled in any way?
I can't see that there is any kind of local setting that would influence
whether remote scripts would or would not cause an error such as this.
If anyone has any ideas, has encountered anything similar or can shed
light on a system-specific setting or feature that may cause this,
please post your thoughts.
Yours Gratefully
GuyIf the server-side code path is identical, I suggest you focus on the client
browser settings. My guess is that you have client-side script that doesn't
execute under certain configurations so data isn't posted back as expected.
This causes your server-side script to generate an invalid SQL statement
like 'INSERT INTO MyTable VALUES()' and results in the error you describe.
There are other clues in your post that you aren't following Best Practices
so you might want to revisit the items below.
Rather than ODBC, consider using the OLE DB provider directly. For Windows
Authentication:
Provider=SQLOLEDB;Data Source=MyServer;Initial Catalog=MyDatabase;Integrated
Security=SSPI"
For SQL Authentication:
Provider=SQLOLEDB;Data Source=MyServer;Initial Catalog=MyDatabase;User
Id=MyLogin;Password=myPassword1"
Consider using parameterized SQL Statements rather than build SQL statement
strings. This is more secure, provides better performance and eliminates
the need to double-up embedded quotes and format dates. For example:
myCommand.CommandText = "INSERT INTO MyTable VALUES(?)"
Set myIntegerParameter = myCommand.CreateParameter( _
"@.MyIntegerParameter", 3, 1)
myCommand.Parameters.Append myIntegerParameter
myIntegerParameter.Value = Request("UserValue")
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Guy Debord" <laugh@.life.org> wrote in message
news:tyDIf.45673$Rw6.23215@.newsfe7-gui.ntli.net...
> Hello all,
> I know that this is a long shot, but I have a problem which someone
> reading this group *may* just be able to shed some light on.
> We have a new internal personnel planner/attendance system in place. It
> uses a web interface to allow members of staff to select their site
> location for any week, request leave and record absences.
> The server-side scripting is composed of VB/ASP and Javascript which
> ultimately queries & writes to an MS SQL Server 2000 database via an
> ODBC connection between webserver (IIS6.0).
> Here is the problem and I *know* that it sounds unlikely/impossible but
> we carried out exhaustive tests.
> -> I open a web browser on my local PC (XP Pro SP2)
> -> Login to the web-based planning system
> -> Update information
> -> Submit Changes
> At this point I get a script error:
> --error message--
> Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
> [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax
> near ')'.
> /staff/wfp/Whereabouts/writeAbsence_v2_5.asp, line 108
> ------
> Which is fair enough as it probably points to a problem with the SQL
> statement being passed by the .asp page.
> ***BUT*** I _only_ get this message when I access the page via a browser
> from certain PCs!
> I have tried 3 browsers: MSIE6, Firefox1.5, Opera8.5.
> I have obviously ensured that it isn't any kind of browser caching issue.
> I have no issues using scripted-based web pages in general from the PC
> in question.
> I have checked the regional settings to ensure that I am using a
> standard character set.
> I *can* submit database changes via web browsers from most other PCs on
> our network, without incurring the error message.
> Even when I get the error message, the values are written to the db and
> the information is updated.
> The other PCs from which I am experiencing the same difficulty are
> servers running Win2000 & Win2003 respectively.
> Is there any kind of OS/User Profile setting which would mean that
> scripts running on a remote webserver would fall over when trying to
> perform an SQL write?
> Could it be some kind of character encoding issue, which means that the
> parameters that are received by the .asp script and then written via the
> SQL statement are mangled in any way?
> I can't see that there is any kind of local setting that would influence
> whether remote scripts would or would not cause an error such as this.
> If anyone has any ideas, has encountered anything similar or can shed
> light on a system-specific setting or feature that may cause this,
> please post your thoughts.
> Yours Gratefully
> Guy|||Dan,
Thanks for taking the time to offer up your suggestions.
Using parameterized SQL statements looks like it may well help to
eliminate some of the errors which are easy to make using lengthy
statement strings.
Thanks for the tip.
The OLE DB versus ODBC issue is one that I have one that I will address.
As for the the client-side script suggestion, I'll dig deep and let you
know if I can find any likely suspects.
Thanks again,
Guy|||Guy Debord (laugh@.life.org) writes:
> At this point I get a script error:
> --error message--
> Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
> [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax
> near ')'.
> /staff/wfp/Whereabouts/writeAbsence_v2_5.asp, line 108
I've seen plenty of those pages on the web!
> ***BUT*** I _only_ get this message when I access the page via a browser
> from certain PCs!
Well, rather than looking at the PCs, look at the SQL instead. Set up a
trace with Profiler, and see what is being sent to SQL Server. Include
the error events and StmtStarting.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx