Showing posts with label sp2. Show all posts
Showing posts with label sp2. Show all posts

Friday, March 30, 2012

Login failed for user 'NT AUTHORITY\NETWORK SERVICE'

I have:

(1) SQL 2005 on a member server, Windows Authentication

(2) I'm using Visual Studio.Net 2005 on my Windows XP sp2 work station.

(3) From my machine, within my development application, I have no problem accessing the Data in the SQL server.

(4) I Receive the Login Failed error after I copy my project to the Test Web Server (Same machine that houses SQL) and test from either my machine or from the host server.

More details of the error message are:

Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.

Source Error:


Line 33: DA = New SqlDataAdapter(sSql, CONN_STRING)
Line 34: DS = New DataSet
Line 35: DA.Fill(DS)
Line 36:
Line 37: Session("NameInquiry_DS") = DS

Source File: C:\Inetpub\wwwroot\nameinquiry\NameInquiry.aspx.vb Line: 35

The finished product is to be an Intranet site only; accessible by employees within our own private network.

The SQL is a new install with only test data.

What have I missed that is causing the permission problem? The event viewer shows a nonauthenticated user is causing the problem. But, how do I correct this?

Could you please post the connection string here and the part of the web.config file about impersonation (if any and not commented out). This is a configuration problem. Which user do you want to authenticate while connecting to the database ?

http://msdn2.microsoft.com/en-us/library/aa302377.aspx

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de|||

Hi, Terry

Try to read following article, they probably include solution to your problem:

1) http://support.microsoft.com/kb/316989/

2) https://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=348662&SiteID=17

3) http://msdn2.microsoft.com/en-us/library/ab4e6cky(vs.80).aspx

Good Luck!

Ming.

|||

Here is my connection string and the Web.Config.

What is confusing is that I have zero issues running the application within VS ASP.NET. It's only when I run the application outside the development software.

When I check the Event Viewer on the server that houses SQL, the login name is blank. That's why I believe I have a permissions error. I just don't have any idea what permissions to set. It doesn't matter which desktop I use, the connection fails. If I try to access the website from the Server it's housed using the administrator login, I still get the Login failed message.

<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">

<appSettings>
<add key="ConnStringer" Value="packet size=4096;Data Source=MYSERVER;Initial Catalog=MyDataBase;Integrated Security=True;"/>
</appSettings>

<connectionStrings>
<add name="myConnection" connectionString="server=MYSERVER;database=MyDataBase;Integrated Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
<authentication mode="Forms" />
<roleManager enabled="true" />
<compilation debug="true" strict="false" explicit="true"/>
<pages>
<namespaces>
<clear/>
<add namespace="System"/>
<add namespace="System.Collections"/>
<add namespace="System.Collections.Specialized"/>
<add namespace="System.Configuration"/>
<add namespace="System.Text"/>
<add namespace="System.Text.RegularExpressions"/>
<add namespace="System.Web"/>
<add namespace="System.Web.Caching"/>
<add namespace="System.Web.SessionState"/>
<add namespace="System.Web.Security"/>
<add namespace="System.Web.Profile"/>
<add namespace="System.Web.UI"/>
<add namespace="System.Web.UI.WebControls"/>
<add namespace="System.Web.UI.WebControls.WebParts"/>
<add namespace="System.Web.UI.HtmlControls"/>
</namespaces>
</pages>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.

<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>

-->

<anonymousIdentification enabled="true"/>
<profile enabled="true">
<properties>
<add name="myGroupID" allowAnonymous="true"/>
<add name="myUserID" allowAnonymous="true"/>
</properties>
</profile>


</system.web>
</configuration>

|||

Ming,

The articles were very informitive but none of the possible solutions resolved my problem.

In an earlier post, I stated that everything worked fine within my VS .NET application. I have since learned that as long as I view data only, it works. If I attempt to do any writes, the application fails. Therefore, I'm more convinced this is an authentication related issue. Now I'm asking the following questions as I try to locate and resolve this issue:

I have determined that NT AUTHORITY\NETWORK SERVICE is the default login when I run my application. Based on what I've read from the many web posts concerning Windows Authenticaion, this is normal. How do I control the default login name? Meaning, can this be changed? If so, How? Should it be changed? Can I set various permissions to the various SQL databases? If so, How?

|||

Are your client and server machine in WORKGROUP instead of domain? If so, can you try grant database login to "<machinename>\guest" see whether it works?

As for your questions that how to control default login name, it is more of ASP.NET configuration issue, such as you can change ASP.NET account( http://www.bluevisionsoftware.com/WebSite/TipsAndTricksDetails.aspx?Name=AspNetAccount)

or post your question in ASP.NET forum.

The workaround here is

1) Change your connection string to force tcp connection(adding prefix "tcp:" in DataSource field ).

2) Use SQL authentication.

Good Luck!

Ming.

|||


Hi,

using Anonymous authentication will make you able to use a single user connecting to the database. This uer has to be setup in the security tab of the website in the IIS configuration screen. If you want to use this combination, you will have to set the tag of the web.config to impersonate=true. This will let you use login procided within the IIS to access SQL Server. If you want to authenticate / impersonate the user which is currently accessing the web page, you will have to (assuming that the web server is on the same server as the SQl Server) disbal the anonymous access option in the IIS configuration dialog.

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

|||

I think that the 3rd of Ming's posts alludes to the potential problem and provides links to additional relevant info (and your hunch about authentication related issue would also be accurate). The most likely source of the problem, as Ming and Jens have pointed out, is impersonation.

