Thursday, March 22, 2012
Authentication methods for connections to SQL Server in ASP Pages
but it is not working. When I run the page I receive the following error
message:
Microsoft OLE DB Service Components error '80040e21'
Multiple-step OLE DB operation generated errors. Check each OLE DB status
value, if available. No work was done.
line 35
My connection string is in a separate file: cst = "data
source=X099789\Widgets;Initial Catalog=Automotive; Integrated Security=SSPI;
"
My code snipet looks like the following:
set OBJRST = Server.CreateObject("ADODB.Recordset")
Set objComm = Server.CreateObject("ADODB.Command")
objComm.ActiveConnection = cst '****LIne 35
MotorsSQL = "usp_MotorAll"
UIPWSQL = "usp_UIPW '" & struserid &"', '"& strpassword &"';"
objConnAll.open cst
What is the correct coding to connect to the SQL Server using Windows
Authentication in an ASP page?
I have read the instructions on:
http://support.microsoft.com/default.aspx/kb/247931, made the changes,
however the page still will not work.
Kindly assist. I will be thankful.
AuntieAuntieAuntie> Microsoft OLE DB Service Components error '80040e21'
> Multiple-step OLE DB operation generated errors. Check each OLE DB status
> value, if available. No work was done.
These errors are probably because there is no 'Provider' keyword in your
OLEDB connection string. Try adding 'Provider=SQLOLEDB'.
Hope this helps.
Dan Guzman
SQL Server MVP
"AuntieAuntieAuntie" <AuntieAuntieAuntie@.discussions.microsoft.com> wrote in
message news:EE4C5259-1F64-4893-9AF1-657A1C03917B@.microsoft.com...
>I am trying to access SQL Server via an ASP page using a Trusted
>Connection,
> but it is not working. When I run the page I receive the following error
> message:
> Microsoft OLE DB Service Components error '80040e21'
> Multiple-step OLE DB operation generated errors. Check each OLE DB status
> value, if available. No work was done.
> line 35
> My connection string is in a separate file: cst = "data
> source=X099789\Widgets;Initial Catalog=Automotive; Integrated
> Security=SSPI;"
> My code snipet looks like the following:
> set OBJRST = Server.CreateObject("ADODB.Recordset")
> Set objComm = Server.CreateObject("ADODB.Command")
> objComm.ActiveConnection = cst '****LIne 35
> MotorsSQL = "usp_MotorAll"
> UIPWSQL = "usp_UIPW '" & struserid &"', '"& strpassword &"';"
> objConnAll.open cst
> What is the correct coding to connect to the SQL Server using Windows
> Authentication in an ASP page?
> I have read the instructions on:
> http://support.microsoft.com/default.aspx/kb/247931, made the changes,
> however the page still will not work.
> Kindly assist. I will be thankful.
> AuntieAuntieAuntie
>
Sunday, March 11, 2012
auditing no of connections made to the database
Hi
My application connects to 3 databases .
I need to know how many connections are made by my application to each database
There are two applications servers. Basically what i need is to know how many connection to each database from each application server.
(that is how many connections from application server 1 to database 1,2 &3 and how many connections from applications server 2 to database 1 ,2 & 3)
Can this be done ..?
How to do it ?
Please help me in regard to this
Thanks in advance.
I would have a look at SQL Profiler, with this tool you will be able to run a trace on each of the databases and then count the connections to the database.
|||Hi
Thanks for the reply.
I need to know whether is there any parameter which i can use to monitor the same.
i suppose @.@.connections gives me the number of connections made to the server and not the databases. ?
Is there any parameter in SQL 2005 which i can use to monitor.
Please help....
Thanks in advance.
|||There is no parameter that you can use, but you could tag into the performance counters on the machine, or set up a view or function to sort the activity tables in the master database... Have a look at the stored proc sp_who2.
|||In SQL Server 2000 Enterprise Manager, open Management/Current Activity/Process Info and look for the logins the app uses (under column "User") and the databases (under column Database). In this way you can identify the connections. (Each process is a connection.) "Host" column may also help, this is the name of computer the application is running on.
In SQL Server 2005 Management Studio its similar, except you open Management/Activity Monitor.
|||In SQL Server 2000, query sysprocesses (e.g., select * from sysprocesses). Use loginname or nt_username to specify the login the app uses. You may want to translate dbid to the database name, sysdatabases gives you the "name" for each "dbid".