467,075 Members | 930 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,075 developers. It's quick & easy.

SQL open error

I reinstalled SQL 2000 server after reformatting my drive.
Now I cannot open a database in my C## program as before.
If I use "Provider=SQLOLEDB;Data Source=localhost; Initial
Catalog=master;Integrated Security=SSPI"; I
get an Invalid login error. If I use "Provider=SQLOLEDB;
Data Source=localhost; Initial Catalog=master;User
ID=Dave;Password=midn1te"; I get the following error, "User
no associated with a trusted SQL server connection." What
did I do wrong on my installation? Anyone know what these
errors mean? I sure can't find the answers in the Help.
Dave
Jul 21 '05 #1
  • viewed: 1970
Share:
5 Replies
CT
Have you checked that the user account used for running your application can
still access the SQL Server database? It seems that SQL Server
authentication is disabled and only Windows authentication is enabled, which
makes sense from a security perspective. However, that means the second
connection string you present, won't work.

--
Carsten Thomsen
Enterprise Development with VS .NET, UML, and MSF
http://www.apress.com/book/bookDisplay.html?bID=105
"Dave" <an*******@discussions.microsoft.com> wrote in message
news:08****************************@phx.gbl...
I reinstalled SQL 2000 server after reformatting my drive.
Now I cannot open a database in my C## program as before.
If I use "Provider=SQLOLEDB;Data Source=localhost; Initial
Catalog=master;Integrated Security=SSPI"; I
get an Invalid login error. If I use "Provider=SQLOLEDB;
Data Source=localhost; Initial Catalog=master;User
ID=Dave;Password=midn1te"; I get the following error, "User
no associated with a trusted SQL server connection." What
did I do wrong on my installation? Anyone know what these
errors mean? I sure can't find the answers in the Help.
Dave

Jul 21 '05 #2
Carsten;
Thanks for your reply. I can access the SQL server
database thru the SQL Server Enterprise Manager. I don't
understand why the first connection string doesn't work in
my program. I tried to change the Server registration to
include SQL Server authentication in Enterprise Manager but
it keeps telling me that my user name is not associated
with a trusted SQL server connection, the same message I
get programmtically. How do I get my Windows ID to become
associated with a trusted SQL server connection?
Dave
-----Original Message-----
Have you checked that the user account used for running your application canstill access the SQL Server database? It seems that SQL Serverauthentication is disabled and only Windows authentication is enabled, whichmakes sense from a security perspective. However, that means the secondconnection string you present, won't work.

--
Carsten Thomsen
Enterprise Development with VS .NET, UML, and MSF
http://www.apress.com/book/bookDisplay.html?bID=105
"Dave" <an*******@discussions.microsoft.com> wrote in message
news:08****************************@phx.gbl...
I reinstalled SQL 2000 server after reformatting my drive.
Now I cannot open a database in my C## program as before.
If I use "Provider=SQLOLEDB;Data Source=localhost; Initial
Catalog=master;Integrated Security=SSPI"; I
get an Invalid login error. If I use "Provider=SQLOLEDB;
Data Source=localhost; Initial Catalog=master;User
ID=Dave;Password=midn1te"; I get the following error, "User
no associated with a trusted SQL server connection." What
did I do wrong on my installation? Anyone know what these
errors mean? I sure can't find the answers in the Help.
Dave

.

Jul 21 '05 #3
CT
You must use the user ID and password you used when you reinstalled SQL
Server. What user account id the MSSQLServer Windows service running under?
If not LocalSystem, perhaps that might help you (provided you know the
password of course ;-)).

--
Carsten Thomsen
Enterprise Development with VS .NET, UML, and MSF
http://www.apress.com/book/bookDisplay.html?bID=105
<an*******@discussions.microsoft.com> wrote in message
news:09****************************@phx.gbl...
Carsten;
Thanks for your reply. I can access the SQL server
database thru the SQL Server Enterprise Manager. I don't
understand why the first connection string doesn't work in
my program. I tried to change the Server registration to
include SQL Server authentication in Enterprise Manager but
it keeps telling me that my user name is not associated
with a trusted SQL server connection, the same message I
get programmtically. How do I get my Windows ID to become
associated with a trusted SQL server connection?
Dave
-----Original Message-----
Have you checked that the user account used for running

your application can
still access the SQL Server database? It seems that SQL

Server
authentication is disabled and only Windows authentication

is enabled, which
makes sense from a security perspective. However, that

means the second
connection string you present, won't work.

--
Carsten Thomsen
Enterprise Development with VS .NET, UML, and MSF
http://www.apress.com/book/bookDisplay.html?bID=105
"Dave" <an*******@discussions.microsoft.com> wrote in message
news:08****************************@phx.gbl...
I reinstalled SQL 2000 server after reformatting my drive.
Now I cannot open a database in my C## program as before.
If I use "Provider=SQLOLEDB;Data Source=localhost; Initial
Catalog=master;Integrated Security=SSPI"; I
get an Invalid login error. If I use "Provider=SQLOLEDB;
Data Source=localhost; Initial Catalog=master;User
ID=Dave;Password=midn1te"; I get the following error, "User
no associated with a trusted SQL server connection." What
did I do wrong on my installation? Anyone know what these
errors mean? I sure can't find the answers in the Help.
Dave

.