NT AUTHORITY\NETWORK SERVICE is the account that IIS runs under on Windows Server 2003 and without any additional configuration, this is the account that will attempt to access whatever resources the web application needs. Since this is the account that is trying to access the database, it appears that the outbound attempt is not attempting the connection as the connected user. This is where the web.config settings that Jens mentioned come into play and there's a good synopsis of the options available on http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetAP05.asp (this looks identical to the link Jens posted earlier). You probably don't need or want IIS to run under a different account.

If you want each domain user to have a separate connection to the database, you will need to disable Anonymous Access and turn on Integrated Windows authentication (this would be on the Directory Security tab for the web site in IIS Manager). You'd then specify <identity impersonate="true"/> in your web.config. You may also want to change the <authentication> element to be mode="Windows"...check with MSDN and or the ASP.NET forum for additional info/guidance on the specifics there, as I'm well outside my area of expertise on that point.

If you want all DB access to route through a single connection (I'm not entirely sure that's advisable, but your circumstances may dictate this) and/or as a single user (also not advisable...auditability of data written to the database would be compromised, so you wouldn't be able to determine who made a given change), you could continue to use Integrated Windows authentication on your web app but change the web.config to be:

<identity impersonate="false"/>

<authentication mode="Windows"/>

You'd then provide access to the SQL Server table via one of the server roles for the NT AUTHORITY\NETWORK SERVICE account. An example would be to use sp_addrolemember to add this account to public and grant public insert and update permissions on these tables (if it doesn't have them already).

There is a "How To" article on these options available at: http://msdn2.microsoft.com/en-us/library/ht43wsex(VS.80).aspx

Good luck,

Jason

Login failed for user 'NT AUTHORITY\NETWORK SERVICE'

I have:

(1) SQL 2005 on a member server, Windows Authentication

(2) I'm using Visual Studio.Net 2005 on my Windows XP sp2 work station.

(3) From my machine, within my development application, I have no problem accessing the Data in the SQL server.

(4) I Receive the Login Failed error after I copy my project to the Test Web Server (Same machine that houses SQL) and test from either my machine or from the host server.

More details of the error message are:

Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.

Source Error:


Line 33: DA = New SqlDataAdapter(sSql, CONN_STRING)
Line 34: DS = New DataSet
Line 35: DA.Fill(DS)
Line 36:
Line 37: Session("NameInquiry_DS") = DS

Source File: C:\Inetpub\wwwroot\nameinquiry\NameInquiry.aspx.vb Line: 35

The finished product is to be an Intranet site only; accessible by employees within our own private network.

The SQL is a new install with only test data.

What have I missed that is causing the permission problem? The event viewer shows a nonauthenticated user is causing the problem. But, how do I correct this?

Could you please post the connection string here and the part of the web.config file about impersonation (if any and not commented out). This is a configuration problem. Which user do you want to authenticate while connecting to the database ?

http://msdn2.microsoft.com/en-us/library/aa302377.aspx

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de|||

Hi, Terry

Try to read following article, they probably include solution to your problem:

1) http://support.microsoft.com/kb/316989/

2) https://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=348662&SiteID=17

3) http://msdn2.microsoft.com/en-us/library/ab4e6cky(vs.80).aspx

Good Luck!

Ming.

|||

Here is my connection string and the Web.Config.

What is confusing is that I have zero issues running the application within VS ASP.NET. It's only when I run the application outside the development software.

When I check the Event Viewer on the server that houses SQL, the login name is blank. That's why I believe I have a permissions error. I just don't have any idea what permissions to set. It doesn't matter which desktop I use, the connection fails. If I try to access the website from the Server it's housed using the administrator login, I still get the Login failed message.

<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">

<appSettings>
<add key="ConnStringer" Value="packet size=4096;Data Source=MYSERVER;Initial Catalog=MyDataBase;Integrated Security=True;"/>
</appSettings>

<connectionStrings>
<add name="myConnection" connectionString="server=MYSERVER;database=MyDataBase;Integrated Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
<authentication mode="Forms" />
<roleManager enabled="true" />
<compilation debug="true" strict="false" explicit="true"/>
<pages>
<namespaces>
<clear/>
<add namespace="System"/>
<add namespace="System.Collections"/>
<add namespace="System.Collections.Specialized"/>
<add namespace="System.Configuration"/>
<add namespace="System.Text"/>
<add namespace="System.Text.RegularExpressions"/>
<add namespace="System.Web"/>
<add namespace="System.Web.Caching"/>
<add namespace="System.Web.SessionState"/>
<add namespace="System.Web.Security"/>
<add namespace="System.Web.Profile"/>
<add namespace="System.Web.UI"/>
<add namespace="System.Web.UI.WebControls"/>
<add namespace="System.Web.UI.WebControls.WebParts"/>
<add namespace="System.Web.UI.HtmlControls"/>
</namespaces>
</pages>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.

<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>

-->

<anonymousIdentification enabled="true"/>
<profile enabled="true">
<properties>
<add name="myGroupID" allowAnonymous="true"/>
<add name="myUserID" allowAnonymous="true"/>
</properties>
</profile>


</system.web>
</configuration>

|||

Ming,

The articles were very informitive but none of the possible solutions resolved my problem.

In an earlier post, I stated that everything worked fine within my VS .NET application. I have since learned that as long as I view data only, it works. If I attempt to do any writes, the application fails. Therefore, I'm more convinced this is an authentication related issue. Now I'm asking the following questions as I try to locate and resolve this issue:

