How to enable sa user account in SQL Server 2005

How to enable sa user account in SQL Server 2005


Step 1.

You would enable the TCP/IP Protocol Name in the path of  Start->Microsoft SQL Server 2005->Configuration Tools->SQL Server Configuration Manager->SQL Server 2005 Network Configuration
  
Step 2.

You should modify the Server authentication mode into SQL Server and Windows Authentication mode from Windows Authentication mode in the path of Server Properties


Step 3.

You should execute the command as follows in a new query window, the command is: 
            exec sp_password NULL,'yourpassword','sa'
            alter login sa enable
Or you can edit it in the sa's property window, set the sa 's properties as follow:
            Permission to connect to database engine: Grant
            Login: Enable

If the  Server authentication mode is not set to  SQL Server and Windows Authentication mode, it will throw an exception like " Login failed for user 'username'. The user is not associated with a trusted SQL Server connection. (Microsoft SQL Server, Error: 18452)"

转载于:https://www.cnblogs.com/xiaochuncha/archive/2009/12/16/1625833.html

你可能感兴趣的:(数据库,网络)