ASP Connection String for Privileged Account

B

Bob Barrows [MVP]

Aha! Now I can see the logon credentials. Per your suggestion, I
tried to write.response my connect string, but got the same error.
Here's what I tried:

response.write demopath
So what was the result?
 
S

sucaba.r

I'm not sure the response.write worked but here's the output:

Microsoft OLE DB Provider for SQL Server error '80004005'

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
access denied.

/test3.asp, line 6
 
B

Bob Barrows [MVP]

Assign the connection string to a variable and response.write the contents
of that variable:

dim constr
constr="provider= ..."
response.write constr
response.end
dim cn
etc

I'm not sure the response.write worked but here's the output:

Microsoft OLE DB Provider for SQL Server error '80004005'

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
access denied.

/test3.asp, line 6

So what was the result?
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get
a quicker response by posting to the newsgroup.
 
S

sucaba.r

Obviously I'm doing something wrong. Here's my code:

<%
dim demopath
Set demoConn = CreateObject("ADODB.Connection")
demoPath="Provider=SQLOLEDB;" & _
"Data Source=enpefrqdb01;Integrated Security=SSPI;" & _
"Initial Catalog=qdb"
demoConn.open demoPath
response.write demopath
response.end
%>

BTW, thanks for all the help Bob.

Assign the connection string to a variable and response.write the contents
of that variable:

dim constr
constr="provider= ..."
response.write constr
response.end
dim cn
etc

I'm not sure the response.write worked but here's the output:

Microsoft OLE DB Provider for SQL Server error '80004005'

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
access denied.

/test3.asp, line 6

(e-mail address removed) wrote:
Aha! Now I can see the logon credentials. Per your suggestion, I
tried to write.response my connect string, but got the same error.
Here's what I tried:

response.write demopath

So what was the result?
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get
a quicker response by posting to the newsgroup.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
 
B

Bob Barrows [MVP]

Move the Open statement to a line that follows the response.end statment
Obviously I'm doing something wrong. Here's my code:

<%
dim demopath
Set demoConn = CreateObject("ADODB.Connection")
demoPath="Provider=SQLOLEDB;" & _
"Data Source=enpefrqdb01;Integrated Security=SSPI;" & _
"Initial Catalog=qdb"
demoConn.open demoPath
response.write demopath
response.end
%>

BTW, thanks for all the help Bob.

Assign the connection string to a variable and response.write the
contents of that variable:

dim constr
constr="provider= ..."
response.write constr
response.end
dim cn
etc

I'm not sure the response.write worked but here's the output:

Microsoft OLE DB Provider for SQL Server error '80004005'

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
access denied.

/test3.asp, line 6


Bob Barrows [MVP] wrote:
(e-mail address removed) wrote:
Aha! Now I can see the logon credentials. Per your suggestion, I
tried to write.response my connect string, but got the same error.
Here's what I tried:

response.write demopath

So what was the result?
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will
get
a quicker response by posting to the newsgroup.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so
I don't check it very often. If you must reply off-line, then remove
the "NO SPAM"
 
B

Bob Barrows [MVP]

Obviously I'm doing something wrong. Here's my code:

<%
dim demopath
Set demoConn = CreateObject("ADODB.Connection")
demoPath="Provider=SQLOLEDB;" & _
"Data Source=enpefrqdb01;Integrated Security=SSPI;" & _
"Initial Catalog=qdb"
demoConn.open demoPath
response.write demopath
response.end
%>

BTW, thanks for all the help Bob.

Ask yourself:
Which line of code is raising the error?
Then
Which line of code do I want to prevent from being executed by using
response.end?

The solution should be obvious ... :)
 
S

sucaba.r

Doh! Sorry 'bout that. Here's the output:

Provider=SQLOLEDB;Data Source=xxxx01;Integrated Security=SSPI;Initial
Catalog=qdb
Move the Open statement to a line that follows the response.end statment
Obviously I'm doing something wrong. Here's my code:

<%
dim demopath
Set demoConn = CreateObject("ADODB.Connection")
demoPath="Provider=SQLOLEDB;" & _
"Data Source=enpefrqdb01;Integrated Security=SSPI;" & _
"Initial Catalog=qdb"
demoConn.open demoPath
response.write demopath
response.end
%>

BTW, thanks for all the help Bob.

Assign the connection string to a variable and response.write the
contents of that variable:

dim constr
constr="provider= ..."
response.write constr
response.end
dim cn
etc

