February 15, 2010 at 2:25 pm
Hi All,
I need to know is there a way/query to change the SA password for all the sql servers we have in a particular domain, we have hundereds of servers whose SA passwords needs to be changed, Its very hard to change them one by one.
Does any one have a query or something to help out.
Thanks
February 15, 2010 at 2:51 pm
Create a script and run that from an ssis package that loops through all of your servers and executes the script against each one.
options
1) USE [master]
GO
ALTER LOGIN [sa] WITH DEFAULT_DATABASE=[master],
DEFAULT_LANGUAGE=[us_english], CHECK_EXPIRATION=ON, CHECK_POLICY=ON
GO
USE [master]
GO
ALTER LOGIN [sa] WITH PASSWORD=N'blah' MUST_CHANGE
GO
2) From a command shell (start > run > cmd)
OSQL -S <YOUR_SERVERNAME_GOES_HERE> -E
1> EXEC sp_password NULL, 'blah', 'sa'
2> GO
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
February 15, 2010 at 2:59 pm
Hi,
can you provide me with example for this servers ascd\1234, sadf\3435, hdjk\3212
is this their any website you are referring to.
Thanks
Raghu
February 15, 2010 at 4:25 pm
Here is an article that performs a similar task
http://www.sqlservercentral.com/articles/Integration+Services+(SSIS)/64014/
This is to give you an idea of how to create an ssis package that can query each DB server.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
February 15, 2010 at 4:38 pm
This article is more specific to the task at hand.
http://www.codeproject.com/KB/database/foreachadossis.aspx
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply