Showing posts with label connection. Show all posts
Showing posts with label connection. Show all posts

Friday, March 30, 2012

long time to establish a connection

When I login using QA to my SQL Server database, it takes 15-20 seconds
to establish a connection and open a query window. Drilling into a
database via Enterprise Manager is similar. Once the connection is
established, the server runs plenty fast however.

Can someone tell me why it could take a long time for a connection to
be established?

This behavior occurs when I am local on the box.

Thanks,
John(john.livermore@.inginix.com) writes:
> When I login using QA to my SQL Server database, it takes 15-20 seconds
> to establish a connection and open a query window. Drilling into a
> database via Enterprise Manager is similar. Once the connection is
> established, the server runs plenty fast however.
> Can someone tell me why it could take a long time for a connection to
> be established?
> This behavior occurs when I am local on the box.

One thing to check for is the autoclose on databases. You should be
able to investigate this with sp_helpdb.

Another thing that I have seen is that if I have a QA window open, stop
SQL Server and restart, connections after this takes a long time. Apparently
something is happening to shared memory. Needless to say, these problems
goes away after a reboot.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Wednesday, March 28, 2012

Long running open connections badly leak memory

Hi,
I wrote a batch import process that uses connection pooling, i.e. the
connections are never closed until the process is finished. I am writing
large chunks of data (byte[]) into the database, and I made absolutely
sure that my application does not hold any references to the byte[]
objects. However, the process increasingly consumes memory until an
OutOfMemoryError, and I tracked it down to the Microsoft JDBC driver
still holding references to the byte[] objects. The workaround is to
clear the pool "from time to time", closing its connections. When I do
that, the memory is properly reclaimed by the GC.
This "from time to time" involves some unsatisfying heuristics, though
(apart from the inconvenience of having to find the pool and access it).
If the driver is doing any caching on purpose, it should be documented
somewhere, and it should be configurable. My guess is that it's not on
purpose, though. I can't see much sense in holding on to written data
after a transaction is finished.
In case any driver developer should be interested, using a profiling
tool I found references from the following driver classes to a byte[]
object that should normally be reclaimed by the GC:
com.microsoft.jdbc.sqlserver.SQLServerPacketizingD ataConsumer and
com.microsoft.jdbc.sqlserver.tds.TDSConnection
Regards,
Jrg.
Joerg von Frantzius wrote:
> Hi,
> I wrote a batch import process that uses connection pooling, i.e. the

> connections are never closed until the process is finished. I am
writing
> large chunks of data (byte[]) into the database, and I made
absolutely
> sure that my application does not hold any references to the byte[]
> objects. However, the process increasingly consumes memory until an
> OutOfMemoryError, and I tracked it down to the Microsoft JDBC driver
> still holding references to the byte[] objects. The workaround is to
> clear the pool "from time to time", closing its connections. When I
do
> that, the memory is properly reclaimed by the GC.
> This "from time to time" involves some unsatisfying heuristics,
though
> (apart from the inconvenience of having to find the pool and access
it).
> If the driver is doing any caching on purpose, it should be
documented
> somewhere, and it should be configurable. My guess is that it's not
on
> purpose, though. I can't see much sense in holding on to written data

> after a transaction is finished.
> In case any driver developer should be interested, using a profiling
> tool I found references from the following driver classes to a byte[]

> object that should normally be reclaimed by the GC:
> com.microsoft.jdbc.sqlserver.SQLServerPacketizingD ataConsumer and
> com.microsoft.jdbc.sqlserver.tds.TDSConnection
The MS driver does indeed do a lot of unnecessary caching (such as
caching the whole ResultSet in direct mode), but I don't think this is
your problem here.
You are closing all JDBC resources (i.e. connections, statements and
result sets), aren't you? Even if SQLExceptions are thrown...
Alin,
The jTDS Project.
|||Alin Sinpalean schrieb:

