Showing posts with label studio. Show all posts
Showing posts with label studio. Show all posts

Thursday, March 29, 2012

Error 18456 State 6

Hi,

I am trying to connect to a remote SQL server via Management Studio. I am using the windows credentials I use to log into the computer but when I enter the same domain\username and password I get error 18456. I check the logs and see it is a state 6 error. After checking http://blogs.msdn.com/sql_protocols/archive/2006/02/21/536201.aspx I see that means

Attempt to use a Windows login name with SQL Authentication

Is it possible for me to access a SQL server remotely?

Thanks

From your description, I would assume that you chose “SQL Server Authentication” and provided a user name that was a Windows user name, correct? “SQL Server Authentication” is used only for principals whose information is completely under the control of the SQL Server instance (i.e. the SID, login and password are only valid to SQL Server).

When using Windows authentication the server will use the Windows token from your client program (in this case Management Studio) to authenticate the connection, without the need to type any login or password.

When you connect to SQL Server using Management Studio, make sure you choose the option “Windows Authentication” for the “Authentication” value, the user name and password fields should be grayed out.

I hope this helps, but let us know if you still have any questions.

-Raul Garcia

SDE/T

SQL Server Engine

sql

Tuesday, March 27, 2012

Error 18452 (not associated with a trusted sql server connection)

Using sql2005 on a Novell network...

When attempting to log into Mgt Studio using windows authentication I am getting the error: Error 18452 (not associated with a trusted sql server connection) .

I added my domain\userName in sql with no problems and added the account to the sysadmin server role. However, I noticed my credentials on my pc are not listed as domain\userName but rather ComputerName\UserName. I think this is what is causing the problem but I am not sure. Can anyone lend a hand?

I'd appreciate any help,

Thanks.

Scott

Can you please post the exact error message from the SQL Server errorlog including the number and state of the error?

Also, to get additional information, please connect the SQL Server Profiler and monitor the Audit Login and Audit Login Failed events in the Security category. Check to see what are the credentials that appear for the login attempt.

You'll probably not be able to login anyway if your credentials are different from the ones you specified in SQL Server, but I would expect to see a different error in that case.

Thanks
Laurentiu

|||

Hi,

switch on the login audits at SQL Server to see which user tries to logon to the server.


HTH, Jens Suessmeyer.


http://www.sqlserver2005.de

|||

Hi

I am having similar issue.

When using Management Studio, XP clients can connect using widows authentication but windows 2000 clients cannot connect using windows authentication.

Both XP and win2000 can connect using SQL Server authentication.

It replaces my domain name with the workstation number and tries to connect using workstation\user_id rather than domain_name\user_id.

I ran a profiler and this is what I got:

login failed fo ruser ' '. This user is not associated with a trusted SQL Server connection.

|||

Are all your machines in the same domain or are they in different domains?

Thanks
Laurentiu

|||

Hi

These are all part of the same domain....

Thanks

|||

This is strange - it should work without any problems if the machines are in the same domain and you attempt to connect as a domain user. Are you only seeing this issue with SQL Server? Can you access shares that are exclusively ACLed to a domain user from these 2000 machines?

Thanks
Laurentiu

|||

I am getting the same problem.

MachineA:
Windows XP Pro.
SQL Server 2005, Standard Edition
Machine on Domain XXX
User XXX\User1 is added to Administrators group

MachineB:
Windows XP Pro.
SQL Server 2005, Developer Edition
Machine on Domain XXX
User XXX\User1 is added to Adminitrators group

User1 logs onto MachineA and uses SQL Managment Studio to connect to database engine on MachineA (Local SQL Server), everything works. Then tries to connect to database engine on MachineB everything works.

User1 logs onto MachineB and uses SQL Managment Studio to connect to database engine on MachineB (local SQL Server), everything works. Then tries to connect to database engine on MachineA (remote SQL Server) fails with error:
Login failed for user ''. The user is not associated with a trusted SQL Server connection. (Microsorft SQL Server, Error: 18452)

I have run the SQL Server Surface Area Configuration on both machines and tried to configure them exactly the same.

I have checked Name resolution on both machines, no issues found. I can connect to other resources (\\MachineA\C$ works from MachineB and \\MachineB\C$ works from MachineA).

I am going to try to install the Developer edition on Machine A to see if there is a difference, but I somehow don't think that it will make a difference...

Luis

|||

The Edition shouldn't make any difference. I don't know a reason for this behavior. Please open a bug by filling a report on the Product Feedback site at http://connect.microsoft.com/Main/content/content.aspx?ContentID=2220 and we'll continue from there.

Thanks
Laurentiu

|||

Hi...I developed a small application using delphi to run queries on a SQL Server machine. This application worked well on my PC and via the network when I set the database name and server name.

However, as I tried to make this application work on another SQL Server Machine (which has the same database and I have modified the server name in the Install Express)...I get an error

"...not associated with trusted SQL connection"

then goes on to reference my Database object in the data module of the application...

I tried almost everything from hard-coding a username and password in the Database object in the application...to no avail.

Thanks again.

Blackwidow25

|||

Have you checked if the other SQL Server machine is using mixed mode authentication?

If it does, try troubleshooting the SQL authentication using Management Studio or sqlcmd.

Thanks
Laurentiu

|||I get the exact same problem running the command "sqlcmd -E -S <RealIPAddressOrFullyQualifiedHostnameOfLocalHost>" (eg: "sqlcmd -E -S myhost.mydomain.com") on a clean machine where SQL Server 2005 Standard Edition has just been installed with mixed authentication and TCP/IP protocol enabled. The command however works if the local IP address 127.0.0.1, or the local hostname without the domain is being used. This command also works: "sqlcmd -E -S tcp:myhost". Any idea?|||

I think Laurentiu is right, I have found an article from IBM website:

"....Solution
To resolve this issue, follow the instructions to set User Authentication.
SQL Server 2000:

Go to Start > Programs > Microsoft SQL Server > Enterprise Manager
Right-click the Server name, select Properties > Security
Under Authentication, select SQL Server and Windows
The server must be stopped and re-started before this will take effect


SQL Server 2005:

Go to Start > Programs > Microsoft SQL Server 2005 > SQL Server Management Studio
Right-click the Server name, select Properties > Security
Under Server Authentication, select SQL Server and Windows Authentication Mode
The server must be stopped and re-started before this will take effect..."

http://www-1.ibm.com/support/docview.wss?uid=swg21119906

It has solved my problem, so I hope it could be helpful for you too.

|||

I am also had these same problem and struggled for long period. Finally I got these forum and succeeded. Thank you very much.

Regards,

Jose

|||

I had the same message when trying to connect to a SQL 2005 instance through Windows authentication.

The client was written is VB 2005 and used OLEDB client access (not the SQL native client!)

Switching the server to both SQL and Windows authentication did not solve the problem.

I checked different parameters for the connection string and, finally, found the next one that works:

'Connection information to connect to the database server to retrieve data

'This is connecting to SQL server through OLEDB

Dim ConnectionString As String = ""

ConnectionString = "Provider=SQLNCLI;"

ConnectionString += "Server=YourServerName;Database=YourDatabaseName;"

ConnectionString += "Integrated Security=SSPI;"

Important to note that Integrated Security=True; does not work.

Horia

Error 18452 (not associated with a trusted sql server connection)

Using sql2005 on a Novell network...

When attempting to log into Mgt Studio using windows authentication I am getting the error: Error 18452 (not associated with a trusted sql server connection) .

I added my domain\userName in sql with no problems and added the account to the sysadmin server role. However, I noticed my credentials on my pc are not listed as domain\userName but rather ComputerName\UserName. I think this is what is causing the problem but I am not sure. Can anyone lend a hand?

I'd appreciate any help,

Thanks.

Scott

Can you please post the exact error message from the SQL Server errorlog including the number and state of the error?

Also, to get additional information, please connect the SQL Server Profiler and monitor the Audit Login and Audit Login Failed events in the Security category. Check to see what are the credentials that appear for the login attempt.

You'll probably not be able to login anyway if your credentials are different from the ones you specified in SQL Server, but I would expect to see a different error in that case.