(e-mail address removed) wrote:
I'm not sure the response.write worked but here's the output:

Microsoft OLE DB Provider for SQL Server error '80004005'

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
access denied.

/test3.asp, line 6


Bob Barrows [MVP] wrote:
(e-mail address removed) wrote:
Aha! Now I can see the logon credentials. Per your suggestion, I
tried to write.response my connect string, but got the same error.
Here's what I tried:

response.write demopath

So what was the result?
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will
get
a quicker response by posting to the newsgroup.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so
I don't check it very often. If you must reply off-line, then remove
the "NO SPAM"

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
 
B

Bob Barrows [MVP]

Well, there's something wrong here. Your line of code is:

"Data Source=enpefrqdb01;Integrated Security=SSPI;" & _

But the result of Response.Write is:

Data Source=xxxx01;Integrated Security=SSPI


I doubt your server is really called "xxxx01" is it?



Doh! Sorry 'bout that. Here's the output:

Provider=SQLOLEDB;Data Source=xxxx01;Integrated Security=SSPI;Initial
Catalog=qdb
Move the Open statement to a line that follows the response.end
statment said:
Obviously I'm doing something wrong. Here's my code:

<%
dim demopath
Set demoConn = CreateObject("ADODB.Connection")
demoPath="Provider=SQLOLEDB;" & _
"Data Source=enpefrqdb01;Integrated Security=SSPI;" & _
"Initial Catalog=qdb"
demoConn.open demoPath
response.write demopath
response.end
%>

BTW, thanks for all the help Bob.


Bob Barrows [MVP] wrote:
Assign the connection string to a variable and response.write the
contents of that variable:

dim constr
constr="provider= ..."
response.write constr
response.end
dim cn
etc

(e-mail address removed) wrote:
I'm not sure the response.write worked but here's the output:

Microsoft OLE DB Provider for SQL Server error '80004005'

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist
or access denied.

/test3.asp, line 6


Bob Barrows [MVP] wrote:
(e-mail address removed) wrote:
Aha! Now I can see the logon credentials. Per your
suggestion, I tried to write.response my connect string, but
got the same error. Here's what I tried:

response.write demopath

So what was the result?
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my
From header is my spam trap, so I don't check it very often. You
will get
a quicker response by posting to the newsgroup.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap
so I don't check it very often. If you must reply off-line, then
remove the "NO SPAM"

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so
I don't check it very often. If you must reply off-line, then remove
the "NO SPAM"
 
S

sucaba.r

No, I just x'd out the server name.
Well, there's something wrong here. Your line of code is:

"Data Source=enpefrqdb01;Integrated Security=SSPI;" & _

But the result of Response.Write is:

Data Source=xxxx01;Integrated Security=SSPI


I doubt your server is really called "xxxx01" is it?



Doh! Sorry 'bout that. Here's the output:

Provider=SQLOLEDB;Data Source=xxxx01;Integrated Security=SSPI;Initial
Catalog=qdb
Move the Open statement to a line that follows the response.end
statment (e-mail address removed) wrote:
Obviously I'm doing something wrong. Here's my code:

<%
dim demopath
Set demoConn = CreateObject("ADODB.Connection")
demoPath="Provider=SQLOLEDB;" & _
"Data Source=enpefrqdb01;Integrated Security=SSPI;" & _
"Initial Catalog=qdb"
demoConn.open demoPath
response.write demopath
response.end
%>

BTW, thanks for all the help Bob.


Bob Barrows [MVP] wrote:
Assign the connection string to a variable and response.write the
contents of that variable:

dim constr
constr="provider= ..."
response.write constr
response.end
dim cn
etc

(e-mail address removed) wrote:
I'm not sure the response.write worked but here's the output:

Microsoft OLE DB Provider for SQL Server error '80004005'

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist
or access denied.

/test3.asp, line 6


Bob Barrows [MVP] wrote:
(e-mail address removed) wrote:
Aha! Now I can see the logon credentials. Per your
suggestion, I tried to write.response my connect string, but
got the same error. Here's what I tried:

response.write demopath

So what was the result?
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my
From header is my spam trap, so I don't check it very often. You
will get
a quicker response by posting to the newsgroup.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap
so I don't check it very often. If you must reply off-line, then
remove the "NO SPAM"

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so
I don't check it very often. If you must reply off-line, then remove
the "NO SPAM"

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
 
B

Bob Barrows [MVP]