I have determined that NT AUTHORITY\NETWORK SERVICE is the default login when I run my application. Based on what I've read from the many web posts concerning Windows Authenticaion, this is normal. How do I control the default login name? Meaning, can this be changed? If so, How? Should it be changed? Can I set various permissions to the various SQL databases? If so, How?

|||

Are your client and server machine in WORKGROUP instead of domain? If so, can you try grant database login to "<machinename>\guest" see whether it works?

As for your questions that how to control default login name, it is more of ASP.NET configuration issue, such as you can change ASP.NET account( http://www.bluevisionsoftware.com/WebSite/TipsAndTricksDetails.aspx?Name=AspNetAccount)

or post your question in ASP.NET forum.

The workaround here is

1) Change your connection string to force tcp connection(adding prefix "tcp:" in DataSource field ).

2) Use SQL authentication.

Good Luck!

Ming.

|||


Hi,

using Anonymous authentication will make you able to use a single user connecting to the database. This uer has to be setup in the security tab of the website in the IIS configuration screen. If you want to use this combination, you will have to set the tag of the web.config to impersonate=true. This will let you use login procided within the IIS to access SQL Server. If you want to authenticate / impersonate the user which is currently accessing the web page, you will have to (assuming that the web server is on the same server as the SQl Server) disbal the anonymous access option in the IIS configuration dialog.

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

|||

I think that the 3rd of Ming's posts alludes to the potential problem and provides links to additional relevant info (and your hunch about authentication related issue would also be accurate). The most likely source of the problem, as Ming and Jens have pointed out, is impersonation.

NT AUTHORITY\NETWORK SERVICE is the account that IIS runs under on Windows Server 2003 and without any additional configuration, this is the account that will attempt to access whatever resources the web application needs. Since this is the account that is trying to access the database, it appears that the outbound attempt is not attempting the connection as the connected user. This is where the web.config settings that Jens mentioned come into play and there's a good synopsis of the options available on http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetAP05.asp (this looks identical to the link Jens posted earlier). You probably don't need or want IIS to run under a different account.

If you want each domain user to have a separate connection to the database, you will need to disable Anonymous Access and turn on Integrated Windows authentication (this would be on the Directory Security tab for the web site in IIS Manager). You'd then specify <identity impersonate="true"/> in your web.config. You may also want to change the <authentication> element to be mode="Windows"...check with MSDN and or the ASP.NET forum for additional info/guidance on the specifics there, as I'm well outside my area of expertise on that point.

If you want all DB access to route through a single connection (I'm not entirely sure that's advisable, but your circumstances may dictate this) and/or as a single user (also not advisable...auditability of data written to the database would be compromised, so you wouldn't be able to determine who made a given change), you could continue to use Integrated Windows authentication on your web app but change the web.config to be:

<identity impersonate="false"/>

<authentication mode="Windows"/>

You'd then provide access to the SQL Server table via one of the server roles for the NT AUTHORITY\NETWORK SERVICE account. An example would be to use sp_addrolemember to add this account to public and grant public insert and update permissions on these tables (if it doesn't have them already).

There is a "How To" article on these options available at: http://msdn2.microsoft.com/en-us/library/ht43wsex(VS.80).aspx

Good luck,

Jason

Wednesday, March 28, 2012

Login failed for user domain\domcontroller$ - 18456

I am running several instances of SQL Server 2005 sp2 on a W2k3 sp2 box (member server).

This morning, I installed reporting services to one of my instances and shortly after noticed I was getting the following two messages in my SQL Server log file:-

08/08/2007 11:05:03,Logon,Unknown,Login failed for user 'DOMAIN\DOMCONTROLLER$'. [CLIENT: xxx.xxx.xxx.xxx]
08/08/2007 11:05:03,Logon,Unknown,Error: 18456, Severity: 14, State: 16.

The above entries were each repeated 6 times every 15 minutes but with State 11. I created a logon for the above, and now get the above messages (state 16) repeated 3 times every 15 minutes!

Any ideas why?

Regards

Ian

It seems like a service in DOMCONTROLLER machine is trying to connect to SQL Server, it must be running under network service or local system account.

I recommend reading the following post, hopefully it will help you find the solution:

http://forums.microsoft.com/msdn/showpost.aspx?postid=66265&siteid=1

-Raul Garcia

SDE/T

SQL Server Engine

Monday, March 19, 2012

Login failed for ".

What am I missing? Computer A is windows xp sp2 with visual studio 2005. Computer B is Server2003 with SQLServer2005.

Computer A: local website directory security configured for anonymous access using a local user computer_A\username and password. The password is NOT managed by iIIS.

Computer B: SQLServer2005 allows local and remote connections, sql server and windows authentication. Local user computer_B\username and password is defined.

User computer_B\username is defined in the sql server security logins with login properties allowing access to database mydb. The default scheama db_owner. The database (mydb) properties/permissions/effective permissions are Authenticate, connect, delete,execute,insert,select and update.

The webconfig file has a connection string defined as:Name=LocalSqlServer Connection String=Data Source=server.domain-name,1433;Initial Catalog=mydb;Integrated Security=True;. The webconfig file contains <remove name="LocalSqlServer" and then an <add name="LocalSqlServer" with the above information. The webconfig file also has <identity impersonate="true" /> and <authentication mode="Forms">
<forms name=".ASPXFORMSAUTH" loginUrl="login.aspx" protection="Validation"/>
</authentication>
<authorization>
<deny users="?"/>
<allow users="*"/>
</authorization>

