Showing posts with label SQL Server. Show all posts
Showing posts with label SQL Server. Show all posts

Thursday, September 4, 2008

Generating user instances in SQL Server is disabled. Use sp_configure 'user instances enabled' to generate user instances

If you are getting the following error:

“Generating user instances in SQL Server is disabled. Use sp_configure 'user instances enabled' to generate user instances” What should I do?

Answer: To fix this, please Open the SQL Server Management Studio Express. This is the downloadable program in the same site where you downloaded the SQL Server 2005 express used to manage SQL Server 2005 Express.


In the query editor type this text: exec sp_configure 'user instances enabled', 1.


Then type: Reconfigure.


Then restart the SQL Server database.


Ref: http://blogs.msdn.com/hongmeig/archive/2007/08/31/generating-user-instances-in-sql-server-is-disabled-use-sp-configure-user-instances-enabled-to-generate-user-instances.aspx

Sunday, November 4, 2007

Login failed for user 'sa'. The user is not associated with a trusted SQL Server connection (Microsoft SQL Server, Error: 18452)

After installing SQL Express 2005, when you try to login by user 'sa' and password 'user-defined', if you get the following error like: "Login failed for user 'sa'. The user is not associated with a trusted SQL Server connection (Microsoft SQL Server, Error: 18452)", then please read the following carefully:-


During installation, SQL Server Database Engine is set to either Windows Authentication mode or SQL Server and Windows Authentication mode. This topic describes how to change the security mode, after installation.

If Windows Authentication mode is selected during installation, the sa login is disabled. If you later change authentication mode to SQL Server and Windows Authentication mode, the sa login remains disabled. To enable the sa login, use the ALTER LOGIN command.

Security Note: It is very important to choose a strong password for the sa login.

The sa login can only connect to the server using SQL Authentication.

To change security authentication mode
1. In SQL Server Management Studio Object Explorer, right-click your server, and then click Properties.
2. On the Security page, under Server authentication, select the new server authentication mode, and then click OK.
3. In the SQL Server Management Studio dialog box, click OK, to acknowledge the need to restart SQL Server.

To restart SQL Server from SQL Server Management Studio

1. In Object Explorer, right-click your server, and then click Restart. If running, SQL Server Agent must also be restarted.

To enable the sa login
1. Execute the following statements to enable the sa password and assign a password.
ALTER LOGIN sa ENABLE ;
GO
ALTER LOGIN sa WITH PASSWORD = '' ;
GO