Thanks
Laurentiu

|||

Hi,

switch on the login audits at SQL Server to see which user tries to logon to the server.


HTH, Jens Suessmeyer.


http://www.sqlserver2005.de

|||

Hi

I am having similar issue.

When using Management Studio, XP clients can connect using widows authentication but windows 2000 clients cannot connect using windows authentication.

Both XP and win2000 can connect using SQL Server authentication.

It replaces my domain name with the workstation number and tries to connect using workstation\user_id rather than domain_name\user_id.

I ran a profiler and this is what I got:

login failed fo ruser ' '. This user is not associated with a trusted SQL Server connection.

|||

Are all your machines in the same domain or are they in different domains?

Thanks
Laurentiu

|||

Hi

These are all part of the same domain....

Thanks

|||

This is strange - it should work without any problems if the machines are in the same domain and you attempt to connect as a domain user. Are you only seeing this issue with SQL Server? Can you access shares that are exclusively ACLed to a domain user from these 2000 machines?

Thanks
Laurentiu

|||

I am getting the same problem.

MachineA:
Windows XP Pro.
SQL Server 2005, Standard Edition
Machine on Domain XXX
User XXX\User1 is added to Administrators group

MachineB:
Windows XP Pro.
SQL Server 2005, Developer Edition
Machine on Domain XXX
User XXX\User1 is added to Adminitrators group

User1 logs onto MachineA and uses SQL Managment Studio to connect to database engine on MachineA (Local SQL Server), everything works. Then tries to connect to database engine on MachineB everything works.

User1 logs onto MachineB and uses SQL Managment Studio to connect to database engine on MachineB (local SQL Server), everything works. Then tries to connect to database engine on MachineA (remote SQL Server) fails with error:
Login failed for user ''. The user is not associated with a trusted SQL Server connection. (Microsorft SQL Server, Error: 18452)

I have run the SQL Server Surface Area Configuration on both machines and tried to configure them exactly the same.

I have checked Name resolution on both machines, no issues found. I can connect to other resources (\\MachineA\C$ works from MachineB and \\MachineB\C$ works from MachineA).

I am going to try to install the Developer edition on Machine A to see if there is a difference, but I somehow don't think that it will make a difference...

Luis

|||

The Edition shouldn't make any difference. I don't know a reason for this behavior. Please open a bug by filling a report on the Product Feedback site at http://connect.microsoft.com/Main/content/content.aspx?ContentID=2220 and we'll continue from there.

Thanks
Laurentiu

|||

Hi...I developed a small application using delphi to run queries on a SQL Server machine. This application worked well on my PC and via the network when I set the database name and server name.

However, as I tried to make this application work on another SQL Server Machine (which has the same database and I have modified the server name in the Install Express)...I get an error

"...not associated with trusted SQL connection"

then goes on to reference my Database object in the data module of the application...

I tried almost everything from hard-coding a username and password in the Database object in the application...to no avail.

Thanks again.

Blackwidow25

|||

Have you checked if the other SQL Server machine is using mixed mode authentication?

If it does, try troubleshooting the SQL authentication using Management Studio or sqlcmd.

Thanks
Laurentiu

|||I get the exact same problem running the command "sqlcmd -E -S <RealIPAddressOrFullyQualifiedHostnameOfLocalHost>" (eg: "sqlcmd -E -S myhost.mydomain.com") on a clean machine where SQL Server 2005 Standard Edition has just been installed with mixed authentication and TCP/IP protocol enabled. The command however works if the local IP address 127.0.0.1, or the local hostname without the domain is being used. This command also works: "sqlcmd -E -S tcp:myhost". Any idea?|||

I think Laurentiu is right, I have found an article from IBM website:

"....Solution
To resolve this issue, follow the instructions to set User Authentication.
SQL Server 2000:

Go to Start > Programs > Microsoft SQL Server > Enterprise Manager
Right-click the Server name, select Properties > Security
Under Authentication, select SQL Server and Windows
The server must be stopped and re-started before this will take effect


SQL Server 2005:

Go to Start > Programs > Microsoft SQL Server 2005 > SQL Server Management Studio
Right-click the Server name, select Properties > Security
Under Server Authentication, select SQL Server and Windows Authentication Mode
The server must be stopped and re-started before this will take effect..."

http://www-1.ibm.com/support/docview.wss?uid=swg21119906

It has solved my problem, so I hope it could be helpful for you too.

|||

I am also had these same problem and struggled for long period. Finally I got these forum and succeeded. Thank you very much.

Regards,

Jose

|||

I had the same message when trying to connect to a SQL 2005 instance through Windows authentication.

The client was written is VB 2005 and used OLEDB client access (not the SQL native client!)

Switching the server to both SQL and Windows authentication did not solve the problem.

I checked different parameters for the connection string and, finally, found the next one that works:

'Connection information to connect to the database server to retrieve data

'This is connecting to SQL server through OLEDB

Dim ConnectionString As String = ""

ConnectionString = "Provider=SQLNCLI;"

ConnectionString += "Server=YourServerName;Database=YourDatabaseName;"

ConnectionString += "Integrated Security=SSPI;"

Important to note that Integrated Security=True; does not work.

Horia

Error 18452 (not associated with a trusted sql server connection)

Using sql2005 on a Novell network...

When attempting to log into Mgt Studio using windows authentication I am getting the error: Error 18452 (not associated with a trusted sql server connection) .

I added my domain\userName in sql with no problems and added the account to the sysadmin server role. However, I noticed my credentials on my pc are not listed as domain\userName but rather ComputerName\UserName. I think this is what is causing the problem but I am not sure. Can anyone lend a hand?

I'd appreciate any help,

Thanks.

Scott

Can you please post the exact error message from the SQL Server errorlog including the number and state of the error?

Also, to get additional information, please connect the SQL Server Profiler and monitor the Audit Login and Audit Login Failed events in the Security category. Check to see what are the credentials that appear for the login attempt.

You'll probably not be able to login anyway if your credentials are different from the ones you specified in SQL Server, but I would expect to see a different error in that case.

Thanks
Laurentiu

|||

Hi,

switch on the login audits at SQL Server to see which user tries to logon to the server.


HTH, Jens Suessmeyer.


http://www.sqlserver2005.de

|||

Hi

I am having similar issue.

When using Management Studio, XP clients can connect using widows authentication but windows 2000 clients cannot connect using windows authentication.

Both XP and win2000 can connect using SQL Server authentication.

It replaces my domain name with the workstation number and tries to connect using workstation\user_id rather than domain_name\user_id.

I ran a profiler and this is what I got:

login failed fo ruser ' '. This user is not associated with a trusted SQL Server connection.

|||

Are all your machines in the same domain or are they in different domains?

Thanks
Laurentiu

|||

Hi

These are all part of the same domain....

Thanks

|||

This is strange - it should work without any problems if the machines are in the same domain and you attempt to connect as a domain user. Are you only seeing this issue with SQL Server? Can you access shares that are exclusively ACLed to a domain user from these 2000 machines?

Thanks
Laurentiu

|||

I am getting the same problem.

MachineA:
Windows XP Pro.
SQL Server 2005, Standard Edition
Machine on Domain XXX
User XXX\User1 is added to Administrators group

MachineB:
Windows XP Pro.
SQL Server 2005, Developer Edition
Machine on Domain XXX
User XXX\User1 is added to Adminitrators group

User1 logs onto MachineA and uses SQL Managment Studio to connect to database engine on MachineA (Local SQL Server), everything works. Then tries to connect to database engine on MachineB everything works.

User1 logs onto MachineB and uses SQL Managment Studio to connect to database engine on MachineB (local SQL Server), everything works. Then tries to connect to database engine on MachineA (remote SQL Server) fails with error:
Login failed for user ''. The user is not associated with a trusted SQL Server connection. (Microsorft SQL Server, Error: 18452)

I have run the SQL Server Surface Area Configuration on both machines and tried to configure them exactly the same.

I have checked Name resolution on both machines, no issues found. I can connect to other resources (\\MachineA\C$ works from MachineB and \\MachineB\C$ works from MachineA).