My login page manually reads a table called usrTbl via a stored proceedure to check for the existance of the username and password presented.(Yes I know it is in the clear-bad bad me, just bear with me for the problem). It then formsredirectfromlogin to the original requested page whice is Default.aspx.

Default.aspx has a gridview defined. The datasource is defined in the page load event as:

gridview1.datasource = membership.getallusers()

gridview1.databind()

I get an error Login failed for ". User not associated with a trusted connection

How can that be, the database has been access earlier with the same connection string. I checked to make sure user computer_B\username can log on to computer B.

Please help me to understand a solution to this

You may hit the same issue discussed in the following thread:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=285649&SiteID=1

Thanks
Laurentiu

|||

Not the same thing. I know my post was long, but i needed to provide the complete environment.

Failure is with different tables in the same database. I guess I failde to say the membership tables were created in the same database. Bottom Line Here.

Read database table fine, redirect to different page, failure reading same database.

WHY

|||

Pasting answer from usenet forum:

Hi Bill,

Welcome to use MSDN Managed Newsgroup Support.

From your description, my understanding is that, you can not config a web
application to connect to the remote SQL Server instance. If I
misunderstood your concern, please feel free to point it out.

Please use the following entry for the <identity> in web.config.

<identity impersonate="true" userName="computer_b\username"
password="password" />

Since you impersonated in your web application but you did not give a
credential to the application, so that, it will use the IIS account to
connect to the SQL Server. Of cause this will cause the login error.

Hope this will be helpful.

Sincerely,

Wei Lu
Microsoft Online Community 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.

Login failed - Error Number: 18456 - Severity: 14 - State: 1

Hi.
After re-installing Windows Vista on my PC, I can no longer log on to my
local SQL Server 2005 (SP2) (even though my account name is the same for
Vista). I can not even connect with a new query, so I can not update user
information or anything like that. It gives me this error:
Login failed for user 'Thomas-PC\Thomas'. (.Net SqlClient Data Provider)
For help, click:
[url]http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLS erver&EvtID=18456&LinkId=20476[/url]
Server Name: thomas-pc
Error Number: 18456
Severity: 14
State: 1
Line Number: 65536
Program Location:
at System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException
exception, Boolean breakConnection)
at
System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject
stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,
SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlInternalConnectionTds.Com pleteLogin(Boolean
enlistOK)
at
System.Data.SqlClient.SqlInternalConnectionTds.Att emptOneLogin(ServerInfo
serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64
timerExpire, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.Log inNoFailover(String
host, String newPassword, Boolean redirectedUserInstance, SqlConnection
owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
at
System.Data.SqlClient.SqlInternalConnectionTds.Ope nLoginEnlist(SqlConnection
owningObject, SqlConnectionString connectionOptions, String newPassword,
Boolean redirectedUserInstance)
at
System.Data.SqlClient.SqlInternalConnectionTds..ct or(DbConnectionPoolIdentity
identity, SqlConnectionString connectionOptions, Object providerInfo, String
newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at
System.Data.SqlClient.SqlConnectionFactory.CreateC onnection(DbConnectionOptions
options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningConnection)
at
System.Data.ProviderBase.DbConnectionFactory.Creat eNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
at
System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection
owningConnection)
at
System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at
Microsoft.SqlServer.Management.UI.ConnectionDlg.Ne wRegisteredServerForm.testConnection_Click(Object sender, EventArgs e)
Unfortunately the link provided above for more help takes me to a page that
does not exist.
I did try to uninstall the SQL Server 2005 and re-install it again but
without any difference.
I can connect to servers on other servers, but as I mentioned not my local
SQL server.
Thanks for your advise/help,
Thomas
Can you connect if you launch SSMS with "run as Administrator"? If so, add
your Windows login to the sysadmin role so that you don't need to run with
elevated privileges , except when managing services.
Hope this helps.
Dan Guzman
SQL Server MVP
"Thomas Vang" <Thomas Vang@.discussions.microsoft.com> wrote in message
news:6DD3607B-2A9B-4C69-BBBD-61ADA479D211@.microsoft.com...
> Hi.
> After re-installing Windows Vista on my PC, I can no longer log on to my
> local SQL Server 2005 (SP2) (even though my account name is the same for
> Vista). I can not even connect with a new query, so I can not update user
> information or anything like that. It gives me this error:
> Login failed for user 'Thomas-PC\Thomas'. (.Net SqlClient Data Provider)
> --
> For help, click:
> [url]http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLS erver&EvtID=18456&LinkId=20476[/url]
> --
> Server Name: thomas-pc
> Error Number: 18456
> Severity: 14
> State: 1
> Line Number: 65536
> --
> Program Location:
> at System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException
> exception, Boolean breakConnection)
> at
> System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject
> stateObj)
> at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,
> SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
> bulkCopyHandler, TdsParserStateObject stateObj)
> at System.Data.SqlClient.SqlInternalConnectionTds.Com pleteLogin(Boolean
> enlistOK)
> at
> System.Data.SqlClient.SqlInternalConnectionTds.Att emptOneLogin(ServerInfo
> serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64
> timerExpire, SqlConnection owningObject)
> at System.Data.SqlClient.SqlInternalConnectionTds.Log inNoFailover(String
> host, String newPassword, Boolean redirectedUserInstance, SqlConnection
> owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
> at
> System.Data.SqlClient.SqlInternalConnectionTds.Ope nLoginEnlist(SqlConnection
> owningObject, SqlConnectionString connectionOptions, String newPassword,
> Boolean redirectedUserInstance)
> at
> System.Data.SqlClient.SqlInternalConnectionTds..ct or(DbConnectionPoolIdentity
> identity, SqlConnectionString connectionOptions, Object providerInfo,
> String
> newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
> at
> System.Data.SqlClient.SqlConnectionFactory.CreateC onnection(DbConnectionOptions
> options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
> owningConnection)
> at
> System.Data.ProviderBase.DbConnectionFactory.Creat eNonPooledConnection(DbConnection
> owningConnection, DbConnectionPoolGroup poolGroup)
> at
> System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection
> owningConnection)
> at
> System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection
> outerConnection, DbConnectionFactory connectionFactory)
> at System.Data.SqlClient.SqlConnection.Open()
> at
> Microsoft.SqlServer.Management.UI.ConnectionDlg.Ne wRegisteredServerForm.testConnection_Click(Object
> sender, EventArgs e)
> Unfortunately the link provided above for more help takes me to a page
> that
> does not exist.
> I did try to uninstall the SQL Server 2005 and re-install it again but
> without any difference.
> I can connect to servers on other servers, but as I mentioned not my local
> SQL server.
> Thanks for your advise/help,
> Thomas
|||Dan - You' da man !!! Thanks a lot. Yes, I could launch SSMS as
asministrator, and added my windows login and not everything's just fine.
I really appreciate your help and thank you once again.
Best regards and have a nice day,
Thomas
"Dan Guzman" wrote:

> Can you connect if you launch SSMS with "run as Administrator"? If so, add
> your Windows login to the sysadmin role so that you don't need to run with
> elevated privileges , except when managing services.
>
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Thomas Vang" <Thomas Vang@.discussions.microsoft.com> wrote in message
> news:6DD3607B-2A9B-4C69-BBBD-61ADA479D211@.microsoft.com...
>
|||I'm glad I was able to help you out, Thomas. IIRC, the SP2 install can also
add logins to the sysadmin role so you don't need to do it manually.
Hope this helps.
Dan Guzman
SQL Server MVP
"Thomas Vang" <ThomasVang@.discussions.microsoft.com> wrote in message
news:978F3942-1196-4598-865E-A7A68295A4CD@.microsoft.com...[vbcol=seagreen]
> Dan - You' da man !!! Thanks a lot. Yes, I could launch SSMS as
> asministrator, and added my windows login and not everything's just fine.
> I really appreciate your help and thank you once again.
> Best regards and have a nice day,
> Thomas
>
> "Dan Guzman" wrote:

Login failed - Error Number: 18456 - Severity: 14 - State: 1

Hi.
After re-installing Windows Vista on my PC, I can no longer log on to my
local SQL Server 2005 (SP2) (even though my account name is the same for
Vista). I can not even connect with a new query, so I can not update user
information or anything like that. It gives me this error:
Login failed for user 'Thomas-PC\Thomas'. (.Net SqlClient Data Provider)
--
For help, click:
http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=18456&LinkId=20476
--
Server Name: thomas-pc
Error Number: 18456
Severity: 14
State: 1
Line Number: 65536
--
Program Location:
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
exception, Boolean breakConnection)
at
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,
SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean
enlistOK)
at
System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo
serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64
timerExpire, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String
host, String newPassword, Boolean redirectedUserInstance, SqlConnection
owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
at
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
owningObject, SqlConnectionString connectionOptions, String newPassword,
Boolean redirectedUserInstance)
at
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity
identity, SqlConnectionString connectionOptions, Object providerInfo, String
newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions
options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningConnection)
at
System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
at
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
owningConnection)
at
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at
Microsoft.SqlServer.Management.UI.ConnectionDlg.NewRegisteredServerForm.testConnection_Click(Object sender, EventArgs e)
Unfortunately the link provided above for more help takes me to a page that
does not exist.
I did try to uninstall the SQL Server 2005 and re-install it again but
without any difference.
I can connect to servers on other servers, but as I mentioned not my local
SQL server.
Thanks for your advise/help,
ThomasCan you connect if you launch SSMS with "run as Administrator"? If so, add
your Windows login to the sysadmin role so that you don't need to run with
elevated privileges , except when managing services.
Hope this helps.
Dan Guzman
SQL Server MVP
"Thomas Vang" <Thomas Vang@.discussions.microsoft.com> wrote in message
news:6DD3607B-2A9B-4C69-BBBD-61ADA479D211@.microsoft.com...
> Hi.
> After re-installing Windows Vista on my PC, I can no longer log on to my
> local SQL Server 2005 (SP2) (even though my account name is the same for
> Vista). I can not even connect with a new query, so I can not update user
> information or anything like that. It gives me this error:
> Login failed for user 'Thomas-PC\Thomas'. (.Net SqlClient Data Provider)
> --
> For help, click:
> http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=18456&LinkId=20476
> --
> Server Name: thomas-pc
> Error Number: 18456
> Severity: 14
> State: 1
> Line Number: 65536
> --
> Program Location:
> at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
> exception, Boolean breakConnection)
> at
> System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
> stateObj)
> at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,
> SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
> bulkCopyHandler, TdsParserStateObject stateObj)
> at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean
> enlistOK)
> at
> System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo
> serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64
> timerExpire, SqlConnection owningObject)
> at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String
> host, String newPassword, Boolean redirectedUserInstance, SqlConnection
> owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
> at
> System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
> owningObject, SqlConnectionString connectionOptions, String newPassword,
> Boolean redirectedUserInstance)
> at
> System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity
> identity, SqlConnectionString connectionOptions, Object providerInfo,
> String
> newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
> at
> System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions
> options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
> owningConnection)
> at
> System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection
> owningConnection, DbConnectionPoolGroup poolGroup)
> at
> System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
> owningConnection)
> at
> System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
> outerConnection, DbConnectionFactory connectionFactory)
> at System.Data.SqlClient.SqlConnection.Open()
> at
> Microsoft.SqlServer.Management.UI.ConnectionDlg.NewRegisteredServerForm.testConnection_Click(Object
> sender, EventArgs e)
> Unfortunately the link provided above for more help takes me to a page
> that
> does not exist.
> I did try to uninstall the SQL Server 2005 and re-install it again but
> without any difference.
> I can connect to servers on other servers, but as I mentioned not my local
> SQL server.
> Thanks for your advise/help,
> Thomas|||Dan - You' da man !!! Thanks a lot. Yes, I could launch SSMS as
asministrator, and added my windows login and not everything's just fine.
I really appreciate your help and thank you once again.
Best regards and have a nice day,
Thomas
"Dan Guzman" wrote:
> Can you connect if you launch SSMS with "run as Administrator"? If so, add
> your Windows login to the sysadmin role so that you don't need to run with
> elevated privileges , except when managing services.
>
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Thomas Vang" <Thomas Vang@.discussions.microsoft.com> wrote in message
> news:6DD3607B-2A9B-4C69-BBBD-61ADA479D211@.microsoft.com...
> > Hi.
> >
> > After re-installing Windows Vista on my PC, I can no longer log on to my
> > local SQL Server 2005 (SP2) (even though my account name is the same for
> > Vista). I can not even connect with a new query, so I can not update user
> > information or anything like that. It gives me this error:
> >
> > Login failed for user 'Thomas-PC\Thomas'. (.Net SqlClient Data Provider)
> >
> > --
> > For help, click:
> > http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=18456&LinkId=20476
> >
> > --
> > Server Name: thomas-pc
> > Error Number: 18456
> > Severity: 14
> > State: 1
> > Line Number: 65536
> >
> > --
> > Program Location:
> >
> > at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
> > exception, Boolean breakConnection)
> > at
> > System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
> > stateObj)
> > at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,
> > SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
> > bulkCopyHandler, TdsParserStateObject stateObj)
> > at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean
> > enlistOK)
> > at
> > System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo
> > serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64
> > timerExpire, SqlConnection owningObject)
> > at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String
> > host, String newPassword, Boolean redirectedUserInstance, SqlConnection
> > owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
> > at
> > System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
> > owningObject, SqlConnectionString connectionOptions, String newPassword,
> > Boolean redirectedUserInstance)
> > at
> > System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity
> > identity, SqlConnectionString connectionOptions, Object providerInfo,
> > String
> > newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
> > at
> > System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions
> > options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
> > owningConnection)
> > at
> > System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection
> > owningConnection, DbConnectionPoolGroup poolGroup)
> > at
> > System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
> > owningConnection)
> > at
> > System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
> > outerConnection, DbConnectionFactory connectionFactory)
> > at System.Data.SqlClient.SqlConnection.Open()
> > at
> > Microsoft.SqlServer.Management.UI.ConnectionDlg.NewRegisteredServerForm.testConnection_Click(Object
> > sender, EventArgs e)
> >
> > Unfortunately the link provided above for more help takes me to a page
> > that
> > does not exist.
> > I did try to uninstall the SQL Server 2005 and re-install it again but
> > without any difference.
> > I can connect to servers on other servers, but as I mentioned not my local
> > SQL server.
> >
> > Thanks for your advise/help,
> > Thomas
>|||I'm glad I was able to help you out, Thomas. IIRC, the SP2 install can also
add logins to the sysadmin role so you don't need to do it manually.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Thomas Vang" <ThomasVang@.discussions.microsoft.com> wrote in message
news:978F3942-1196-4598-865E-A7A68295A4CD@.microsoft.com...
> Dan - You' da man !!! Thanks a lot. Yes, I could launch SSMS as
> asministrator, and added my windows login and not everything's just fine.
> I really appreciate your help and thank you once again.
> Best regards and have a nice day,
> Thomas
>
> "Dan Guzman" wrote:
>> Can you connect if you launch SSMS with "run as Administrator"? If so,
>> add
>> your Windows login to the sysadmin role so that you don't need to run
>> with
>> elevated privileges , except when managing services.
>>
>> --
>> Hope this helps.
>> Dan Guzman
>> SQL Server MVP
>> "Thomas Vang" <Thomas Vang@.discussions.microsoft.com> wrote in message
>> news:6DD3607B-2A9B-4C69-BBBD-61ADA479D211@.microsoft.com...
>> > Hi.
>> >
>> > After re-installing Windows Vista on my PC, I can no longer log on to
>> > my
>> > local SQL Server 2005 (SP2) (even though my account name is the same
>> > for
>> > Vista). I can not even connect with a new query, so I can not update
>> > user
>> > information or anything like that. It gives me this error:
>> >
>> > Login failed for user 'Thomas-PC\Thomas'. (.Net SqlClient Data
>> > Provider)
>> >
>> > --
>> > For help, click:
>> > http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=18456&LinkId=20476
>> >
>> > --
>> > Server Name: thomas-pc
>> > Error Number: 18456
>> > Severity: 14
>> > State: 1
>> > Line Number: 65536
>> >
>> > --
>> > Program Location:
>> >
>> > at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
>> > exception, Boolean breakConnection)
>> > at
>> > System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
>> > stateObj)
>> > at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,
>> > SqlCommand cmdHandler, SqlDataReader dataStream,
>> > BulkCopySimpleResultSet
>> > bulkCopyHandler, TdsParserStateObject stateObj)
>> > at
>> > System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean
>> > enlistOK)
>> > at
>> > System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo
>> > serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64
>> > timerExpire, SqlConnection owningObject)
>> > at
>> > System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String
>> > host, String newPassword, Boolean redirectedUserInstance, SqlConnection
>> > owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
>> > at
>> > System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
>> > owningObject, SqlConnectionString connectionOptions, String
>> > newPassword,
>> > Boolean redirectedUserInstance)
>> > at
>> > System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity
>> > identity, SqlConnectionString connectionOptions, Object providerInfo,
>> > String
>> > newPassword, SqlConnection owningObject, Boolean
>> > redirectedUserInstance)
>> > at
>> > System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions
>> > options, Object poolGroupProviderInfo, DbConnectionPool pool,
>> > DbConnection
>> > owningConnection)
>> > at
>> > System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection
>> > owningConnection, DbConnectionPoolGroup poolGroup)
>> > at
>> > System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
>> > owningConnection)
>> > at
>> > System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
>> > outerConnection, DbConnectionFactory connectionFactory)
>> > at System.Data.SqlClient.SqlConnection.Open()
>> > at
>> > Microsoft.SqlServer.Management.UI.ConnectionDlg.NewRegisteredServerForm.testConnection_Click(Object
>> > sender, EventArgs e)
>> >
>> > Unfortunately the link provided above for more help takes me to a page
>> > that
>> > does not exist.
>> > I did try to uninstall the SQL Server 2005 and re-install it again but
>> > without any difference.
>> > I can connect to servers on other servers, but as I mentioned not my
>> > local
>> > SQL server.
>> >
>> > Thanks for your advise/help,
>> > Thomas
>>|||Thanks Dan! This helped with me running into issues when trying to restart
my SQL Server 2005 Developer Edition instance on Vista Business and failing
due to authentication issues, even though I am an administrator on my
workstation.
Laurence
"Dan Guzman" wrote:
> Can you connect if you launch SSMS with "run as Administrator"? If so, add
> your Windows login to the sysadmin role so that you don't need to run with
> elevated privileges , except when managing services.
>
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Thomas Vang" <Thomas Vang@.discussions.microsoft.com> wrote in message
> news:6DD3607B-2A9B-4C69-BBBD-61ADA479D211@.microsoft.com...
> > Hi.
> >
> > After re-installing Windows Vista on my PC, I can no longer log on to my
> > local SQL Server 2005 (SP2) (even though my account name is the same for
> > Vista). I can not even connect with a new query, so I can not update user
> > information or anything like that. It gives me this error:
> >
> > Login failed for user 'Thomas-PC\Thomas'. (.Net SqlClient Data Provider)
> >
> > --
> > For help, click:
> > http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=18456&LinkId=20476
> >
> > --
> > Server Name: thomas-pc
> > Error Number: 18456
> > Severity: 14
> > State: 1
> > Line Number: 65536
> >
> > --
> > Program Location:
> >
> > at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
> > exception, Boolean breakConnection)
> > at
> > System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
> > stateObj)
> > at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,
> > SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
> > bulkCopyHandler, TdsParserStateObject stateObj)
> > at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean
> > enlistOK)
> > at
> > System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo
> > serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64
> > timerExpire, SqlConnection owningObject)
> > at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String
> > host, String newPassword, Boolean redirectedUserInstance, SqlConnection
> > owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
> > at
> > System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
> > owningObject, SqlConnectionString connectionOptions, String newPassword,
> > Boolean redirectedUserInstance)
> > at
> > System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity
> > identity, SqlConnectionString connectionOptions, Object providerInfo,
> > String
> > newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
> > at
> > System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions
> > options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
> > owningConnection)
> > at
> > System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection
> > owningConnection, DbConnectionPoolGroup poolGroup)
> > at
> > System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
> > owningConnection)
> > at
> > System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
> > outerConnection, DbConnectionFactory connectionFactory)
> > at System.Data.SqlClient.SqlConnection.Open()
> > at
> > Microsoft.SqlServer.Management.UI.ConnectionDlg.NewRegisteredServerForm.testConnection_Click(Object
> > sender, EventArgs e)
> >
> > Unfortunately the link provided above for more help takes me to a page
> > that
> > does not exist.
> > I did try to uninstall the SQL Server 2005 and re-install it again but
> > without any difference.
> > I can connect to servers on other servers, but as I mentioned not my local
> > SQL server.
> >
> > Thanks for your advise/help,
> > Thomas
>

