How to Change the 'sa' password in SQL Server 2005


If you happen to forget your SQL Server password for 'sa' account, then here's a simple query to help you reset it:

GO
ALTER LOGIN [sa] WITH DEFAULT_DATABASE=[master]
GO
USE [master]
GO
ALTER LOGIN [sa] WITH PASSWORD=N'MyNewPassword' MUST_CHANGE
GO


In Case you remember your Old Password and want to change the 'sa' password, use this query:


ALTER LOGIN [sa] WITH PASSWORD = N'MyNewPassword' OLD_PASSWORD = 'MyOldPassword';
GO

Comments

Popular posts from this blog

IBM FileNet: Bulk Processing using JavaScript

DB2 Date Time Functions

File Net Insert Document