I am going to try to install the Developer edition on Machine A to see if there is a difference, but I somehow don't think that it will make a difference...

Luis

|||

The Edition shouldn't make any difference. I don't know a reason for this behavior. Please open a bug by filling a report on the Product Feedback site at http://connect.microsoft.com/Main/content/content.aspx?ContentID=2220 and we'll continue from there.

Thanks
Laurentiu

|||

Hi...I developed a small application using delphi to run queries on a SQL Server machine. This application worked well on my PC and via the network when I set the database name and server name.

However, as I tried to make this application work on another SQL Server Machine (which has the same database and I have modified the server name in the Install Express)...I get an error

"...not associated with trusted SQL connection"

then goes on to reference my Database object in the data module of the application...

I tried almost everything from hard-coding a username and password in the Database object in the application...to no avail.

Thanks again.

Blackwidow25

|||

Have you checked if the other SQL Server machine is using mixed mode authentication?

If it does, try troubleshooting the SQL authentication using Management Studio or sqlcmd.

Thanks
Laurentiu

|||I get the exact same problem running the command "sqlcmd -E -S <RealIPAddressOrFullyQualifiedHostnameOfLocalHost>" (eg: "sqlcmd -E -S myhost.mydomain.com") on a clean machine where SQL Server 2005 Standard Edition has just been installed with mixed authentication and TCP/IP protocol enabled. The command however works if the local IP address 127.0.0.1, or the local hostname without the domain is being used. This command also works: "sqlcmd -E -S tcp:myhost". Any idea?|||

I think Laurentiu is right, I have found an article from IBM website:

"....Solution
To resolve this issue, follow the instructions to set User Authentication.
SQL Server 2000:

Go to Start > Programs > Microsoft SQL Server > Enterprise Manager
Right-click the Server name, select Properties > Security
Under Authentication, select SQL Server and Windows
The server must be stopped and re-started before this will take effect


SQL Server 2005:

Go to Start > Programs > Microsoft SQL Server 2005 > SQL Server Management Studio
Right-click the Server name, select Properties > Security
Under Server Authentication, select SQL Server and Windows Authentication Mode
The server must be stopped and re-started before this will take effect..."

http://www-1.ibm.com/support/docview.wss?uid=swg21119906

It has solved my problem, so I hope it could be helpful for you too.

|||

I am also had these same problem and struggled for long period. Finally I got these forum and succeeded. Thank you very much.

Regards,

Jose

|||

I had the same message when trying to connect to a SQL 2005 instance through Windows authentication.

The client was written is VB 2005 and used OLEDB client access (not the SQL native client!)

Switching the server to both SQL and Windows authentication did not solve the problem.

I checked different parameters for the connection string and, finally, found the next one that works:

'Connection information to connect to the database server to retrieve data

'This is connecting to SQL server through OLEDB

Dim ConnectionString As String = ""

ConnectionString = "Provider=SQLNCLI;"

ConnectionString += "Server=YourServerName;Database=YourDatabaseName;"

ConnectionString += "Integrated Security=SSPI;"

Important to note that Integrated Security=True; does not work.

Horia

|||I had a similar problem after creating a new (SQL) logon. Having restarted the following services it was resolved:

SQL Server ($instancename)
SQL Server Browser

SQL Server Express 2005

Error 18452 (not associated with a trusted sql server connection)

Using sql2005 on a Novell network...

When attempting to log into Mgt Studio using windows authentication I am getting the error: Error 18452 (not associated with a trusted sql server connection) .

I added my domain\userName in sql with no problems and added the account to the sysadmin server role. However, I noticed my credentials on my pc are not listed as domain\userName but rather ComputerName\UserName. I think this is what is causing the problem but I am not sure. Can anyone lend a hand?

I'd appreciate any help,

Thanks.

Scott

Can you please post the exact error message from the SQL Server errorlog including the number and state of the error?

Also, to get additional information, please connect the SQL Server Profiler and monitor the Audit Login and Audit Login Failed events in the Security category. Check to see what are the credentials that appear for the login attempt.

You'll probably not be able to login anyway if your credentials are different from the ones you specified in SQL Server, but I would expect to see a different error in that case.

Thanks
Laurentiu

|||

Hi,

switch on the login audits at SQL Server to see which user tries to logon to the server.


HTH, Jens Suessmeyer.


http://www.sqlserver2005.de

|||

Hi

I am having similar issue.

When using Management Studio, XP clients can connect using widows authentication but windows 2000 clients cannot connect using windows authentication.

Both XP and win2000 can connect using SQL Server authentication.

It replaces my domain name with the workstation number and tries to connect using workstation\user_id rather than domain_name\user_id.

I ran a profiler and this is what I got:

login failed fo ruser ' '. This user is not associated with a trusted SQL Server connection.

|||

Are all your machines in the same domain or are they in different domains?

Thanks
Laurentiu

|||

Hi

These are all part of the same domain....

Thanks

|||

This is strange - it should work without any problems if the machines are in the same domain and you attempt to connect as a domain user. Are you only seeing this issue with SQL Server? Can you access shares that are exclusively ACLed to a domain user from these 2000 machines?

Thanks
Laurentiu

|||

I am getting the same problem.

MachineA:
Windows XP Pro.
SQL Server 2005, Standard Edition
Machine on Domain XXX
User XXX\User1 is added to Administrators group

MachineB:
Windows XP Pro.
SQL Server 2005, Developer Edition
Machine on Domain XXX
User XXX\User1 is added to Adminitrators group

User1 logs onto MachineA and uses SQL Managment Studio to connect to database engine on MachineA (Local SQL Server), everything works. Then tries to connect to database engine on MachineB everything works.

User1 logs onto MachineB and uses SQL Managment Studio to connect to database engine on MachineB (local SQL Server), everything works. Then tries to connect to database engine on MachineA (remote SQL Server) fails with error:
Login failed for user ''. The user is not associated with a trusted SQL Server connection. (Microsorft SQL Server, Error: 18452)

I have run the SQL Server Surface Area Configuration on both machines and tried to configure them exactly the same.

I have checked Name resolution on both machines, no issues found. I can connect to other resources (\\MachineA\C$ works from MachineB and \\MachineB\C$ works from MachineA).

I am going to try to install the Developer edition on Machine A to see if there is a difference, but I somehow don't think that it will make a difference...

Luis

|||

The Edition shouldn't make any difference. I don't know a reason for this behavior. Please open a bug by filling a report on the Product Feedback site at http://connect.microsoft.com/Main/content/content.aspx?ContentID=2220 and we'll continue from there.

Thanks
Laurentiu

|||

Hi...I developed a small application using delphi to run queries on a SQL Server machine. This application worked well on my PC and via the network when I set the database name and server name.

However, as I tried to make this application work on another SQL Server Machine (which has the same database and I have modified the server name in the Install Express)...I get an error

"...not associated with trusted SQL connection"

then goes on to reference my Database object in the data module of the application...

I tried almost everything from hard-coding a username and password in the Database object in the application...to no avail.

Thanks again.

Blackwidow25

|||

Have you checked if the other SQL Server machine is using mixed mode authentication?

If it does, try troubleshooting the SQL authentication using Management Studio or sqlcmd.

Thanks
Laurentiu

|||I get the exact same problem running the command "sqlcmd -E -S <RealIPAddressOrFullyQualifiedHostnameOfLocalHost>" (eg: "sqlcmd -E -S myhost.mydomain.com") on a clean machine where SQL Server 2005 Standard Edition has just been installed with mixed authentication and TCP/IP protocol enabled. The command however works if the local IP address 127.0.0.1, or the local hostname without the domain is being used. This command also works: "sqlcmd -E -S tcp:myhost". Any idea?

|||

I think Laurentiu is right, I have found an article from IBM website:

"....Solution
To resolve this issue, follow the instructions to set User Authentication.
SQL Server 2000:

Go to Start > Programs > Microsoft SQL Server > Enterprise Manager
Right-click the Server name, select Properties > Security
Under Authentication, select SQL Server and Windows
The server must be stopped and re-started before this will take effect