Login failed - Error Number: 18456 - Severity: 14 - State: 1

Hi.
After re-installing Windows Vista on my PC, I can no longer log on to my
local SQL Server 2005 (SP2) (even though my account name is the same for
Vista). I can not even connect with a new query, so I can not update user
information or anything like that. It gives me this error:
Login failed for user 'Thomas-PC\Thomas'. (.Net SqlClient Data Provider)
For help, click:
http://go.microsoft.com/fwlink?Prod...56&LinkId=20476
Server Name: thomas-pc
Error Number: 18456
Severity: 14
State: 1
Line Number: 65536
Program Location:
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
exception, Boolean breakConnection)
at
System.Data.SqlClient.TdsParser. ThrowExceptionAndWarning(TdsParserStateO
bjec
t
stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,
SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean
enlistOK)
at
System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo
serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64
timerExpire, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String
host, String newPassword, Boolean redirectedUserInstance, SqlConnection
owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
at
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
owningObject, SqlConnectionString connectionOptions, String newPassword,
Boolean redirectedUserInstance)
at
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentit
y
identity, SqlConnectionString connectionOptions, Object providerInfo, String
newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOpti
ons
options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningConnection)
at
System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbCon
nection owningConnection, DbConnectionPoolGroup poolGroup)
at
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
owningConnection)
at
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at
Microsoft.SqlServer.Management.UI.ConnectionDlg.NewRegisteredServerForm.test
Connection_Click(Object sender, EventArgs e)
Unfortunately the link provided above for more help takes me to a page that
does not exist.
I did try to uninstall the SQL Server 2005 and re-install it again but
without any difference.
I can connect to servers on other servers, but as I mentioned not my local
SQL server.
Thanks for your advise/help,
ThomasCan you connect if you launch SSMS with "run as Administrator"? If so, add
your Windows login to the sysadmin role so that you don't need to run with
elevated privileges , except when managing services.
Hope this helps.
Dan Guzman
SQL Server MVP
"Thomas Vang" <Thomas Vang@.discussions.microsoft.com> wrote in message
news:6DD3607B-2A9B-4C69-BBBD-61ADA479D211@.microsoft.com...
> Hi.
> After re-installing Windows Vista on my PC, I can no longer log on to my
> local SQL Server 2005 (SP2) (even though my account name is the same for
> Vista). I can not even connect with a new query, so I can not update user
> information or anything like that. It gives me this error:
> Login failed for user 'Thomas-PC\Thomas'. (.Net SqlClient Data Provider)
> --
> For help, click:
> http://go.microsoft.com/fwlink?Prod...56&LinkId=20476
> --
> Server Name: thomas-pc
> Error Number: 18456
> Severity: 14
> State: 1
> Line Number: 65536
> --
> Program Location:
> at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
> exception, Boolean breakConnection)
> at
> System.Data.SqlClient.TdsParser. ThrowExceptionAndWarning(TdsParserStateO
bj
ect
> stateObj)
> at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,
> SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
> bulkCopyHandler, TdsParserStateObject stateObj)
> at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean
> enlistOK)
> at
> System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo
> serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64
> timerExpire, SqlConnection owningObject)
> at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String
> host, String newPassword, Boolean redirectedUserInstance, SqlConnection
> owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
> at
> System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnecti
on
> owningObject, SqlConnectionString connectionOptions, String newPassword,
> Boolean redirectedUserInstance)
> at
> System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdent
ity
> identity, SqlConnectionString connectionOptions, Object providerInfo,
> String
> newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
> at
> System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOp
tions
> options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
> owningConnection)
> at
> System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC
onnection
> owningConnection, DbConnectionPoolGroup poolGroup)
> at
> System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
> owningConnection)
> at
> System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
> outerConnection, DbConnectionFactory connectionFactory)
> at System.Data.SqlClient.SqlConnection.Open()
> at
> Microsoft.SqlServer.Management.UI.ConnectionDlg.NewRegisteredServerForm.te
stConnection_Click(Object
> sender, EventArgs e)
> Unfortunately the link provided above for more help takes me to a page
> that
> does not exist.
> I did try to uninstall the SQL Server 2005 and re-install it again but
> without any difference.
> I can connect to servers on other servers, but as I mentioned not my local
> SQL server.
> Thanks for your advise/help,
> Thomas|||Dan - You' da man !!! Thanks a lot. Yes, I could launch SSMS as
asministrator, and added my windows login and not everything's just fine.
I really appreciate your help and thank you once again.
Best regards and have a nice day,
Thomas
"Dan Guzman" wrote:

> Can you connect if you launch SSMS with "run as Administrator"? If so, ad
d
> your Windows login to the sysadmin role so that you don't need to run with
> elevated privileges , except when managing services.
>
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Thomas Vang" <Thomas Vang@.discussions.microsoft.com> wrote in message
> news:6DD3607B-2A9B-4C69-BBBD-61ADA479D211@.microsoft.com...
>|||I'm glad I was able to help you out, Thomas. IIRC, the SP2 install can also
add logins to the sysadmin role so you don't need to do it manually.
Hope this helps.
Dan Guzman
SQL Server MVP
"Thomas Vang" <ThomasVang@.discussions.microsoft.com> wrote in message
news:978F3942-1196-4598-865E-A7A68295A4CD@.microsoft.com...[vbcol=seagreen]
> Dan - You' da man !!! Thanks a lot. Yes, I could launch SSMS as
> asministrator, and added my windows login and not everything's just fine.
> I really appreciate your help and thank you once again.
> Best regards and have a nice day,
> Thomas
>
> "Dan Guzman" wrote:
>