In that case, the information in the aspfaq article I cited earlier is
relevant. Make sure to read the KB articles it links to.

Let us know how you make out.

No, I just x'd out the server name.
Well, there's something wrong here. Your line of code is:

"Data Source=enpefrqdb01;Integrated Security=SSPI;" & _

But the result of Response.Write is:

Data Source=xxxx01;Integrated Security=SSPI


I doubt your server is really called "xxxx01" is it?



Doh! Sorry 'bout that. Here's the output:

Provider=SQLOLEDB;Data Source=xxxx01;Integrated
Security=SSPI;Initial Catalog=qdb

Bob Barrows [MVP] wrote:
Move the Open statement to a line that follows the response.end
statment (e-mail address removed) wrote:
Obviously I'm doing something wrong. Here's my code:

<%
dim demopath
Set demoConn = CreateObject("ADODB.Connection")
demoPath="Provider=SQLOLEDB;" & _
"Data Source=enpefrqdb01;Integrated Security=SSPI;" & _
"Initial Catalog=qdb"
demoConn.open demoPath
response.write demopath
response.end
%>

BTW, thanks for all the help Bob.


Bob Barrows [MVP] wrote:
Assign the connection string to a variable and response.write the
contents of that variable:

dim constr
constr="provider= ..."
response.write constr
response.end
dim cn
etc

(e-mail address removed) wrote:
I'm not sure the response.write worked but here's the output:

Microsoft OLE DB Provider for SQL Server error '80004005'

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist
or access denied.

/test3.asp, line 6


Bob Barrows [MVP] wrote:
(e-mail address removed) wrote:
Aha! Now I can see the logon credentials. Per your
suggestion, I tried to write.response my connect string, but
got the same error. Here's what I tried:

response.write demopath
 
S

sucaba.r

Well I moved response.end after democonn.open, but still getting the
error. Obvious? Not to me...obviously! :)
 
B

Bob Barrows [MVP]

This was in response to your previous post about not getting the
response.write to work ...
Nothing to do with your ADO error
 
B

Bob Barrows [MVP]

I don't know, there are a few KB articles cited in that article as I
remember it. Any one of them could be relevant to your problem. I cannot
tell which one because I am not sitting at the keyboard of your server
looking at its configuration settings. IOW, you are going to have to sort
this out yourself using the information I've provided.

Oh wait, one last thing. Is your web server W2003? Are you using SQL 2000?
Is it up-to-date with its service packs? SQL 2000 SP4 fixed a problem with
connections from W2003 servers.

That's it. There is nothing more I can offer.
 
S

sucaba.r

Thanks for all the help Bob. I do appreciate it.
I don't know, there are a few KB articles cited in that article as I
remember it. Any one of them could be relevant to your problem. I cannot
tell which one because I am not sitting at the keyboard of your server
looking at its configuration settings. IOW, you are going to have to sort
this out yourself using the information I've provided.

Oh wait, one last thing. Is your web server W2003? Are you using SQL 2000?
Is it up-to-date with its service packs? SQL 2000 SP4 fixed a problem with
connections from W2003 servers.

That's it. There is nothing more I can offer.


--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
 
S

sucaba.r

One more question. Is there a relationship between the ODBC System DSN
login on the IIs server, and the SQL server I'm trying to connect to?
In other words, are the login credentials on the IIs server being used,
or the SQL server? Or both?
 
B

Bob Barrows [MVP]

One more question. Is there a relationship between the ODBC System
DSN login on the IIs server, and the SQL server I'm trying to connect
to? In other words, are the login credentials on the IIs server being
used, or the SQL server? Or both?

You are using SQLOLEDB, which is the OLE DB Provider for SQL Server, not
ODBC. Totally different and separate technology.
 
B

Bob Barrows [MVP]

:)
I think that's what I said, but yes, that is correct.

Again ... you are not having a login problem (which would result in an error
containing the words "login failed".). You are having a "SQL Server does not
exist or access denied" problem, which is a completely different thing.

There are two stages in establishing a connection to a database server:
1. Finding it on the network and verifying that you can communicate with it
2. Providing login credentials

Step 1 is the one that is failing for you. As to why you are having this
problem, I could not say without going through the troubleshooting steps
described in the KB articles linked to from the aspfaq article.

http://support.microsoft.com/default.aspx/kb/328306
 
S

sucaba.r

Got it. Just thought the "access denied" part of the error might be
pointing to a credential problem. I'll stop...for real. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top