Jul 21 '05 #4
I wish to use Windows authentication rather than supplying
a password like I used to using Integrated Security=SSPI in
my connection string. What do I need to do to get it to
accept that string? I am the systemes administrator on my
box and have no need for passwords. The name of my server
in Enterprise Manager reads as (LOCAL) (Windows NT).
However, it refers to the server as XP when I do the
install which is the name of my computer. Is that
appropriate? If I use Integrated Security=SSPI and Data
Source=localhost in my connection string I get the error
"SQL server does not exist or access denied". If I use
Data Source=XP I get the error "Login failed for user
'XP\\ASPNET'. What options need I take when re-installing
the SQL server in order to use Integrated Security=SSPI in
my connection string?
Dave
-----Original Message-----
You must use the user ID and password you used when you reinstalled SQLServer. What user account id the MSSQLServer Windows service running under?If not LocalSystem, perhaps that might help you (provided you know thepassword of course ;-)).

--
Carsten Thomsen
Enterprise Development with VS .NET, UML, and MSF
http://www.apress.com/book/bookDisplay.html?bID=105
<an*******@discussions.microsoft.com> wrote in message
news:09****************************@phx.gbl...
Carsten;
Thanks for your reply. I can access the SQL server
database thru the SQL Server Enterprise Manager. I don't
understand why the first connection string doesn't work in
my program. I tried to change the Server registration to
include SQL Server authentication in Enterprise Manager but
it keeps telling me that my user name is not associated
with a trusted SQL server connection, the same message I
get programmtically. How do I get my Windows ID to become
associated with a trusted SQL server connection?
Dave
-----Original Message-----
Have you checked that the user account used for running

your application can
still access the SQL Server database? It seems that SQL

Server
authentication is disabled and only Windows authentication

is enabled, which
makes sense from a security perspective. However, that

means the second
connection string you present, won't work.

--
Carsten Thomsen
Enterprise Development with VS .NET, UML, and MSF
http://www.apress.com/book/bookDisplay.html?bID=105
"Dave" <an*******@discussions.microsoft.com> wrote in messagenews:08****************************@phx.gbl.. .
I reinstalled SQL 2000 server after reformatting my drive.
Now I cannot open a database in my C## program as before.
If I use "Provider=SQLOLEDB;Data Source=localhost; Initial
Catalog=master;Integrated Security=SSPI"; I
get an Invalid login error. If I use "Provider=SQLOLEDB;
Data Source=localhost; Initial Catalog=master;User
ID=Dave;Password=midn1te"; I get the following error, "User no associated with a trusted SQL server connection." What
did I do wrong on my installation? Anyone know what these
errors mean? I sure can't find the answers in the Help.
Dave
.

.

Jul 21 '05 #5
CT
Ah, and ASP.NET application. You then need to implement impersonation or
allow the XP\ASPNET user account to access your database. The XP\ASPNET is
used by the ASP.NET worker process, which in turn means for running your
ASP.NET application.

--
Carsten Thomsen
Enterprise Development with VS .NET, UML, and MSF
http://www.apress.com/book/bookDisplay.html?bID=105
<an*******@discussions.microsoft.com> wrote in message
news:09****************************@phx.gbl...
I wish to use Windows authentication rather than supplying
a password like I used to using Integrated Security=SSPI in
my connection string. What do I need to do to get it to
accept that string? I am the systemes administrator on my
box and have no need for passwords. The name of my server
in Enterprise Manager reads as (LOCAL) (Windows NT).
However, it refers to the server as XP when I do the
install which is the name of my computer. Is that
appropriate? If I use Integrated Security=SSPI and Data
Source=localhost in my connection string I get the error
"SQL server does not exist or access denied". If I use
Data Source=XP I get the error "Login failed for user
'XP\\ASPNET'. What options need I take when re-installing
the SQL server in order to use Integrated Security=SSPI in
my connection string?
Dave
-----Original Message-----
You must use the user ID and password you used when you

reinstalled SQL
Server. What user account id the MSSQLServer Windows

service running under?
If not LocalSystem, perhaps that might help you (provided

you know the
password of course ;-)).

--
Carsten Thomsen
Enterprise Development with VS .NET, UML, and MSF
http://www.apress.com/book/bookDisplay.html?bID=105
<an*******@discussions.microsoft.com> wrote in message
news:09****************************@phx.gbl...
Carsten;
Thanks for your reply. I can access the SQL server
database thru the SQL Server Enterprise Manager. I don't
understand why the first connection string doesn't work in
my program. I tried to change the Server registration to
include SQL Server authentication in Enterprise Manager but
it keeps telling me that my user name is not associated
with a trusted SQL server connection, the same message I
get programmtically. How do I get my Windows ID to become
associated with a trusted SQL server connection?
Dave
-----Original Message-----
Have you checked that the user account used for running
your application can
still access the SQL Server database? It seems that SQL
Server
authentication is disabled and only Windows authentication
is enabled, which
makes sense from a security perspective. However, that
means the second
connection string you present, won't work.

--
Carsten Thomsen
Enterprise Development with VS .NET, UML, and MSF
http://www.apress.com/book/bookDisplay.html?bID=105
"Dave" <an*******@discussions.microsoft.com> wrote in messagenews:08****************************@phx.gbl. ..
>I reinstalled SQL 2000 server after reformatting my drive.
> Now I cannot open a database in my C## program as before.
> If I use "Provider=SQLOLEDB;Data Source=localhost; Initial
> Catalog=master;Integrated Security=SSPI"; I
> get an Invalid login error. If I use "Provider=SQLOLEDB;
> Data Source=localhost; Initial Catalog=master;User
> ID=Dave;Password=midn1te"; I get the following error, "User> no associated with a trusted SQL server connection." What
> did I do wrong on my installation? Anyone know what these
> errors mean? I sure can't find the answers in the Help.
> Dave
.

.

Jul 21 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Corepaul | last post: by
6 posts views Thread by Tim Cowan | last post: by
6 posts views Thread by aomighty@gmail.com | last post: by
12 posts views Thread by Steve | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.