>The MS driver does indeed do a lot of unnecessary caching (such as
>caching the whole ResultSet in direct mode), but I don't think this is
>your problem here.
>You are closing all JDBC resources (i.e. connections, statements and
>result sets), aren't you? Even if SQLExceptions are thrown...
>Alin,
>The jTDS Project.
>
When I close the connections, memory is reclaimed properly. What I
wanted to say is that memory is eaten up indefinitely as long as the
connection *remains open* and is used to repeatedly write large chunks
of data into the DB.
|||Joerg von Frantzius wrote:
> When I close the connections, memory is reclaimed properly. What I
> wanted to say is that memory is eaten up indefinitely as long as the
> connection *remains open* and is used to repeatedly write large
chunks
> of data into the DB.
I understand that. What I meant to say is "are you sure you are
explicitly closing ALL Statements and ResultSets when you're done with
them?". Leaving them open could and will cause the effects you now see.
Alin.
|||<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Alin Sinpalean schrieb:
<blockquote
cite="mid1109058703.898619.117040@.f14g2000cwb.goog legroups.com"
type="cite">
<pre wrap="">Joerg von Frantzius wrote:
</pre>
<blockquote type="cite">
<pre wrap="">When I close the connections, memory is reclaimed properly. What I
wanted to say is that memory is eaten up indefinitely as long as the
connection *remains open* and is used to repeatedly write large
</pre>
</blockquote>
<pre wrap=""><!-->chunks
</pre>
<blockquote type="cite">
<pre wrap="">of data into the DB.
</pre>
</blockquote>
<pre wrap=""><!-->
I understand that. What I meant to say is "are you sure you are
explicitly closing ALL Statements and ResultSets when you're done with
them?". Leaving them open could and will cause the effects you now see.
Alin.
</pre>
</blockquote>
Alright, now I got the point about the Statements and ResultSets,
sorry. To be honest, I can't be absolutely sure about that, because I'm
relying on a JDO implementation to take care of it.<br>
</body>
</html>
|||Joerg von Frantzius wrote:
> Alright, now I got the point about the Statements and ResultSets,
sorry.
> To be honest, I can't be absolutely sure about that, because I'm
relying
> on a JDO implementation to take care of it.
You could try jTDS (disclaimer: I'm a jTDS developer). I'm not saying
it will definitely make the problem disappear, but at least I will be
able to help more.
Alin.

Monday, March 19, 2012

Logon failed for user '(null)'..... error

We are receiving the error "Logon failed for
user '(null)'. Reason: Not associated with a trusted SQL
Server Connection".
We have a WinForms application written in VB.NET 2003 and
connect to a SQL Server 2000 (SP3) DB with the following
connection string:
gstrConn = _
"Server=SQL2000;" & _
"DataBase=dbname;" & _
"Integrated Security=SSPI;"
The application works perfectly for the users on one
network domain, but the error listed above appears when
trying to access the DB application from a user's
workstation on another domain. The user has a SQL Server
account. We have even tried to have the user run the DB
application in a smart client "trusted assembly"
environment but also get the error. What must be
configured differently and how?
A poor state employee-
Jeromeprevious message: "The application works perfectly for the users on one
network domain, but the error listed above appears when
trying to access the DB application from a user's
workstation on another domain. The user has a SQL Server
account. "
To make a Trusted connection the domains need to have a Trust between them.
The users need to be defined as either a domain user or from a domain
group.
If the user has a SQL Server account, then you are not using Integrated
Security. This is SQL Security. If you want to use SQL Security then you
need to change your connection string. If you want to keep the connection
string as is, then make sure the clients in the other domain can make a
Trusted Connection to SQL. Add the users from the other domain in SQL
Enterprise Manager.
Then, either load the SQL client tools on one of the workstations & test
connections from Query Analyser or try creating a sample ODBC DSN and
request Windows Authentication.
Read this information and it will make more sense.
http://www.microsoft.com/technet/tr...chnet/prodtechn
ol/sql/maintain/security/sp3sec/default.asp
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.|||Thanks Cheif!
Unfortunately, I am not the network or SQL Server
Administrator but I am passing the information on to the
LAN/SQL Administrator. Hopefully, they will know how to
set up the trust between the domains since they are all
within our same division.
My connection string is fine for using Windows
Authentication right?
Also- All users no matter what domain they are on should
be able to access the DB if the domains are trusted, right?
(and the users have SQL Server IDs)
Sorry- I am LAN ignorant and overwhelmed at present trying
to get a grip on VB.NET. (Some finger pointing going own
here but we are civil and friendly).
Ailing in Alabama
Jrome
Merry Christmas from Dixie!
quote:

>--Original Message--
>previous message: "The application works perfectly for

the users on one
quote:

>network domain, but the error listed above appears when
>trying to access the DB application from a user's
>workstation on another domain. The user has a SQL Server
>account. "
>To make a Trusted connection the domains need to have a

Trust between them.
quote:

> The users need to be defined as either a domain user or

from a domain
quote:

>group.
>If the user has a SQL Server account, then you are not

using Integrated
quote:

>Security. This is SQL Security. If you want to use SQL

Security then you
quote:

>need to change your connection string. If you want to

keep the connection
quote:

>string as is, then make sure the clients in the other

domain can make a
quote:

>Trusted Connection to SQL. Add the users from the other

domain in SQL
quote:

>Enterprise Manager.
>Then, either load the SQL client tools on one of the

workstations & test
quote:

>connections from Query Analyser or try creating a sample

ODBC DSN and
quote:

>request Windows Authentication.
>
>Read this information and it will make more sense.
>http://www.microsoft.com/technet/treeview/default.asp?

url=/technet/prodtechn
quote:

>ol/sql/maintain/security/sp3sec/default.asp
>
>Thanks,
>Kevin McDonnell
>Microsoft Corporation
>This posting is provided AS IS with no warranties, and

confers no rights.
quote:

>
>.
>
|||Previous post questions:
My connection string is fine for using Windows
Authentication right?
-- Yes.
Also- All users no matter what domain they are on should
be able to access the DB if the domains are trusted, right?
-- Yes. They should have SQL logins defined by NT users or groups.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.

Friday, March 9, 2012

Login/connection problem

I have installed SQL Server 2000 SP3a on an XP machine and running in
mixed mode. I log on using a local user name belonging to the
Administrators group.
When I attempt to connect to the DB through .Net with the following
string:
Data Source=(local);Initial Catalog=Cat;User ID=user;Password=pwd" or
Data Source=(local);Initial Catalog=Cat;UID=user;PWD=pwd"
I receive the following error:
Login failed for user '(null)'. Reason: Not associated with a trusted
SQL Server connection.
However, I can login using osql -Uuser and password pwd.
What am I missing here? I am desperate!
TIA, Larzeb
Hello Larzeb,
It seems that SQL client network protocals are not enabled properly. I
suggest that you run
%windir%\SYSTEM32\cliconfg.exe
and enable TCP/IP and named pipes protocals.
Also, please run server network utility to enable the same protocals:
%programfiles%\Microsoft SQL Server\80\Tools\Binn\svrnetcn.exe
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
This posting is provided "AS IS" with no warranties, and confers no rights.
| ath: nntpswitch.com
| From: larzeb <larzeb@.community.nospam>
| Newsgroups: microsoft.public.sqlserver.server
| Subject: Login/connection problem
| Date: Tue, 01 Feb 2005 14:25:15 -0800
| Message-ID: <0300011rd2bceg4lile10275tvhgbvm9ko@.4ax.com>
| X-Newsreader: Forte Agent 2.0/32.652
| MIME-Version: 1.0
| Content-Type: text/plain; charset=us-ascii
| Content-Transfer-Encoding: 7bit
| Organization: We
| Lines: 20
| NNTP-Posting-Host: 216.251.47.166
| X-Trace: 1107296715 reader1.on.meganewsservers.com 2181
216.251.47.166:52402
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFT NGP08.phx.gbl!newsfeed00.s
ul.t-online.de!t-online.de!news.glorb.com!feeder2.on.meganewsserver s.com!tex
tfeed1.on.meganewsservers.com!meganewsservers.com! reader1.on.meganewsservers
.com!reader1.on.meganewsservers.com!not-for-mail
| Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.server:376551
| X-Tomcat-NG: microsoft.public.sqlserver.server
|
| I have installed SQL Server 2000 SP3a on an XP machine and running in
| mixed mode. I log on using a local user name belonging to the
| Administrators group.
|
| When I attempt to connect to the DB through .Net with the following
| string:
|
| Data Source=(local);Initial Catalog=Cat;User ID=user;Password=pwd" or
| Data Source=(local);Initial Catalog=Cat;UID=user;PWD=pwd"
|
| I receive the following error:
|
| Login failed for user '(null)'. Reason: Not associated with a trusted
| SQL Server connection.
|
| However, I can login using osql -Uuser and password pwd.
|
| What am I missing here? I am desperate!
|
| TIA, Larzeb
|
|||Peter,
Both protocols where already set in both the client and server
utilities. Any other ideas?
Larzeb
On Wed, 02 Feb 2005 06:36:42 GMT, petery@.online.microsoft.com (Peter
Yang [MSFT]) wrote:

>Hello Larzeb,
>It seems that SQL client network protocals are not enabled properly. I
>suggest that you run
>%windir%\SYSTEM32\cliconfg.exe
>and enable TCP/IP and named pipes protocals.
>Also, please run server network utility to enable the same protocals:
>%programfiles%\Microsoft SQL Server\80\Tools\Binn\svrnetcn.exe
>Best Regards,
>Peter Yang
>MCSE2000/2003, MCSA, MCDBA
>Microsoft Online Partner Support
>When responding to posts, please "Reply to Group" via your newsreader so
>that others may learn and benefit from your issue.
>This posting is provided "AS IS" with no warranties, and confers no rights.
>
>--
>| ath: nntpswitch.com
>| From: larzeb <larzeb@.community.nospam>
>| Newsgroups: microsoft.public.sqlserver.server
>| Subject: Login/connection problem
>| Date: Tue, 01 Feb 2005 14:25:15 -0800
>| Message-ID: <0300011rd2bceg4lile10275tvhgbvm9ko@.4ax.com>
>| X-Newsreader: Forte Agent 2.0/32.652
>| MIME-Version: 1.0
>| Content-Type: text/plain; charset=us-ascii
>| Content-Transfer-Encoding: 7bit
>| Organization: We
>| Lines: 20
>| NNTP-Posting-Host: 216.251.47.166
>| X-Trace: 1107296715 reader1.on.meganewsservers.com 2181
>216.251.47.166:52402
>| Path:
>cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSF TNGP08.phx.gbl!newsfeed00.s
>ul.t-online.de!t-online.de!news.glorb.com!feeder2.on.meganewsserver s.com!tex
>tfeed1.on.meganewsservers.com!meganewsservers.com !reader1.on.meganewsservers
>.com!reader1.on.meganewsservers.com!not-for-mail
>| Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.server:376551
>| X-Tomcat-NG: microsoft.public.sqlserver.server
>|
>| I have installed SQL Server 2000 SP3a on an XP machine and running in
>| mixed mode. I log on using a local user name belonging to the
>| Administrators group.
>|
>| When I attempt to connect to the DB through .Net with the following
>| string:
>|
>| Data Source=(local);Initial Catalog=Cat;User ID=user;Password=pwd" or
>| Data Source=(local);Initial Catalog=Cat;UID=user;PWD=pwd"
>|
>| I receive the following error:
>|
>| Login failed for user '(null)'. Reason: Not associated with a trusted
>| SQL Server connection.
>|
>| However, I can login using osql -Uuser and password pwd.
>|
>| What am I missing here? I am desperate!
>|
>| TIA, Larzeb
>|
|||Hello Larzeb,
Did you use ASP.net? If so, please check if you encountered the following
issue:
324479 FIX: ASP.NET SQL Server Session State Impersonation Is Lost Under
Load
http://support.microsoft.com/?id=324479
Actually, the error message is most likely caused by Windows
authentication. Could you double check if the error is caused by the
ADO.net call with the sql authention connection string?
Thanks & Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
| ath: nntpswitch.com
| From: larzeb <larzeb@.community.nospam>
| Newsgroups: microsoft.public.sqlserver.server
| Subject: Re: Login/connection problem
| Date: Wed, 02 Feb 2005 09:07:45 -0800
| Message-ID: <652201ph3q6pe86ntu562ms8p05ml68hia@.4ax.com>
| References: <0300011rd2bceg4lile10275tvhgbvm9ko@.4ax.com>
<BtuQRGPCFHA.768@.cpmsftngxa10.phx.gbl>
| X-Newsreader: Forte Agent 2.0/32.652
| MIME-Version: 1.0
| Content-Type: text/plain; charset=us-ascii
| Content-Transfer-Encoding: 7bit
| Organization: We
| Lines: 80
| NNTP-Posting-Host: 216.251.47.166
| X-Trace: 1107364054 reader1.on.meganewsservers.com 2179
216.251.47.166:59658
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFT NGP08.phx.gbl!newsfeed00.s
ul.t-online.de!t-online.de!news.glorb.com!feeder2.on.meganewsserver s.com!meg
anewsservers.com!reader1.on.meganewsservers.com!re ader1.on.meganewsservers.c
om!not-for-mail
| Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.server:376672
| X-Tomcat-NG: microsoft.public.sqlserver.server
|
| Peter,
|
| Both protocols where already set in both the client and server
| utilities. Any other ideas?
|
| Larzeb
| On Wed, 02 Feb 2005 06:36:42 GMT, petery@.online.microsoft.com (Peter
| Yang [MSFT]) wrote:
|
| >Hello Larzeb,
| >
| >It seems that SQL client network protocals are not enabled properly. I
| >suggest that you run
| >
| >%windir%\SYSTEM32\cliconfg.exe
| >
| >and enable TCP/IP and named pipes protocals.
| >
| >Also, please run server network utility to enable the same protocals:
| >
| >%programfiles%\Microsoft SQL Server\80\Tools\Binn\svrnetcn.exe
| >
| >Best Regards,
| >
| >Peter Yang
| >MCSE2000/2003, MCSA, MCDBA
| >Microsoft Online Partner Support
| >
| >When responding to posts, please "Reply to Group" via your newsreader so
| >that others may learn and benefit from your issue.
| >
| >This posting is provided "AS IS" with no warranties, and confers no
rights.
| >
| >
| >--
| >| ath: nntpswitch.com
| >| From: larzeb <larzeb@.community.nospam>
| >| Newsgroups: microsoft.public.sqlserver.server
| >| Subject: Login/connection problem
| >| Date: Tue, 01 Feb 2005 14:25:15 -0800
| >| Message-ID: <0300011rd2bceg4lile10275tvhgbvm9ko@.4ax.com>
| >| X-Newsreader: Forte Agent 2.0/32.652
| >| MIME-Version: 1.0
| >| Content-Type: text/plain; charset=us-ascii
| >| Content-Transfer-Encoding: 7bit
| >| Organization: We
| >| Lines: 20
| >| NNTP-Posting-Host: 216.251.47.166
| >| X-Trace: 1107296715 reader1.on.meganewsservers.com 2181
| >216.251.47.166:52402
| >| Path:
|
>cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSF TNGP08.phx.gbl!newsfeed00.
s
|
>ul.t-online.de!t-online.de!news.glorb.com!feeder2.on.meganewsserver s.com!te
x
|
>tfeed1.on.meganewsservers.com!meganewsservers.com !reader1.on.meganewsserver
s
| >.com!reader1.on.meganewsservers.com!not-for-mail
| >| Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.server:376551
| >| X-Tomcat-NG: microsoft.public.sqlserver.server
| >|
| >| I have installed SQL Server 2000 SP3a on an XP machine and running in
| >| mixed mode. I log on using a local user name belonging to the
| >| Administrators group.
| >|
| >| When I attempt to connect to the DB through .Net with the following
| >| string:
| >|
| >| Data Source=(local);Initial Catalog=Cat;User ID=user;Password=pwd" or
| >| Data Source=(local);Initial Catalog=Cat;UID=user;PWD=pwd"
| >|
| >| I receive the following error:
| >|
| >| Login failed for user '(null)'. Reason: Not associated with a trusted
| >| SQL Server connection.
| >|
| >| However, I can login using osql -Uuser and password pwd.
| >|
| >| What am I missing here? I am desperate!
| >|
| >| TIA, Larzeb
| >|
|
|
|||The error message is telling you that, although you passed SQL Server
authentication credentials, the DBMS is actually attempting Integrated
Security=SSPI, that is, Windows Authentication. You should check to make
sure your network account has been granted SQL Server login access or force
SQL Server, and your connection string, to use SQL Server logins.
Sincerely,
Anthony Thomas

"Peter Yang [MSFT]" <petery@.online.microsoft.com> wrote in message
news:cbDBaKZCFHA.644@.cpmsftngxa10.phx.gbl...
Hello Larzeb,
Did you use ASP.net? If so, please check if you encountered the following
issue:
324479 FIX: ASP.NET SQL Server Session State Impersonation Is Lost Under
Load
http://support.microsoft.com/?id=324479
Actually, the error message is most likely caused by Windows
authentication. Could you double check if the error is caused by the
ADO.net call with the sql authention connection string?
Thanks & Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
| ath: nntpswitch.com
| From: larzeb <larzeb@.community.nospam>
| Newsgroups: microsoft.public.sqlserver.server
| Subject: Re: Login/connection problem
| Date: Wed, 02 Feb 2005 09:07:45 -0800
| Message-ID: <652201ph3q6pe86ntu562ms8p05ml68hia@.4ax.com>
| References: <0300011rd2bceg4lile10275tvhgbvm9ko@.4ax.com>
<BtuQRGPCFHA.768@.cpmsftngxa10.phx.gbl>
| X-Newsreader: Forte Agent 2.0/32.652
| MIME-Version: 1.0
| Content-Type: text/plain; charset=us-ascii
| Content-Transfer-Encoding: 7bit
| Organization: We
| Lines: 80
| NNTP-Posting-Host: 216.251.47.166
| X-Trace: 1107364054 reader1.on.meganewsservers.com 2179
216.251.47.166:59658
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFT NGP08.phx.gbl!newsfeed00.s
ul.t-online.de!t-online.de!news.glorb.com!feeder2.on.meganewsserver s.com!meg
anewsservers.com!reader1.on.meganewsservers.com!re ader1.on.meganewsservers.c
om!not-for-mail
| Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.server:376672
| X-Tomcat-NG: microsoft.public.sqlserver.server
|
| Peter,
|
| Both protocols where already set in both the client and server
| utilities. Any other ideas?
|
| Larzeb
| On Wed, 02 Feb 2005 06:36:42 GMT, petery@.online.microsoft.com (Peter
| Yang [MSFT]) wrote:
|
| >Hello Larzeb,
| >
| >It seems that SQL client network protocals are not enabled properly. I
| >suggest that you run
| >
| >%windir%\SYSTEM32\cliconfg.exe
| >
| >and enable TCP/IP and named pipes protocals.
| >
| >Also, please run server network utility to enable the same protocals:
| >
| >%programfiles%\Microsoft SQL Server\80\Tools\Binn\svrnetcn.exe
| >
| >Best Regards,
| >
| >Peter Yang
| >MCSE2000/2003, MCSA, MCDBA
| >Microsoft Online Partner Support
| >
| >When responding to posts, please "Reply to Group" via your newsreader so
| >that others may learn and benefit from your issue.
| >
| >This posting is provided "AS IS" with no warranties, and confers no
rights.
| >
| >
| >--
| >| ath: nntpswitch.com
| >| From: larzeb <larzeb@.community.nospam>
| >| Newsgroups: microsoft.public.sqlserver.server
| >| Subject: Login/connection problem
| >| Date: Tue, 01 Feb 2005 14:25:15 -0800
| >| Message-ID: <0300011rd2bceg4lile10275tvhgbvm9ko@.4ax.com>
| >| X-Newsreader: Forte Agent 2.0/32.652
| >| MIME-Version: 1.0
| >| Content-Type: text/plain; charset=us-ascii
| >| Content-Transfer-Encoding: 7bit
| >| Organization: We
| >| Lines: 20
| >| NNTP-Posting-Host: 216.251.47.166
| >| X-Trace: 1107296715 reader1.on.meganewsservers.com 2181
| >216.251.47.166:52402
| >| Path:
|
>cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSF TNGP08.phx.gbl!newsfeed00.
s
|
>ul.t-online.de!t-online.de!news.glorb.com!feeder2.on.meganewsserver s.com!te
x
|
>tfeed1.on.meganewsservers.com!meganewsservers.com !reader1.on.meganewsserver
s
| >.com!reader1.on.meganewsservers.com!not-for-mail
| >| Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.server:376551
| >| X-Tomcat-NG: microsoft.public.sqlserver.server
| >|
| >| I have installed SQL Server 2000 SP3a on an XP machine and running in
| >| mixed mode. I log on using a local user name belonging to the
| >| Administrators group.
| >|
| >| When I attempt to connect to the DB through .Net with the following
| >| string:
| >|
| >| Data Source=(local);Initial Catalog=Cat;User ID=user;Password=pwd" or
| >| Data Source=(local);Initial Catalog=Cat;UID=user;PWD=pwd"
| >|
| >| I receive the following error:
| >|
| >| Login failed for user '(null)'. Reason: Not associated with a trusted
| >| SQL Server connection.
| >|
| >| However, I can login using osql -Uuser and password pwd.
| >|
| >| What am I missing here? I am desperate!
| >|
| >| TIA, Larzeb
| >|
|
|

Login/connection problem

I have installed SQL Server 2000 SP3a on an XP machine and running in
mixed mode. I log on using a local user name belonging to the
Administrators group.
When I attempt to connect to the DB through .Net with the following
string:
Data Source=(local);Initial Catalog=Cat;User ID=user;Password=pwd" or
Data Source=(local);Initial Catalog=Cat;UID=user;PWD=pwd"
I receive the following error:
Login failed for user '(null)'. Reason: Not associated with a trusted
SQL Server connection.
However, I can login using osql -Uuser and password pwd.
What am I missing here? I am desperate!
TIA, LarzebHello Larzeb,
It seems that SQL client network protocals are not enabled properly. I
suggest that you run
%windir%\SYSTEM32\cliconfg.exe
and enable TCP/IP and named pipes protocals.
Also, please run server network utility to enable the same protocals:
%programfiles%\Microsoft SQL Server\80\Tools\Binn\svrnetcn.exe
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
This posting is provided "AS IS" with no warranties, and confers no rights.
| ath: nntpswitch.com
| From: larzeb <larzeb@.community.nospam>
| Newsgroups: microsoft.public.sqlserver.server
| Subject: Login/connection problem
| Date: Tue, 01 Feb 2005 14:25:15 -0800
| Message-ID: <0300011rd2bceg4lile10275tvhgbvm9ko@.4ax.com>
| X-Newsreader: Forte Agent 2.0/32.652
| MIME-Version: 1.0
| Content-Type: text/plain; charset=us-ascii
| Content-Transfer-Encoding: 7bit
| Organization: We
| Lines: 20
| NNTP-Posting-Host: 216.251.47.166
| X-Trace: 1107296715 reader1.on.meganewsservers.com 2181
216.251.47.166:52402
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.s
ul.t-online.de!t-online.de!news.glorb.com!feeder2.on.meganewsservers.com!tex
tfeed1.on.meganewsservers.com!meganewsservers.com!reader1.on.meganewsservers
.com!reader1.on.meganewsservers.com!not-for-mail
| Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.server:376551
| X-Tomcat-NG: microsoft.public.sqlserver.server
|
| I have installed SQL Server 2000 SP3a on an XP machine and running in
| mixed mode. I log on using a local user name belonging to the
| Administrators group.
|
| When I attempt to connect to the DB through .Net with the following
| string:
|
| Data Source=(local);Initial Catalog=Cat;User ID=user;Password=pwd" or
| Data Source=(local);Initial Catalog=Cat;UID=user;PWD=pwd"
|
| I receive the following error:
|
| Login failed for user '(null)'. Reason: Not associated with a trusted
| SQL Server connection.
|
| However, I can login using osql -Uuser and password pwd.
|
| What am I missing here? I am desperate!
|
| TIA, Larzeb
||||Peter,
Both protocols where already set in both the client and server
utilities. Any other ideas?
Larzeb
On Wed, 02 Feb 2005 06:36:42 GMT, petery@.online.microsoft.com (Peter
Yang [MSFT]) wrote:

>Hello Larzeb,
>It seems that SQL client network protocals are not enabled properly. I
>suggest that you run
>%windir%\SYSTEM32\cliconfg.exe
>and enable TCP/IP and named pipes protocals.
>Also, please run server network utility to enable the same protocals:
>%programfiles%\Microsoft SQL Server\80\Tools\Binn\svrnetcn.exe
>Best Regards,
>Peter Yang
>MCSE2000/2003, MCSA, MCDBA
>Microsoft Online Partner Support
>When responding to posts, please "Reply to Group" via your newsreader so
>that others may learn and benefit from your issue.
>This posting is provided "AS IS" with no warranties, and confers no rights.
>
>--
>| ath: nntpswitch.com
>| From: larzeb <larzeb@.community.nospam>
>| Newsgroups: microsoft.public.sqlserver.server
>| Subject: Login/connection problem
>| Date: Tue, 01 Feb 2005 14:25:15 -0800
>| Message-ID: <0300011rd2bceg4lile10275tvhgbvm9ko@.4ax.com>
>| X-Newsreader: Forte Agent 2.0/32.652
>| MIME-Version: 1.0
>| Content-Type: text/plain; charset=us-ascii
>| Content-Transfer-Encoding: 7bit
>| Organization: We
>| Lines: 20
>| NNTP-Posting-Host: 216.251.47.166
>| X-Trace: 1107296715 reader1.on.meganewsservers.com 2181
>216.251.47.166:52402
>| Path:
>cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.
s
>ul.t-online.de!t-online.de!news.glorb.com!feeder2.on.meganewsservers.com!te
x
>tfeed1.on.meganewsservers.com!meganewsservers.com!reader1.on.meganewsserver
s
>.com!reader1.on.meganewsservers.com!not-for-mail
>| Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.server:376551
>| X-Tomcat-NG: microsoft.public.sqlserver.server
>|
>| I have installed SQL Server 2000 SP3a on an XP machine and running in
>| mixed mode. I log on using a local user name belonging to the
>| Administrators group.
>|
>| When I attempt to connect to the DB through .Net with the following
>| string:
>|
>| Data Source=(local);Initial Catalog=Cat;User ID=user;Password=pwd" or
>| Data Source=(local);Initial Catalog=Cat;UID=user;PWD=pwd"
>|
>| I receive the following error:
>|
>| Login failed for user '(null)'. Reason: Not associated with a trusted
>| SQL Server connection.
>|
>| However, I can login using osql -Uuser and password pwd.
>|
>| What am I missing here? I am desperate!
>|
>| TIA, Larzeb
>||||Hello Larzeb,
Did you use ASP.net? If so, please check if you encountered the following
issue:
324479 FIX: ASP.NET SQL Server Session State Impersonation Is Lost Under
Load
http://support.microsoft.com/?id=324479
Actually, the error message is most likely caused by Windows
authentication. Could you double check if the error is caused by the
ADO.net call with the sql authention connection string?
Thanks & Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
| ath: nntpswitch.com
| From: larzeb <larzeb@.community.nospam>
| Newsgroups: microsoft.public.sqlserver.server
| Subject: Re: Login/connection problem
| Date: Wed, 02 Feb 2005 09:07:45 -0800
| Message-ID: <652201ph3q6pe86ntu562ms8p05ml68hia@.4ax.com>
| References: <0300011rd2bceg4lile10275tvhgbvm9ko@.4ax.com>
<BtuQRGPCFHA.768@.cpmsftngxa10.phx.gbl>
| X-Newsreader: Forte Agent 2.0/32.652
| MIME-Version: 1.0
| Content-Type: text/plain; charset=us-ascii
| Content-Transfer-Encoding: 7bit
| Organization: We
| Lines: 80
| NNTP-Posting-Host: 216.251.47.166
| X-Trace: 1107364054 reader1.on.meganewsservers.com 2179
216.251.47.166:59658
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.s
ul.t-online.de!t-online.de!news.glorb.com!feeder2.on.meganewsservers.com!meg
anewsservers.com!reader1.on.meganewsservers.com!reader1.on.meganewsservers.c
om!not-for-mail
| Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.server:376672
| X-Tomcat-NG: microsoft.public.sqlserver.server
|
| Peter,
|
| Both protocols where already set in both the client and server
| utilities. Any other ideas?
|
| Larzeb
| On Wed, 02 Feb 2005 06:36:42 GMT, petery@.online.microsoft.com (Peter
| Yang [MSFT]) wrote:
|
| >Hello Larzeb,
| >
| >It seems that SQL client network protocals are not enabled properly. I
| >suggest that you run
| >
| >%windir%\SYSTEM32\cliconfg.exe
| >
| >and enable TCP/IP and named pipes protocals.
| >
| >Also, please run server network utility to enable the same protocals:
| >
| >%programfiles%\Microsoft SQL Server\80\Tools\Binn\svrnetcn.exe
| >
| >Best Regards,
| >
| >Peter Yang
| >MCSE2000/2003, MCSA, MCDBA
| >Microsoft Online Partner Support
| >
| >When responding to posts, please "Reply to Group" via your newsreader so
| >that others may learn and benefit from your issue.
| >
| >This posting is provided "AS IS" with no warranties, and confers no
rights.
| >
| >
| >--
| >| ath: nntpswitch.com
| >| From: larzeb <larzeb@.community.nospam>
| >| Newsgroups: microsoft.public.sqlserver.server
| >| Subject: Login/connection problem
| >| Date: Tue, 01 Feb 2005 14:25:15 -0800
| >| Message-ID: <0300011rd2bceg4lile10275tvhgbvm9ko@.4ax.com>
| >| X-Newsreader: Forte Agent 2.0/32.652
| >| MIME-Version: 1.0
| >| Content-Type: text/plain; charset=us-ascii
| >| Content-Transfer-Encoding: 7bit
| >| Organization: We
| >| Lines: 20
| >| NNTP-Posting-Host: 216.251.47.166
| >| X-Trace: 1107296715 reader1.on.meganewsservers.com 2181
| >216.251.47.166:52402
| >| Path:
|
>cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.
s
|
>ul.t-online.de!t-online.de!news.glorb.com!feeder2.on.meganewsservers.com!te
x
|
>tfeed1.on.meganewsservers.com!meganewsservers.com!reader1.on.meganewsserver
s
| >.com!reader1.on.meganewsservers.com!not-for-mail
| >| Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.server:376551
| >| X-Tomcat-NG: microsoft.public.sqlserver.server
| >|
| >| I have installed SQL Server 2000 SP3a on an XP machine and running in
| >| mixed mode. I log on using a local user name belonging to the
| >| Administrators group.
| >|
| >| When I attempt to connect to the DB through .Net with the following
| >| string:
| >|
| >| Data Source=(local);Initial Catalog=Cat;User ID=user;Password=pwd" or
| >| Data Source=(local);Initial Catalog=Cat;UID=user;PWD=pwd"
| >|
| >| I receive the following error:
| >|
| >| Login failed for user '(null)'. Reason: Not associated with a trusted
| >| SQL Server connection.
| >|
| >| However, I can login using osql -Uuser and password pwd.
| >|
| >| What am I missing here? I am desperate!
| >|
| >| TIA, Larzeb
| >|
|
||||The error message is telling you that, although you passed SQL Server
authentication credentials, the DBMS is actually attempting Integrated
Security=SSPI, that is, Windows Authentication. You should check to make
sure your network account has been granted SQL Server login access or force
SQL Server, and your connection string, to use SQL Server logins.
Sincerely,
Anthony Thomas
"Peter Yang [MSFT]" <petery@.online.microsoft.com> wrote in message
news:cbDBaKZCFHA.644@.cpmsftngxa10.phx.gbl...
Hello Larzeb,
Did you use ASP.net? If so, please check if you encountered the following
issue:
324479 FIX: ASP.NET SQL Server Session State Impersonation Is Lost Under
Load
http://support.microsoft.com/?id=324479
Actually, the error message is most likely caused by Windows
authentication. Could you double check if the error is caused by the
ADO.net call with the sql authention connection string?
Thanks & Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
| ath: nntpswitch.com
| From: larzeb <larzeb@.community.nospam>
| Newsgroups: microsoft.public.sqlserver.server
| Subject: Re: Login/connection problem
| Date: Wed, 02 Feb 2005 09:07:45 -0800
| Message-ID: <652201ph3q6pe86ntu562ms8p05ml68hia@.4ax.com>
| References: <0300011rd2bceg4lile10275tvhgbvm9ko@.4ax.com>
<BtuQRGPCFHA.768@.cpmsftngxa10.phx.gbl>
| X-Newsreader: Forte Agent 2.0/32.652
| MIME-Version: 1.0
| Content-Type: text/plain; charset=us-ascii
| Content-Transfer-Encoding: 7bit
| Organization: We
| Lines: 80
| NNTP-Posting-Host: 216.251.47.166
| X-Trace: 1107364054 reader1.on.meganewsservers.com 2179
216.251.47.166:59658
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.s
ul.t-online.de!t-online.de!news.glorb.com!feeder2.on.meganewsservers.com!meg
anewsservers.com!reader1.on.meganewsservers.com!reader1.on.meganewsservers.c
om!not-for-mail
| Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.server:376672
| X-Tomcat-NG: microsoft.public.sqlserver.server
|
| Peter,
|
| Both protocols where already set in both the client and server
| utilities. Any other ideas?
|
| Larzeb
| On Wed, 02 Feb 2005 06:36:42 GMT, petery@.online.microsoft.com (Peter
| Yang [MSFT]) wrote:
|
| >Hello Larzeb,
| >
| >It seems that SQL client network protocals are not enabled properly. I
| >suggest that you run
| >
| >%windir%\SYSTEM32\cliconfg.exe
| >
| >and enable TCP/IP and named pipes protocals.
| >
| >Also, please run server network utility to enable the same protocals:
| >
| >%programfiles%\Microsoft SQL Server\80\Tools\Binn\svrnetcn.exe
| >
| >Best Regards,
| >
| >Peter Yang
| >MCSE2000/2003, MCSA, MCDBA
| >Microsoft Online Partner Support
| >
| >When responding to posts, please "Reply to Group" via your newsreader so
| >that others may learn and benefit from your issue.
| >
| >This posting is provided "AS IS" with no warranties, and confers no
rights.
| >
| >
| >--
| >| ath: nntpswitch.com
| >| From: larzeb <larzeb@.community.nospam>
| >| Newsgroups: microsoft.public.sqlserver.server
| >| Subject: Login/connection problem
| >| Date: Tue, 01 Feb 2005 14:25:15 -0800
| >| Message-ID: <0300011rd2bceg4lile10275tvhgbvm9ko@.4ax.com>
| >| X-Newsreader: Forte Agent 2.0/32.652
| >| MIME-Version: 1.0
| >| Content-Type: text/plain; charset=us-ascii
| >| Content-Transfer-Encoding: 7bit
| >| Organization: We
| >| Lines: 20
| >| NNTP-Posting-Host: 216.251.47.166
| >| X-Trace: 1107296715 reader1.on.meganewsservers.com 2181
| >216.251.47.166:52402
| >| Path:
|
>cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.
s
|
>ul.t-online.de!t-online.de!news.glorb.com!feeder2.on.meganewsservers.com!te
x
|
>tfeed1.on.meganewsservers.com!meganewsservers.com!reader1.on.meganewsserver
s
| >.com!reader1.on.meganewsservers.com!not-for-mail
| >| Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.server:376551
| >| X-Tomcat-NG: microsoft.public.sqlserver.server
| >|
| >| I have installed SQL Server 2000 SP3a on an XP machine and running in
| >| mixed mode. I log on using a local user name belonging to the
| >| Administrators group.
| >|
| >| When I attempt to connect to the DB through .Net with the following
| >| string:
| >|
| >| Data Source=(local);Initial Catalog=Cat;User ID=user;Password=pwd" or
| >| Data Source=(local);Initial Catalog=Cat;UID=user;PWD=pwd"
| >|
| >| I receive the following error:
| >|
| >| Login failed for user '(null)'. Reason: Not associated with a trusted
| >| SQL Server connection.
| >|
| >| However, I can login using osql -Uuser and password pwd.
| >|
| >| What am I missing here? I am desperate!
| >|
| >| TIA, Larzeb
| >|
|
|

Login/connection problem

I have installed SQL Server 2000 SP3a on an XP machine and running in
mixed mode. I log on using a local user name belonging to the
Administrators group.
When I attempt to connect to the DB through .Net with the following
string:
Data Source=(local);Initial Catalog=Cat;User ID=user;Password=pwd" or
Data Source=(local);Initial Catalog=Cat;UID=user;PWD=pwd"
I receive the following error:
Login failed for user '(null)'. Reason: Not associated with a trusted
SQL Server connection.
However, I can login using osql -Uuser and password pwd.
What am I missing here? I am desperate!
TIA, LarzebHello Larzeb,
It seems that SQL client network protocals are not enabled properly. I
suggest that you run
%windir%\SYSTEM32\cliconfg.exe
and enable TCP/IP and named pipes protocals.
Also, please run server network utility to enable the same protocals:
%programfiles%\Microsoft SQL Server\80\Tools\Binn\svrnetcn.exe
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
This posting is provided "AS IS" with no warranties, and confers no rights.
| ath: nntpswitch.com
| From: larzeb <larzeb@.community.nospam>
| Newsgroups: microsoft.public.sqlserver.server
| Subject: Login/connection problem
| Date: Tue, 01 Feb 2005 14:25:15 -0800
| Message-ID: <0300011rd2bceg4lile10275tvhgbvm9ko@.4ax.com>
| X-Newsreader: Forte Agent 2.0/32.652
| MIME-Version: 1.0
| Content-Type: text/plain; charset=us-ascii
| Content-Transfer-Encoding: 7bit
| Organization: We
| Lines: 20
| NNTP-Posting-Host: 216.251.47.166
| X-Trace: 1107296715 reader1.on.meganewsservers.com 2181
216.251.47.166:52402
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.s
ul.t-online.de!t-online.de!news.glorb.com!feeder2.on.meganewsservers.com!tex
tfeed1.on.meganewsservers.com!meganewsservers.com!reader1.on.meganewsservers
.com!reader1.on.meganewsservers.com!not-for-mail
| Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.server:376551
| X-Tomcat-NG: microsoft.public.sqlserver.server
|
| I have installed SQL Server 2000 SP3a on an XP machine and running in
| mixed mode. I log on using a local user name belonging to the
| Administrators group.
|
| When I attempt to connect to the DB through .Net with the following
| string:
|
| Data Source=(local);Initial Catalog=Cat;User ID=user;Password=pwd" or
| Data Source=(local);Initial Catalog=Cat;UID=user;PWD=pwd"
|
| I receive the following error:
|
| Login failed for user '(null)'. Reason: Not associated with a trusted
| SQL Server connection.
|
| However, I can login using osql -Uuser and password pwd.
|
| What am I missing here? I am desperate!
|
| TIA, Larzeb
||||Peter,
Both protocols where already set in both the client and server
utilities. Any other ideas?
Larzeb
On Wed, 02 Feb 2005 06:36:42 GMT, petery@.online.microsoft.com (Peter
Yang [MSFT]) wrote:
>Hello Larzeb,
>It seems that SQL client network protocals are not enabled properly. I
>suggest that you run
>%windir%\SYSTEM32\cliconfg.exe
>and enable TCP/IP and named pipes protocals.
>Also, please run server network utility to enable the same protocals:
>%programfiles%\Microsoft SQL Server\80\Tools\Binn\svrnetcn.exe
>Best Regards,
>Peter Yang
>MCSE2000/2003, MCSA, MCDBA
>Microsoft Online Partner Support
>When responding to posts, please "Reply to Group" via your newsreader so
>that others may learn and benefit from your issue.
>This posting is provided "AS IS" with no warranties, and confers no rights.
>
>--
>| ath: nntpswitch.com
>| From: larzeb <larzeb@.community.nospam>
>| Newsgroups: microsoft.public.sqlserver.server
>| Subject: Login/connection problem
>| Date: Tue, 01 Feb 2005 14:25:15 -0800
>| Message-ID: <0300011rd2bceg4lile10275tvhgbvm9ko@.4ax.com>
>| X-Newsreader: Forte Agent 2.0/32.652
>| MIME-Version: 1.0
>| Content-Type: text/plain; charset=us-ascii
>| Content-Transfer-Encoding: 7bit
>| Organization: We
>| Lines: 20
>| NNTP-Posting-Host: 216.251.47.166
>| X-Trace: 1107296715 reader1.on.meganewsservers.com 2181
>216.251.47.166:52402
>| Path:
>cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.s
>ul.t-online.de!t-online.de!news.glorb.com!feeder2.on.meganewsservers.com!tex
>tfeed1.on.meganewsservers.com!meganewsservers.com!reader1.on.meganewsservers
>.com!reader1.on.meganewsservers.com!not-for-mail
>| Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.server:376551
>| X-Tomcat-NG: microsoft.public.sqlserver.server
>|
>| I have installed SQL Server 2000 SP3a on an XP machine and running in
>| mixed mode. I log on using a local user name belonging to the
>| Administrators group.
>|
>| When I attempt to connect to the DB through .Net with the following
>| string:
>|
>| Data Source=(local);Initial Catalog=Cat;User ID=user;Password=pwd" or
>| Data Source=(local);Initial Catalog=Cat;UID=user;PWD=pwd"
>|
>| I receive the following error:
>|
>| Login failed for user '(null)'. Reason: Not associated with a trusted
>| SQL Server connection.
>|
>| However, I can login using osql -Uuser and password pwd.
>|
>| What am I missing here? I am desperate!
>|
>| TIA, Larzeb
>||||Hello Larzeb,
Did you use ASP.net? If so, please check if you encountered the following
issue:
324479 FIX: ASP.NET SQL Server Session State Impersonation Is Lost Under
Load
http://support.microsoft.com/?id=324479
Actually, the error message is most likely caused by Windows
authentication. Could you double check if the error is caused by the
ADO.net call with the sql authention connection string?
Thanks & Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
| ath: nntpswitch.com
| From: larzeb <larzeb@.community.nospam>
| Newsgroups: microsoft.public.sqlserver.server
| Subject: Re: Login/connection problem
| Date: Wed, 02 Feb 2005 09:07:45 -0800
| Message-ID: <652201ph3q6pe86ntu562ms8p05ml68hia@.4ax.com>
| References: <0300011rd2bceg4lile10275tvhgbvm9ko@.4ax.com>
<BtuQRGPCFHA.768@.cpmsftngxa10.phx.gbl>
| X-Newsreader: Forte Agent 2.0/32.652
| MIME-Version: 1.0
| Content-Type: text/plain; charset=us-ascii
| Content-Transfer-Encoding: 7bit
| Organization: We
| Lines: 80
| NNTP-Posting-Host: 216.251.47.166
| X-Trace: 1107364054 reader1.on.meganewsservers.com 2179
216.251.47.166:59658
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.s
ul.t-online.de!t-online.de!news.glorb.com!feeder2.on.meganewsservers.com!meg
anewsservers.com!reader1.on.meganewsservers.com!reader1.on.meganewsservers.c
om!not-for-mail
| Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.server:376672
| X-Tomcat-NG: microsoft.public.sqlserver.server
|
| Peter,
|
| Both protocols where already set in both the client and server
| utilities. Any other ideas?
|
| Larzeb
| On Wed, 02 Feb 2005 06:36:42 GMT, petery@.online.microsoft.com (Peter
| Yang [MSFT]) wrote:
|
| >Hello Larzeb,
| >
| >It seems that SQL client network protocals are not enabled properly. I
| >suggest that you run
| >
| >%windir%\SYSTEM32\cliconfg.exe
| >
| >and enable TCP/IP and named pipes protocals.
| >
| >Also, please run server network utility to enable the same protocals:
| >
| >%programfiles%\Microsoft SQL Server\80\Tools\Binn\svrnetcn.exe
| >
| >Best Regards,
| >
| >Peter Yang
| >MCSE2000/2003, MCSA, MCDBA
| >Microsoft Online Partner Support
| >
| >When responding to posts, please "Reply to Group" via your newsreader so
| >that others may learn and benefit from your issue.
| >
| >This posting is provided "AS IS" with no warranties, and confers no
rights.
| >
| >
| >--
| >| ath: nntpswitch.com
| >| From: larzeb <larzeb@.community.nospam>
| >| Newsgroups: microsoft.public.sqlserver.server
| >| Subject: Login/connection problem
| >| Date: Tue, 01 Feb 2005 14:25:15 -0800
| >| Message-ID: <0300011rd2bceg4lile10275tvhgbvm9ko@.4ax.com>
| >| X-Newsreader: Forte Agent 2.0/32.652
| >| MIME-Version: 1.0
| >| Content-Type: text/plain; charset=us-ascii
| >| Content-Transfer-Encoding: 7bit
| >| Organization: We
| >| Lines: 20
| >| NNTP-Posting-Host: 216.251.47.166
| >| X-Trace: 1107296715 reader1.on.meganewsservers.com 2181
| >216.251.47.166:52402
| >| Path:
|
>cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.
s
|
>ul.t-online.de!t-online.de!news.glorb.com!feeder2.on.meganewsservers.com!te
x
|
>tfeed1.on.meganewsservers.com!meganewsservers.com!reader1.on.meganewsserver
s
| >.com!reader1.on.meganewsservers.com!not-for-mail
| >| Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.server:376551
| >| X-Tomcat-NG: microsoft.public.sqlserver.server
| >|
| >| I have installed SQL Server 2000 SP3a on an XP machine and running in
| >| mixed mode. I log on using a local user name belonging to the
| >| Administrators group.
| >|
| >| When I attempt to connect to the DB through .Net with the following
| >| string:
| >|
| >| Data Source=(local);Initial Catalog=Cat;User ID=user;Password=pwd" or
| >| Data Source=(local);Initial Catalog=Cat;UID=user;PWD=pwd"
| >|
| >| I receive the following error:
| >|
| >| Login failed for user '(null)'. Reason: Not associated with a trusted
| >| SQL Server connection.
| >|
| >| However, I can login using osql -Uuser and password pwd.
| >|
| >| What am I missing here? I am desperate!
| >|
| >| TIA, Larzeb
| >|
|
||||The error message is telling you that, although you passed SQL Server
authentication credentials, the DBMS is actually attempting Integrated
Security=SSPI, that is, Windows Authentication. You should check to make
sure your network account has been granted SQL Server login access or force
SQL Server, and your connection string, to use SQL Server logins.
Sincerely,
Anthony Thomas
"Peter Yang [MSFT]" <petery@.online.microsoft.com> wrote in message
news:cbDBaKZCFHA.644@.cpmsftngxa10.phx.gbl...
Hello Larzeb,
Did you use ASP.net? If so, please check if you encountered the following
issue:
324479 FIX: ASP.NET SQL Server Session State Impersonation Is Lost Under
Load
http://support.microsoft.com/?id=324479
Actually, the error message is most likely caused by Windows
authentication. Could you double check if the error is caused by the
ADO.net call with the sql authention connection string?
Thanks & Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
| ath: nntpswitch.com
| From: larzeb <larzeb@.community.nospam>
| Newsgroups: microsoft.public.sqlserver.server
| Subject: Re: Login/connection problem
| Date: Wed, 02 Feb 2005 09:07:45 -0800
| Message-ID: <652201ph3q6pe86ntu562ms8p05ml68hia@.4ax.com>
| References: <0300011rd2bceg4lile10275tvhgbvm9ko@.4ax.com>
<BtuQRGPCFHA.768@.cpmsftngxa10.phx.gbl>
| X-Newsreader: Forte Agent 2.0/32.652
| MIME-Version: 1.0
| Content-Type: text/plain; charset=us-ascii
| Content-Transfer-Encoding: 7bit
| Organization: We
| Lines: 80
| NNTP-Posting-Host: 216.251.47.166
| X-Trace: 1107364054 reader1.on.meganewsservers.com 2179
216.251.47.166:59658
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.s
ul.t-online.de!t-online.de!news.glorb.com!feeder2.on.meganewsservers.com!meg
anewsservers.com!reader1.on.meganewsservers.com!reader1.on.meganewsservers.c
om!not-for-mail
| Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.server:376672
| X-Tomcat-NG: microsoft.public.sqlserver.server
|
| Peter,
|
| Both protocols where already set in both the client and server
| utilities. Any other ideas?
|
| Larzeb
| On Wed, 02 Feb 2005 06:36:42 GMT, petery@.online.microsoft.com (Peter
| Yang [MSFT]) wrote:
|
| >Hello Larzeb,
| >
| >It seems that SQL client network protocals are not enabled properly. I
| >suggest that you run
| >
| >%windir%\SYSTEM32\cliconfg.exe
| >
| >and enable TCP/IP and named pipes protocals.
| >
| >Also, please run server network utility to enable the same protocals:
| >
| >%programfiles%\Microsoft SQL Server\80\Tools\Binn\svrnetcn.exe
| >
| >Best Regards,
| >
| >Peter Yang
| >MCSE2000/2003, MCSA, MCDBA
| >Microsoft Online Partner Support
| >
| >When responding to posts, please "Reply to Group" via your newsreader so
| >that others may learn and benefit from your issue.
| >
| >This posting is provided "AS IS" with no warranties, and confers no
rights.
| >
| >
| >--
| >| ath: nntpswitch.com
| >| From: larzeb <larzeb@.community.nospam>
| >| Newsgroups: microsoft.public.sqlserver.server
| >| Subject: Login/connection problem
| >| Date: Tue, 01 Feb 2005 14:25:15 -0800
| >| Message-ID: <0300011rd2bceg4lile10275tvhgbvm9ko@.4ax.com>
| >| X-Newsreader: Forte Agent 2.0/32.652
| >| MIME-Version: 1.0
| >| Content-Type: text/plain; charset=us-ascii
| >| Content-Transfer-Encoding: 7bit
| >| Organization: We
| >| Lines: 20
| >| NNTP-Posting-Host: 216.251.47.166
| >| X-Trace: 1107296715 reader1.on.meganewsservers.com 2181
| >216.251.47.166:52402
| >| Path:
|
>cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.
s
|
>ul.t-online.de!t-online.de!news.glorb.com!feeder2.on.meganewsservers.com!te
x
|
>tfeed1.on.meganewsservers.com!meganewsservers.com!reader1.on.meganewsserver
s
| >.com!reader1.on.meganewsservers.com!not-for-mail
| >| Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.server:376551
| >| X-Tomcat-NG: microsoft.public.sqlserver.server
| >|
| >| I have installed SQL Server 2000 SP3a on an XP machine and running in
| >| mixed mode. I log on using a local user name belonging to the
| >| Administrators group.
| >|
| >| When I attempt to connect to the DB through .Net with the following
| >| string:
| >|
| >| Data Source=(local);Initial Catalog=Cat;User ID=user;Password=pwd" or
| >| Data Source=(local);Initial Catalog=Cat;UID=user;PWD=pwd"
| >|
| >| I receive the following error:
| >|
| >| Login failed for user '(null)'. Reason: Not associated with a trusted
| >| SQL Server connection.
| >|
| >| However, I can login using osql -Uuser and password pwd.
| >|
| >| What am I missing here? I am desperate!
| >|
| >| TIA, Larzeb
| >|
|
|

login works with SQL but not MSDE

Any idea why the following dmo connection string would not work on MSDE, but
does work on SQL Personal Edition? It appears to connects, but then can't
find the server name. In both cases we are using the latest SQL Personal,
MSDE, and Windows XP.
Thanks for any guidance.
Neil
connection string:
server=myserver;trusted_connection="yes";database= northwind;connection
timeout=10;
exception:
[INFO] 20040517 17:59:34.598 (myControl) Connected successfully to
server=VPC1W2KSQL\VPC1MSDE;Trusted_Connection=yes; database=master;connection
timeout=10;
[EXCEPTION] 20040517 17:59:51.352 (SQLServer) Cannot connect
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or
access denied.
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()).
at SQLDMO.SQLServerClass.Connect(Object ServerName, Object Login, Object
Password)
at SQLServer.Connect()
Was MSDE installed with the network protocols enabled? With SP3a they are
turned off by default.
Jim
"Neil W." <neilw@.netlib.com> wrote in message
news:eC6V4XdPEHA.1276@.TK2MSFTNGP11.phx.gbl...
> Any idea why the following dmo connection string would not work on MSDE,
but
> does work on SQL Personal Edition? It appears to connects, but then can't
> find the server name. In both cases we are using the latest SQL Personal,
> MSDE, and Windows XP.
> Thanks for any guidance.
> Neil
> connection string:
> server=myserver;trusted_connection="yes";database= northwind;connection
> timeout=10;
> exception:
> [INFO] 20040517 17:59:34.598 (myControl) Connected successfully to
>
server=VPC1W2KSQL\VPC1MSDE;Trusted_Connection=yes; database=master;connection
> timeout=10;
> [EXCEPTION] 20040517 17:59:51.352 (SQLServer) Cannot connect
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or
> access denied.
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()).
> at SQLDMO.SQLServerClass.Connect(Object ServerName, Object Login,
Object
> Password)
> at SQLServer.Connect()
>
|||This took me a little bit further. I can now actually see the tables in in
my program using the dmo calls. Thanks! owever, when I try to access the
individual columns, I continue to get errors such as:
EXCEPTION] 20040520 08:37:30.955 (sqlserver.myObject) Error retrieving info
from test2: Server user 'mymachine\mylogin' is not a valid user in database
'test2'.
Again, this all works fine using SQL Personal Edition.
Neil
"Jim Young" <thorium48@.hotmail.com> wrote in message
Was MSDE installed with the network protocols enabled? With SP3a they are
turned off by default.
Jim
"Neil W." <neilw@.netlib.com> wrote in message
news:eC6V4XdPEHA.1276@.TK2MSFTNGP11.phx.gbl...
> Any idea why the following dmo connection string would not work on MSDE,
but
> does work on SQL Personal Edition? It appears to connects, but then can't
> find the server name. In both cases we are using the latest SQL Personal,
> MSDE, and Windows XP.
> Thanks for any guidance.
> Neil
> connection string:
> server=myserver;trusted_connection="yes";database= northwind;connection
> timeout=10;
> exception:
> [INFO] 20040517 17:59:34.598 (myControl) Connected successfully to
>
server=VPC1W2KSQL\VPC1MSDE;Trusted_Connection=yes; database=master;connection
> timeout=10;
> [EXCEPTION] 20040517 17:59:51.352 (SQLServer) Cannot connect
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or
> access denied.
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()).
> at SQLDMO.SQLServerClass.Connect(Object ServerName, Object Login,
Object
> Password)
> at SQLServer.Connect()
>
|||Carefully read the error message. You need to make the user you are
connecting with, in this case a Windows login, a user in the database you
are trying to use. Everyone that can connect to a server can see the schema
of any database, but you can't select or change any data until you are given
explicit permissions in a database.
Jim
"Neil W." <neilw@.netlib.com> wrote in message
news:OShgsvmPEHA.2468@.TK2MSFTNGP11.phx.gbl...
> This took me a little bit further. I can now actually see the tables in
in
> my program using the dmo calls. Thanks! owever, when I try to access the
> individual columns, I continue to get errors such as:
> EXCEPTION] 20040520 08:37:30.955 (sqlserver.myObject) Error retrieving
info
> from test2: Server user 'mymachine\mylogin' is not a valid user in
database[vbcol=seagreen]
> 'test2'.
> Again, this all works fine using SQL Personal Edition.
> Neil
>
> "Jim Young" <thorium48@.hotmail.com> wrote in message
> Was MSDE installed with the network protocols enabled? With SP3a they are
> turned off by default.
> Jim
> "Neil W." <neilw@.netlib.com> wrote in message
> news:eC6V4XdPEHA.1276@.TK2MSFTNGP11.phx.gbl...
> but
can't[vbcol=seagreen]
Personal,
>
server=VPC1W2KSQL\VPC1MSDE;Trusted_Connection=yes; database=master;connection[vbcol=seagreen]
or
> Object
>
>

