Tuesday, July 10, 2007

Changing SQL Server 2005 sa password

Changing the password in SQL Server

for Sql Server 2000.

sp_password 'Old','New', Account

for Sql Server 2005.

ALTER LOGIN Account_Name WITH
PASSWORD = 'New_Password'
OLD_PASSWORD = 'Old_Password';
GO

1 comment:

Anonymous said...

http://msdn.microsoft.com/en-us/library/ms188670.aspx

To enable the sa login by using Transact-SQL
Execute the following statements to enable the sa password and assign a password.

Copy Code
ALTER LOGIN sa ENABLE ;
GO
ALTER LOGIN sa WITH PASSWORD = 'enterStrongPasswordHere' ;
GO
To enable the sa login by using Management Studio
In Object Explorer, expand Security, expand Logins, right-click sa, and then click Properties.

On the General page, you might have to create and confirm a password for the sa login.

On the Status page, in the Login section, click Enabled, and then click OK.