SQL Server 2005:

Go to Start > Programs > Microsoft SQL Server 2005 > SQL Server Management Studio
Right-click the Server name, select Properties > Security
Under Server Authentication, select SQL Server and Windows Authentication Mode
The server must be stopped and re-started before this will take effect..."

http://www-1.ibm.com/support/docview.wss?uid=swg21119906

It has solved my problem, so I hope it could be helpful for you too.

|||

I am also had these same problem and struggled for long period. Finally I got these forum and succeeded. Thank you very much.

Regards,

Jose

|||

I had the same message when trying to connect to a SQL 2005 instance through Windows authentication.

The client was written is VB 2005 and used OLEDB client access (not the SQL native client!)

Switching the server to both SQL and Windows authentication did not solve the problem.

I checked different parameters for the connection string and, finally, found the next one that works:

'Connection information to connect to the database server to retrieve data

'This is connecting to SQL server through OLEDB

Dim ConnectionString As String = ""

ConnectionString = "Provider=SQLNCLI;"

ConnectionString += "Server=YourServerName;Database=YourDatabaseName;"

ConnectionString += "Integrated Security=SSPI;"

Important to note that Integrated Security=True; does not work.

Horia

sql

Error 18452 (not associated with a trusted sql server connection)

Using sql2005 on a Novell network...

When attempting to log into Mgt Studio using windows authentication I am getting the error: Error 18452 (not associated with a trusted sql server connection) .

I added my domain\userName in sql with no problems and added the account to the sysadmin server role. However, I noticed my credentials on my pc are not listed as domain\userName but rather ComputerName\UserName. I think this is what is causing the problem but I am not sure. Can anyone lend a hand?

I'd appreciate any help,

Thanks.

Scott

Can you please post the exact error message from the SQL Server errorlog including the number and state of the error?

Also, to get additional information, please connect the SQL Server Profiler and monitor the Audit Login and Audit Login Failed events in the Security category. Check to see what are the credentials that appear for the login attempt.

You'll probably not be able to login anyway if your credentials are different from the ones you specified in SQL Server, but I would expect to see a different error in that case.

Thanks
Laurentiu

|||

Hi,

switch on the login audits at SQL Server to see which user tries to logon to the server.


HTH, Jens Suessmeyer.


http://www.sqlserver2005.de

|||

Hi

I am having similar issue.

When using Management Studio, XP clients can connect using widows authentication but windows 2000 clients cannot connect using windows authentication.

Both XP and win2000 can connect using SQL Server authentication.

It replaces my domain name with the workstation number and tries to connect using workstation\user_id rather than domain_name\user_id.

I ran a profiler and this is what I got:

login failed fo ruser ' '. This user is not associated with a trusted SQL Server connection.

|||

Are all your machines in the same domain or are they in different domains?

Thanks
Laurentiu

|||

Hi

These are all part of the same domain....

Thanks

|||

This is strange - it should work without any problems if the machines are in the same domain and you attempt to connect as a domain user. Are you only seeing this issue with SQL Server? Can you access shares that are exclusively ACLed to a domain user from these 2000 machines?

Thanks
Laurentiu

|||

I am getting the same problem.

MachineA:
Windows XP Pro.
SQL Server 2005, Standard Edition
Machine on Domain XXX
User XXX\User1 is added to Administrators group

MachineB:
Windows XP Pro.
SQL Server 2005, Developer Edition
Machine on Domain XXX
User XXX\User1 is added to Adminitrators group

User1 logs onto MachineA and uses SQL Managment Studio to connect to database engine on MachineA (Local SQL Server), everything works. Then tries to connect to database engine on MachineB everything works.

User1 logs onto MachineB and uses SQL Managment Studio to connect to database engine on MachineB (local SQL Server), everything works. Then tries to connect to database engine on MachineA (remote SQL Server) fails with error:
Login failed for user ''. The user is not associated with a trusted SQL Server connection. (Microsorft SQL Server, Error: 18452)

I have run the SQL Server Surface Area Configuration on both machines and tried to configure them exactly the same.

I have checked Name resolution on both machines, no issues found. I can connect to other resources (\\MachineA\C$ works from MachineB and \\MachineB\C$ works from MachineA).

I am going to try to install the Developer edition on Machine A to see if there is a difference, but I somehow don't think that it will make a difference...

Luis

|||

The Edition shouldn't make any difference. I don't know a reason for this behavior. Please open a bug by filling a report on the Product Feedback site at http://connect.microsoft.com/Main/content/content.aspx?ContentID=2220 and we'll continue from there.

Thanks
Laurentiu

|||

Hi...I developed a small application using delphi to run queries on a SQL Server machine. This application worked well on my PC and via the network when I set the database name and server name.

However, as I tried to make this application work on another SQL Server Machine (which has the same database and I have modified the server name in the Install Express)...I get an error

"...not associated with trusted SQL connection"

then goes on to reference my Database object in the data module of the application...

I tried almost everything from hard-coding a username and password in the Database object in the application...to no avail.

Thanks again.

Blackwidow25

|||

Have you checked if the other SQL Server machine is using mixed mode authentication?

If it does, try troubleshooting the SQL authentication using Management Studio or sqlcmd.

Thanks
Laurentiu

|||I get the exact same problem running the command "sqlcmd -E -S <RealIPAddressOrFullyQualifiedHostnameOfLocalHost>" (eg: "sqlcmd -E -S myhost.mydomain.com") on a clean machine where SQL Server 2005 Standard Edition has just been installed with mixed authentication and TCP/IP protocol enabled. The command however works if the local IP address 127.0.0.1, or the local hostname without the domain is being used. This command also works: "sqlcmd -E -S tcp:myhost". Any idea?|||

I think Laurentiu is right, I have found an article from IBM website:

"....Solution
To resolve this issue, follow the instructions to set User Authentication.
SQL Server 2000:

Go to Start > Programs > Microsoft SQL Server > Enterprise Manager
Right-click the Server name, select Properties > Security
Under Authentication, select SQL Server and Windows
The server must be stopped and re-started before this will take effect


SQL Server 2005:

Go to Start > Programs > Microsoft SQL Server 2005 > SQL Server Management Studio
Right-click the Server name, select Properties > Security
Under Server Authentication, select SQL Server and Windows Authentication Mode
The server must be stopped and re-started before this will take effect..."

http://www-1.ibm.com/support/docview.wss?uid=swg21119906

It has solved my problem, so I hope it could be helpful for you too.

|||

I am also had these same problem and struggled for long period. Finally I got these forum and succeeded. Thank you very much.

Regards,

Jose

|||

I had the same message when trying to connect to a SQL 2005 instance through Windows authentication.

The client was written is VB 2005 and used OLEDB client access (not the SQL native client!)

Switching the server to both SQL and Windows authentication did not solve the problem.

I checked different parameters for the connection string and, finally, found the next one that works:

'Connection information to connect to the database server to retrieve data

'This is connecting to SQL server through OLEDB

Dim ConnectionString As String = ""

ConnectionString = "Provider=SQLNCLI;"

ConnectionString += "Server=YourServerName;Database=YourDatabaseName;"

ConnectionString += "Integrated Security=SSPI;"

Important to note that Integrated Security=True; does not work.

Horia

Error 18452 (not associated with a trusted sql server connection)

Using sql2005 on a Novell network...

When attempting to log into Mgt Studio using windows authentication I am getting the error: Error 18452 (not associated with a trusted sql server connection) .

I added my domain\userName in sql with no problems and added the account to the sysadmin server role. However, I noticed my credentials on my pc are not listed as domain\userName but rather ComputerName\UserName. I think this is what is causing the problem but I am not sure. Can anyone lend a hand?

I'd appreciate any help,

Thanks.

Scott

Can you please post the exact error message from the SQL Server errorlog including the number and state of the error?

Also, to get additional information, please connect the SQL Server Profiler and monitor the Audit Login and Audit Login Failed events in the Security category. Check to see what are the credentials that appear for the login attempt.

You'll probably not be able to login anyway if your credentials are different from the ones you specified in SQL Server, but I would expect to see a different error in that case.

Thanks
Laurentiu

|||

Hi,

switch on the login audits at SQL Server to see which user tries to logon to the server.


HTH, Jens Suessmeyer.


http://www.sqlserver2005.de

|||

Hi

I am having similar issue.

When using Management Studio, XP clients can connect using widows authentication but windows 2000 clients cannot connect using windows authentication.

Both XP and win2000 can connect using SQL Server authentication.

It replaces my domain name with the workstation number and tries to connect using workstation\user_id rather than domain_name\user_id.

I ran a profiler and this is what I got:

login failed fo ruser ' '. This user is not associated with a trusted SQL Server connection.

|||

Are all your machines in the same domain or are they in different domains?

Thanks
Laurentiu

|||

Hi

These are all part of the same domain....

Thanks

|||

This is strange - it should work without any problems if the machines are in the same domain and you attempt to connect as a domain user. Are you only seeing this issue with SQL Server? Can you access shares that are exclusively ACLed to a domain user from these 2000 machines?

Thanks
Laurentiu

|||

I am getting the same problem.

MachineA:
Windows XP Pro.
SQL Server 2005, Standard Edition
Machine on Domain XXX
User XXX\User1 is added to Administrators group

MachineB:
Windows XP Pro.
SQL Server 2005, Developer Edition
Machine on Domain XXX
User XXX\User1 is added to Adminitrators group

User1 logs onto MachineA and uses SQL Managment Studio to connect to database engine on MachineA (Local SQL Server), everything works. Then tries to connect to database engine on MachineB everything works.

User1 logs onto MachineB and uses SQL Managment Studio to connect to database engine on MachineB (local SQL Server), everything works. Then tries to connect to database engine on MachineA (remote SQL Server) fails with error:
Login failed for user ''. The user is not associated with a trusted SQL Server connection. (Microsorft SQL Server, Error: 18452)

I have run the SQL Server Surface Area Configuration on both machines and tried to configure them exactly the same.

I have checked Name resolution on both machines, no issues found. I can connect to other resources (\\MachineA\C$ works from MachineB and \\MachineB\C$ works from MachineA).

I am going to try to install the Developer edition on Machine A to see if there is a difference, but I somehow don't think that it will make a difference...

Luis

|||

The Edition shouldn't make any difference. I don't know a reason for this behavior. Please open a bug by filling a report on the Product Feedback site at http://connect.microsoft.com/Main/content/content.aspx?ContentID=2220 and we'll continue from there.

Thanks
Laurentiu

|||

Hi...I developed a small application using delphi to run queries on a SQL Server machine. This application worked well on my PC and via the network when I set the database name and server name.

However, as I tried to make this application work on another SQL Server Machine (which has the same database and I have modified the server name in the Install Express)...I get an error

"...not associated with trusted SQL connection"

then goes on to reference my Database object in the data module of the application...

I tried almost everything from hard-coding a username and password in the Database object in the application...to no avail.

Thanks again.

Blackwidow25

|||

Have you checked if the other SQL Server machine is using mixed mode authentication?

If it does, try troubleshooting the SQL authentication using Management Studio or sqlcmd.

Thanks
Laurentiu

|||I get the exact same problem running the command "sqlcmd -E -S <RealIPAddressOrFullyQualifiedHostnameOfLocalHost>" (eg: "sqlcmd -E -S myhost.mydomain.com") on a clean machine where SQL Server 2005 Standard Edition has just been installed with mixed authentication and TCP/IP protocol enabled. The command however works if the local IP address 127.0.0.1, or the local hostname without the domain is being used. This command also works: "sqlcmd -E -S tcp:myhost". Any idea?

|||

I think Laurentiu is right, I have found an article from IBM website:

"....Solution
To resolve this issue, follow the instructions to set User Authentication.
SQL Server 2000:

Go to Start > Programs > Microsoft SQL Server > Enterprise Manager
Right-click the Server name, select Properties > Security
Under Authentication, select SQL Server and Windows
The server must be stopped and re-started before this will take effect


SQL Server 2005:

Go to Start > Programs > Microsoft SQL Server 2005 > SQL Server Management Studio
Right-click the Server name, select Properties > Security
Under Server Authentication, select SQL Server and Windows Authentication Mode
The server must be stopped and re-started before this will take effect..."

http://www-1.ibm.com/support/docview.wss?uid=swg21119906

It has solved my problem, so I hope it could be helpful for you too.

|||

I am also had these same problem and struggled for long period. Finally I got these forum and succeeded. Thank you very much.

Regards,

Jose

|||

I had the same message when trying to connect to a SQL 2005 instance through Windows authentication.

The client was written is VB 2005 and used OLEDB client access (not the SQL native client!)

Switching the server to both SQL and Windows authentication did not solve the problem.

I checked different parameters for the connection string and, finally, found the next one that works:

'Connection information to connect to the database server to retrieve data

'This is connecting to SQL server through OLEDB

Dim ConnectionString As String = ""

ConnectionString = "Provider=SQLNCLI;"

ConnectionString += "Server=YourServerName;Database=YourDatabaseName;"

ConnectionString += "Integrated Security=SSPI;"

Important to note that Integrated Security=True; does not work.

Horia

Error 18452 (not associated with a trusted sql server connection)

Using sql2005 on a Novell network...

When attempting to log into Mgt Studio using windows authentication I am getting the error: Error 18452 (not associated with a trusted sql server connection) .

I added my domain\userName in sql with no problems and added the account to the sysadmin server role. However, I noticed my credentials on my pc are not listed as domain\userName but rather ComputerName\UserName. I think this is what is causing the problem but I am not sure. Can anyone lend a hand?

I'd appreciate any help,

Thanks.

Scott

Can you please post the exact error message from the SQL Server errorlog including the number and state of the error?

Also, to get additional information, please connect the SQL Server Profiler and monitor the Audit Login and Audit Login Failed events in the Security category. Check to see what are the credentials that appear for the login attempt.

You'll probably not be able to login anyway if your credentials are different from the ones you specified in SQL Server, but I would expect to see a different error in that case.

Thanks
Laurentiu

|||

Hi,

switch on the login audits at SQL Server to see which user tries to logon to the server.


HTH, Jens Suessmeyer.


http://www.sqlserver2005.de

|||

Hi

I am having similar issue.

When using Management Studio, XP clients can connect using widows authentication but windows 2000 clients cannot connect using windows authentication.

Both XP and win2000 can connect using SQL Server authentication.

It replaces my domain name with the workstation number and tries to connect using workstation\user_id rather than domain_name\user_id.

I ran a profiler and this is what I got:

login failed fo ruser ' '. This user is not associated with a trusted SQL Server connection.

|||

Are all your machines in the same domain or are they in different domains?

Thanks
Laurentiu

|||

Hi

These are all part of the same domain....

Thanks

|||

This is strange - it should work without any problems if the machines are in the same domain and you attempt to connect as a domain user. Are you only seeing this issue with SQL Server? Can you access shares that are exclusively ACLed to a domain user from these 2000 machines?

Thanks
Laurentiu

|||

I am getting the same problem.

MachineA:
Windows XP Pro.
SQL Server 2005, Standard Edition
Machine on Domain XXX
User XXX\User1 is added to Administrators group

MachineB:
Windows XP Pro.
SQL Server 2005, Developer Edition
Machine on Domain XXX
User XXX\User1 is added to Adminitrators group

User1 logs onto MachineA and uses SQL Managment Studio to connect to database engine on MachineA (Local SQL Server), everything works. Then tries to connect to database engine on MachineB everything works.

User1 logs onto MachineB and uses SQL Managment Studio to connect to database engine on MachineB (local SQL Server), everything works. Then tries to connect to database engine on MachineA (remote SQL Server) fails with error:
Login failed for user ''. The user is not associated with a trusted SQL Server connection. (Microsorft SQL Server, Error: 18452)

I have run the SQL Server Surface Area Configuration on both machines and tried to configure them exactly the same.

I have checked Name resolution on both machines, no issues found. I can connect to other resources (\\MachineA\C$ works from MachineB and \\MachineB\C$ works from MachineA).

I am going to try to install the Developer edition on Machine A to see if there is a difference, but I somehow don't think that it will make a difference...

Luis

|||

The Edition shouldn't make any difference. I don't know a reason for this behavior. Please open a bug by filling a report on the Product Feedback site at http://connect.microsoft.com/Main/content/content.aspx?ContentID=2220 and we'll continue from there.

Thanks
Laurentiu

|||

Hi...I developed a small application using delphi to run queries on a SQL Server machine. This application worked well on my PC and via the network when I set the database name and server name.

However, as I tried to make this application work on another SQL Server Machine (which has the same database and I have modified the server name in the Install Express)...I get an error

"...not associated with trusted SQL connection"

then goes on to reference my Database object in the data module of the application...

I tried almost everything from hard-coding a username and password in the Database object in the application...to no avail.

Thanks again.

Blackwidow25

|||

Have you checked if the other SQL Server machine is using mixed mode authentication?

If it does, try troubleshooting the SQL authentication using Management Studio or sqlcmd.

Thanks
Laurentiu

|||I get the exact same problem running the command "sqlcmd -E -S <RealIPAddressOrFullyQualifiedHostnameOfLocalHost>" (eg: "sqlcmd -E -S myhost.mydomain.com") on a clean machine where SQL Server 2005 Standard Edition has just been installed with mixed authentication and TCP/IP protocol enabled. The command however works if the local IP address 127.0.0.1, or the local hostname without the domain is being used. This command also works: "sqlcmd -E -S tcp:myhost". Any idea?|||

I think Laurentiu is right, I have found an article from IBM website:

"....Solution
To resolve this issue, follow the instructions to set User Authentication.
SQL Server 2000:

Go to Start > Programs > Microsoft SQL Server > Enterprise Manager
Right-click the Server name, select Properties > Security
Under Authentication, select SQL Server and Windows
The server must be stopped and re-started before this will take effect


SQL Server 2005:

Go to Start > Programs > Microsoft SQL Server 2005 > SQL Server Management Studio
Right-click the Server name, select Properties > Security
Under Server Authentication, select SQL Server and Windows Authentication Mode
The server must be stopped and re-started before this will take effect..."

http://www-1.ibm.com/support/docview.wss?uid=swg21119906

It has solved my problem, so I hope it could be helpful for you too.

|||

I am also had these same problem and struggled for long period. Finally I got these forum and succeeded. Thank you very much.

Regards,

Jose

|||

I had the same message when trying to connect to a SQL 2005 instance through Windows authentication.

The client was written is VB 2005 and used OLEDB client access (not the SQL native client!)

Switching the server to both SQL and Windows authentication did not solve the problem.

I checked different parameters for the connection string and, finally, found the next one that works:

'Connection information to connect to the database server to retrieve data

'This is connecting to SQL server through OLEDB

Dim ConnectionString As String = ""

ConnectionString = "Provider=SQLNCLI;"

ConnectionString += "Server=YourServerName;Database=YourDatabaseName;"

ConnectionString += "Integrated Security=SSPI;"

Important to note that Integrated Security=True; does not work.

Horia

Error 18452 (not associated with a trusted sql server connection)

Using sql2005 on a Novell network...

When attempting to log into Mgt Studio using windows authentication I am getting the error: Error 18452 (not associated with a trusted sql server connection) .

I added my domain\userName in sql with no problems and added the account to the sysadmin server role. However, I noticed my credentials on my pc are not listed as domain\userName but rather ComputerName\UserName. I think this is what is causing the problem but I am not sure. Can anyone lend a hand?

I'd appreciate any help,

Thanks.

Scott

Can you please post the exact error message from the SQL Server errorlog including the number and state of the error?

Also, to get additional information, please connect the SQL Server Profiler and monitor the Audit Login and Audit Login Failed events in the Security category. Check to see what are the credentials that appear for the login attempt.

You'll probably not be able to login anyway if your credentials are different from the ones you specified in SQL Server, but I would expect to see a different error in that case.

Thanks
Laurentiu

|||

Hi,

switch on the login audits at SQL Server to see which user tries to logon to the server.


HTH, Jens Suessmeyer.


http://www.sqlserver2005.de

|||

Hi

I am having similar issue.

When using Management Studio, XP clients can connect using widows authentication but windows 2000 clients cannot connect using windows authentication.

Both XP and win2000 can connect using SQL Server authentication.

It replaces my domain name with the workstation number and tries to connect using workstation\user_id rather than domain_name\user_id.

I ran a profiler and this is what I got:

login failed fo ruser ' '. This user is not associated with a trusted SQL Server connection.

|||

Are all your machines in the same domain or are they in different domains?

Thanks
Laurentiu

|||

Hi

These are all part of the same domain....

Thanks

|||

This is strange - it should work without any problems if the machines are in the same domain and you attempt to connect as a domain user. Are you only seeing this issue with SQL Server? Can you access shares that are exclusively ACLed to a domain user from these 2000 machines?

Thanks
Laurentiu

|||

I am getting the same problem.

MachineA:
Windows XP Pro.
SQL Server 2005, Standard Edition
Machine on Domain XXX
User XXX\User1 is added to Administrators group

MachineB:
Windows XP Pro.
SQL Server 2005, Developer Edition
Machine on Domain XXX
User XXX\User1 is added to Adminitrators group

User1 logs onto MachineA and uses SQL Managment Studio to connect to database engine on MachineA (Local SQL Server), everything works. Then tries to connect to database engine on MachineB everything works.

User1 logs onto MachineB and uses SQL Managment Studio to connect to database engine on MachineB (local SQL Server), everything works. Then tries to connect to database engine on MachineA (remote SQL Server) fails with error:
Login failed for user ''. The user is not associated with a trusted SQL Server connection. (Microsorft SQL Server, Error: 18452)

I have run the SQL Server Surface Area Configuration on both machines and tried to configure them exactly the same.

I have checked Name resolution on both machines, no issues found. I can connect to other resources (\\MachineA\C$ works from MachineB and \\MachineB\C$ works from MachineA).

I am going to try to install the Developer edition on Machine A to see if there is a difference, but I somehow don't think that it will make a difference...

Luis

|||

The Edition shouldn't make any difference. I don't know a reason for this behavior. Please open a bug by filling a report on the Product Feedback site at http://connect.microsoft.com/Main/content/content.aspx?ContentID=2220 and we'll continue from there.

Thanks
Laurentiu

|||

Hi...I developed a small application using delphi to run queries on a SQL Server machine. This application worked well on my PC and via the network when I set the database name and server name.

However, as I tried to make this application work on another SQL Server Machine (which has the same database and I have modified the server name in the Install Express)...I get an error

"...not associated with trusted SQL connection"

then goes on to reference my Database object in the data module of the application...

I tried almost everything from hard-coding a username and password in the Database object in the application...to no avail.

Thanks again.

Blackwidow25

|||

Have you checked if the other SQL Server machine is using mixed mode authentication?

If it does, try troubleshooting the SQL authentication using Management Studio or sqlcmd.

Thanks
Laurentiu

|||I get the exact same problem running the command "sqlcmd -E -S <RealIPAddressOrFullyQualifiedHostnameOfLocalHost>" (eg: "sqlcmd -E -S myhost.mydomain.com") on a clean machine where SQL Server 2005 Standard Edition has just been installed with mixed authentication and TCP/IP protocol enabled. The command however works if the local IP address 127.0.0.1, or the local hostname without the domain is being used. This command also works: "sqlcmd -E -S tcp:myhost". Any idea?

|||

I think Laurentiu is right, I have found an article from IBM website:

"....Solution
To resolve this issue, follow the instructions to set User Authentication.
SQL Server 2000:

Go to Start > Programs > Microsoft SQL Server > Enterprise Manager
Right-click the Server name, select Properties > Security
Under Authentication, select SQL Server and Windows
The server must be stopped and re-started before this will take effect


SQL Server 2005:

Go to Start > Programs > Microsoft SQL Server 2005 > SQL Server Management Studio
Right-click the Server name, select Properties > Security
Under Server Authentication, select SQL Server and Windows Authentication Mode
The server must be stopped and re-started before this will take effect..."

http://www-1.ibm.com/support/docview.wss?uid=swg21119906

It has solved my problem, so I hope it could be helpful for you too.

|||

I am also had these same problem and struggled for long period. Finally I got these forum and succeeded. Thank you very much.

Regards,

Jose

|||

I had the same message when trying to connect to a SQL 2005 instance through Windows authentication.

The client was written is VB 2005 and used OLEDB client access (not the SQL native client!)

Switching the server to both SQL and Windows authentication did not solve the problem.

I checked different parameters for the connection string and, finally, found the next one that works:

'Connection information to connect to the database server to retrieve data

'This is connecting to SQL server through OLEDB

Dim ConnectionString As String = ""

ConnectionString = "Provider=SQLNCLI;"

ConnectionString += "Server=YourServerName;Database=YourDatabaseName;"

ConnectionString += "Integrated Security=SSPI;"

Important to note that Integrated Security=True; does not work.

Horia

Friday, March 9, 2012

error 0xE0040200

Hello,

I′ve got this problem when I′m creating a new cube with the Microsoft Visual Studio 2005 8.0.550727.42 (RTM.050727-4200) and my operative system is Microsoft(R) Windows(R) Server 2003, Standard Edition. It isn′t the first cube I′ve created in this project, but it′s the the first time I get the problem.

Could someone help me?

Can you provide bit more informatio about the problem.

At what point you are getting the error?
Is that at deployment time or you get the error while running Cube Wizard?

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||I′m getting the error when I′m browsing the cube using the third level of a hierarchy. It happens whit all the hierarchies of the project so I think It isn′t a problem of the hierarchy.|||

Try installing SP1 of SQL server and see if the same problem happens.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

Sunday, February 26, 2012

Error : Cannot open user default database. Login failed.

I work with Microsoft visual studio 2005.
i get data from a table by ADO.NET :

SqlConnection sqlConn = new SqlConnection(strConnectionString);
sqlConn.Open();
.....

it works fine.

but when i open the SQL Server 2005 express edition and connect to the server (inside the same computer) to check something and then get back to the VS and run the code again ,the Open() function fails with the exception :

{"Cannot open user default database. Login failed.\r\nLogin failed for user 'DOMAIN\\asaf_a'."


disconnecting the server doesn't help and even closing the SQL Server 2005 application doesn't help.
Only restarting the computer enables the Open() command to work again.

Why ?

Every user has a default database specified. If you are using a SQLConnectinstring you are normally redirecting the user within the connectionstring to a specific database (Initial Catalog). By connecting with another tool which does not have the availbility to choose a starting database the user is redirected to its "home" / default database. If the database was dropped in the meantime, or the user was denied access / or even not granted, the login procedure will fail. You can set the user defaults database with using the procedure sp_defaultdb or by using any gui which can administer the logins.

HTH, Jens Suessmeyer.

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

Thanks jens,

i solved the problem.

It was my connection string all along. it was wrong. This was the problem.

I changed the connection string from :

string strConnectionString = @."Server=.\SQLTESTING;AttachDbFilename=C:\Program Files\Microsoft SQL Server\MSSQL.3\MSSQL\Data\TestDB.mdf;Integrated Security=SSPI";

To :

string strConnectionString = @."Server=.\SQLTESTING;Integrated Security=TRUE;Database=TestDB";

now i can use (Open) the TestDB Database from the VS code even when the SQL Server 2005 is also connected to this database.

Thanks!

Error (Data mining): A catalog is not set for this session

I downloaded a copy of sql server and when I run the following query in the sql management studio after choosing new query , DMX I get the above error

CREATE MINING MODEL [NBSample]

(

CustomerKey LONG KEY,

Gender TEXT DISCRETE,

[Number Cars Owned] LONG DISCRETE,

[Bike Buyer] LONG DISCRETE PREDICT

)

Using Microsoft_Naive_Bayes

Also in the pane Mining Model I get the message No mining models found. The only error I get when I installed SQL server was a COM plus registration error. I am running Windows XP SP2. Can someone please help.

Vijay Mukhi

HOD Helios

Apoligies from the bottom of my heart. I was reading the tutorial in the middle of the night and did not create a database. After creating a database the above query works like a charm. I am using sql server to create an expert system for detecting malware. I tried dozens of neural network , bayesain network , SVM , etc products and believe sql server is far ahead. Sorry once again for the post.

Vijay Mukhi

Helios

Error "Object reference not set to an instance" on SQL 2005 Reporting Services

Reporting Services on my production server stopped working. If I try to open it from Management studio, I get the error below.

Already tried installing patch 07-040, re-registering asp.net, and a few other stuff. Can you guys help me?

TITLE: Connect to Server

Cannot connect to GRUMIUM.


ADDITIONAL INFORMATION:

Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'.
The request failed with the error message:
--
<html>
<head>
<title>
SQL Server Reporting Services
</title><meta name="Generator" content="Microsoft SQL Server Reporting Services 9.00.2047.00" />
<meta name="HTTP Status" content="500" />
<meta name="ProductLocaleID" content="9" />
<meta name="CountryLocaleID" content="1033" />
<meta name="StackTrace" content />
<style>
BODY {FONT-FAMILY:Verdana; FONT-WEIGHT:normal; FONT-SIZE: 8pt; COLOR:black}
H1 {FONT-FAMILY:Verdana; FONT-WEIGHT:700; FONT-SIZE:15pt}
LI {FONT-FAMILY:Verdana; FONT-WEIGHT:normal; FONT-SIZE:8pt; DISPLAY:inline}
.ProductInfo {FONT-FAMILY:Verdana; FONT-WEIGHT:bold; FONT-SIZE: 8pt; COLOR:gray}
A:link {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; COLOR[:#]3366CC; TEXT-DECORATION:none}
A:hover {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; COLOR[:#]FF3300; TEXT-DECORATION:underline}
A:visited {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; COLOR[:#]3366CC; TEXT-DECORATION:none}
A:visited:hover {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; color[:#]FF3300; TEXT-DECORATION:underline}

</style>
</head><body bgcolor="white">
<h1>
Reporting Services Error<hr width="100%" size="1" color="silver" />
</h1><ul>
<li>An internal error occurred on the report server. See the error log for more details. (rsInternalError) <a href="http://go.microsoft.com/fwlink/?LinkId=20476&EvtSrc=Microsoft.ReportingServices.Diagnostics.Utilities.ErrorStrings&EvtID=rsInternalError&ProdName=Microsoft%20SQL%20Server%20Reporting%20Services&ProdVer=9.00.2047.00" target="_blank">Get Online Help</a></li><ul>
<li>Object reference not set to an instance of an object.</li>
</ul>
</ul><hr width="100%" size="1" color="silver" /><span class="ProductInfo">SQL Server Reporting Services</span>
</body>
</html>
--. (Microsoft.SqlServer.Management.UI.RSClient)


BUTTONS:

OK

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

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

This could be a variety of things, but is most likely due to some configuration that got "touched" recently.

What has been monkeyed with in IIS or with the report server configuration recently? Undo those changes!

|||

There has been no recent change to my environment. I tried a lot of things already to try re resolve the issue.

- Installed patch 07-040

http://support.microsoft.com/kb/911300/en-us

- tried re-registering asp.net

- tried removing the xmlns from the web.config file from both reportserver and reportmanager folders

All without success. Don't know what else I can do.

Friday, February 17, 2012

error

"To connect to this server you must use sql servermanagement studio or sql server management objects(SMO)"

what could be the cause of this error? happens when connecting to sql server 2005!!!!

Where are you gettin this error ?

HTH, Jens Suessmeyer.

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

as you didn′t answer, I guess you are using a version prior Managment Studio to connect to a SQL Server 2005. SQL Server 2005 needs an SMO-enabled application for administration.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

Wednesday, February 15, 2012

ERREUR to open a data base with SSMSEE

I installed Visual Studio 2005 Standard Edition which contains SQL Server Express.

I downloaded and installed SQL Server Management Studio Express. It run !

I established a connection server BellFixe\SQLEXPRESS (BellFixe is the name of my computer). Ok.

The command " add " of the function " attach " of SSMSE allows to navigate on the disk and to attach diverse data bases but it refuses to open the directory D:\Documents and Settings\Alain (this path is the base of all my directories of data). This directory appears empty. I cannot thus attach the data bases which are under this directory !

I can open a data base only if it is elsewhere localised.

Why this limitation of access and how to resolve this problem? There is certainly a relation with the management of the users of the PC.

I am only user and administrator of my PC under XP. All my directories of data are under D:\Documents and Settings\Alain. The explorer Windows allows to navigate everywhere the disk.

Tanks.

hi,

the position you specfied is not a good one for such a kind of data as it is meant as "private" storage for the current (aka Alain) logged user... you should modify the path to something available to all users, even if SQLExpress always is run under the credential of the account you specified at install time or later, via the Surface Area Configuration or SQL Server Configuration Manager..

regards

|||

But SSMSEE should be able to cross all the disk, in mode administrator. He is not right for such a limitaion there is not it ?

This is only an MSDN exercise "Coatch ASP.NET". But it is blocking for me.

Regards

|||

hi,

AchLog wrote:

But SSMSEE should be able to cross all the disk, in mode administrator. He is not right for such a limitaion there is not it ?

is your SQL Server engine service running under Network Service or Local Service account?

please verify via SQL Server Configuration Manager..

regards

|||

Thank You for your answer Andrea.

SQL Server is local on my machine of development.

I have not yet understood how to verify the connexion mode with SQL Server Configuration Manager. I am a little bit novice with SQL Server and his tools.
Can you tell me how to verify it?

Here method indicated by coach ASP.NET to attach a local data base with SSMSEE. On my computer it is the step 4 which does not function.

===========================================

A simple solution is to attach your data base to your waiter SQL Express. It is now very easy with the console of administration “SQL Server Management Studio Express train” of the final version of SQL Server Express:

1 - to launch the console of administration since the menu To start/All the programs/Microsoft SQL Server 2005/SQL Server Management Studio Express train CTP.

2 - connect to the waiter of name”. \ SQLExpress " via the Windows authentification.

3 - in the explorer of object, made a right click on the file “Databases” then the order “attach”.

4 - find on the disc your file .mdf and add it. Your data base is now attached to SQL Server. You must see it in the list of the data bases of the console.

============================================
Thank you

|||

AchLog wrote:

Thank You for your answer Andrea.

SQL Server is local on my machine of development.

I have not yet understood how to verify the connexion mode with SQL Server Configuration Manager. I am a little bit novice with SQL Server and his tools.
Can you tell me how to verify it?

execute the SQL Server Configuration Manager.. in the SQL Server services locate the SQL Server engine you are dealing with.. right click on it and access it's properties.. you can there see (and set) the account running the services... if you modify it you have to restart the service..

AchLog wrote:

Here method indicated by coach ASP.NET to attach a local data base with SSMSEE. On my computer it is the step 4 which does not function.

===========================================

A simple solution is to attach your data base to your waiter SQL Express. It is now very easy with the console of administration “SQL Server Management Studio Express train” of the final version of SQL Server Express:

1 - to launch the console of administration since the menu To start/All the programs/Microsoft SQL Server 2005/SQL Server Management Studio Express train CTP.

2 - connect to the waiter of name”. \ SQLExpress " via the Windows authentification.

3 - in the explorer of object, made a right click on the file “Databases” then the order “attach”.

4 - find on the disc your file .mdf and add it. Your data base is now attached to SQL Server. You must see it in the list of the data bases of the console.

============================================
Thank you

the "explanation" is correct... this is the "traditional" way to attach a database to a SQL Server instance via SSMS (and SSMSE), but not to "user instances" as the perform differently...

regards

|||

Tank You Andrea,

The parameters are the following ones :

Name : bellfixe\sqlexpress

ERREUR to open a data base with SSMSEE

I installed Visual Studio 2005 Standard Edition which contains SQL Server Express.

I downloaded and installed SQL Server Management Studio Express. It run !

I established a connection server BellFixe\SQLEXPRESS (BellFixe is the name of my computer). Ok.

The command " add " of the function " attach " of SSMSE allows to navigate on the disk and to attach diverse data bases but it refuses to open the directory D:\Documents and Settings\Alain (this path is the base of all my directories of data). This directory appears empty. I cannot thus attach the data bases which are under this directory !

I can open a data base only if it is elsewhere localised.

Why this limitation of access and how to resolve this problem? There is certainly a relation with the management of the users of the PC.

I am only user and administrator of my PC under XP. All my directories of data are under D:\Documents and Settings\Alain. The explorer Windows allows to navigate everywhere the disk.

Tanks.

hi,

the position you specfied is not a good one for such a kind of data as it is meant as "private" storage for the current (aka Alain) logged user... you should modify the path to something available to all users, even if SQLExpress always is run under the credential of the account you specified at install time or later, via the Surface Area Configuration or SQL Server Configuration Manager..

regards

|||

But SSMSEE should be able to cross all the disk, in mode administrator. He is not right for such a limitaion there is not it ?

This is only an MSDN exercise "Coatch ASP.NET". But it is blocking for me.

Regards

|||

hi,

AchLog wrote:

But SSMSEE should be able to cross all the disk, in mode administrator. He is not right for such a limitaion there is not it ?

is your SQL Server engine service running under Network Service or Local Service account?

please verify via SQL Server Configuration Manager..

regards

|||

Thank You for your answer Andrea.

SQL Server is local on my machine of development.

I have not yet understood how to verify the connexion mode with SQL Server Configuration Manager. I am a little bit novice with SQL Server and his tools.
Can you tell me how to verify it?

Here method indicated by coach ASP.NET to attach a local data base with SSMSEE. On my computer it is the step 4 which does not function.

===========================================

A simple solution is to attach your data base to your waiter SQL Express. It is now very easy with the console of administration “SQL Server Management Studio Express train” of the final version of SQL Server Express:

1 - to launch the console of administration since the menu To start/All the programs/Microsoft SQL Server 2005/SQL Server Management Studio Express train CTP.

2 - connect to the waiter of name”. \ SQLExpress " via the Windows authentification.

3 - in the explorer of object, made a right click on the file “Databases” then the order “attach”.

4 - find on the disc your file .mdf and add it. Your data base is now attached to SQL Server. You must see it in the list of the data bases of the console.

============================================
Thank you

|||

AchLog wrote:

Thank You for your answer Andrea.

SQL Server is local on my machine of development.

I have not yet understood how to verify the connexion mode with SQL Server Configuration Manager. I am a little bit novice with SQL Server and his tools.
Can you tell me how to verify it?

execute the SQL Server Configuration Manager.. in the SQL Server services locate the SQL Server engine you are dealing with.. right click on it and access it's properties.. you can there see (and set) the account running the services... if you modify it you have to restart the service..

AchLog wrote:

Here method indicated by coach ASP.NET to attach a local data base with SSMSEE. On my computer it is the step 4 which does not function.

===========================================

A simple solution is to attach your data base to your waiter SQL Express. It is now very easy with the console of administration “SQL Server Management Studio Express train” of the final version of SQL Server Express:

1 - to launch the console of administration since the menu To start/All the programs/Microsoft SQL Server 2005/SQL Server Management Studio Express train CTP.

2 - connect to the waiter of name”. \ SQLExpress " via the Windows authentification.

3 - in the explorer of object, made a right click on the file “Databases” then the order “attach”.

4 - find on the disc your file .mdf and add it. Your data base is now attached to SQL Server. You must see it in the list of the data bases of the console.

============================================
Thank you

the "explanation" is correct... this is the "traditional" way to attach a database to a SQL Server instance via SSMS (and SSMSE), but not to "user instances" as the perform differently...

regards

|||

Tank You Andrea,

The parameters are the following ones :

Name : bellfixe\sqlexpress