Wednesday, March 7, 2012

login windows authentication problem

Hi,

I have a problem with sql server 2005 express, when i try to connect to an sql database it says login: is not a trusted connection to an sql database. I have gone into reg edit and changed the authentication setting from windows oly mode 1 to mixed mode 2. It still has the same problem, does anyone have any idea what the problem may be?

kind regards

Chris J

Did you restart the service ?

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

Login to database failed, but login to database was granted

See previous post with WCF connection working some times for additional info.

I'm checking the server log and my attempt to log into one database works. When I try to login to the second database I get this logged:

Login failed for user 'xxx' (Client {my ip address} )

Error: 18456, Severity: 14, State: 16

When I go to the database server and pull up the user, both the original and second database are checked in the User Mappings at the Server Users level. If I set master to the intial database, the first database, or the second database as the initial catalog....I can access the first database but not the second.

No I have not found one word written for SQL Server 2005 that I could find that states THIS IS HOW YOU ENABLE LOGIN FOR A DATABASE, however since I've not found anything different between the DB that works and the one that doesn't then I must assume I've done things right.

The only thing that is odd on the server is that there are two different logins created with different names but for the same user. I've made sure that database 2 is checked for both user records. I tried to purge the duplicate but I get a DROP failure and don't have the time to try and interpret SQL Servers' obscure error messages.

I need to get access before 3PM EST and would love any help on this brick wall ASAP. Thanks.

I recommend reading Laurentiu’s article on SQL Server security concepts (http://blogs.msdn.com/lcris/archive/2007/03/23/basic-sql-server-security-concepts-logins-users-and-principals.aspx) and consult BOL for CREATE LOGIN and CREATE USER.

Please let us know if you have further questions, we will be glad to help.

Thanks a lot,

-Raul Garcia

SDE/T

SQL Server Engine

|||

Okay, I read the article and except for the need to differentiate between a login and user, the discussion was at such a generic, global level that it still did not answer my original question.

First I am using the management console. I added my Windows Security ID to the server. It exists.

Under the LoginProperties / Users Mappings tab I have all my databases listed and both Guide and Talker are checked.

Under Guide database / Users a user exists with the Windows Security ID.

Under Talker database / Users a user exists with the Windows Security ID.

First: I assume that by creating the Windows login at the server level I'm creating a Login. Correct?

Second: By checking the databases under the LoginProperties / Users Mappings tab I'm defining the databases that the user can login to. Correct?

Third: If your answer is YES to both questions, then why is my login for Talker failing getting reported as no login established for the database?!!!!!

|||

Okay. I finally found my answer.

I changed my connection strings to have my service access the database on my local machine. The behaviour was exactly the same. We began talking through the connections that had to occur from service, to server, to SQL, to the database. And we could eliminate everything but the connection string.

Looking at the connection string, I found that the database name was misspelled. So I was NOT trying to login to a database that I was not given access for....I was trying to login to a database that does not exist.

Now at the core process within SQL Server it seems to me that this is a state that could be easily recognized and logged......instead of making it sound like I didn't setup security correctly. In this case the real database name that I called Talker had three m's instead of 2. These kinds of errors the mind does not see...it automatically corrects for the extra 'm' making it difficult to differentiate and locate. The error log would really help point out that I've specified a database that does not exist and would immediately point me to the connection string.

Login SQL Server using Integrated Security ! Problem

ok thi is my code for test

SqlConnection conn = new SqlConnection("server=majed13;Integrated Security=SSPI;");
conn.Open();
conn.Close();

connection isOK
the user logged in SQL Server isASPNET USER
i want looged in currentNT USER not ASPNET USER
thanx in advanceIt get the current user, you can use impersonation, and disable anonymous access to the Web. Is this on an Intranet? Do all users have rights to SQL Server? Is there a domain in place?|||Is this on an Intranet?Yes
Do all users have rights to SQL Server?Yes
Is there a domain in place?Yes


the problem in current user it's take the ASPNET not NT USER why ??
|||aspnet is the default iis user. Your best bet is to utilize ASP.NET's impersonation abilities in the web.config.

http://msdn.microsoft.com/library/en-us/vsent7/html/vxconImpersonation.asp?frame=true

that should explain a lot of it for you.

Either that, or utilize a DAL or stop using Integrated Security. :)|||the answer is


<identity impersonate="true" />

thank you

Friday, February 24, 2012

Login problem publishing to my machine from VS2005

So I'm trying my first Report project from Visual Studio 2005 and I
get a good connection string and run the project. When I run it it
tries to deploy to http://localhost/reportserver, and asks for a login
and password. But nothing works. I don't even think I have a password
set up for reporting services on this machine.
Once it fails and I run it again, it runs fine in local mode on my
machine. Does anyone know what is going on here?So this never happens to anyone else? Very weird. Maybe it's time to
just format the damn thing and install everything again.

Monday, February 20, 2012

Login Problem

Hi everybody,
I'm a newbe on SQL Server;
Here my problem is:
In Server Explorer I create a Data Connection to Nortwind. After Creating
the connection I can reach tables of this database.
But: When I want to configure the dataAdapter the problem occurs:
In the configure wizard "Data Soure Login" window comes.
Altought I know the user "sa" password This error comes:
"Login Failed:Not Associated With a Trusted SQL Server Connection. Invalid
Connection String Attribute."
How can I overcome with this problem.
What may be the reason of this problem.
Thanks for any help.
Arif imen
Prowise Software.
Arif,
If your SQL Server is configured to accept Windows Authentication only, you
will get this error message when you attempt to use SQL authentication.
Please configure your DSN to use Windows Authentication and see if that
clear up the issue for you.
Thank you.
Gary Whitley
This posting is provided "AS IS" with no warranties, and confers no rights.

Login Problem

Hi everybody,
I'm a newbe on SQL Server;
Here my problem is:
In Server Explorer I create a Data Connection to Nortwind. After Creating
the connection I can reach tables of this database.
But: When I want to configure the dataAdapter the problem occurs:
In the configure wizard "Data Soure Login" window comes.
Altought I know the user "sa" password This error comes:
"Login Failed:Not Associated With a Trusted SQL Server Connection. Invalid
Connection String Attribute."
How can I overcome with this problem.
What may be the reason of this problem.
Thanks for any help.
Arif imen
Prowise Software.Arif,
If your SQL Server is configured to accept Windows Authentication only, you
will get this error message when you attempt to use SQL authentication.
Please configure your DSN to use Windows Authentication and see if that
clear up the issue for you.
Thank you.
Gary Whitley
This posting is provided "AS IS" with no warranties, and confers no rights.