Wednesday, March 7, 2012

can i use scm to change to sa password

for some reason i changed my sqlserver sa password as 'newpassword', i try to find a way to resolve the sqlserveragent settings , in connection tab, i choose 'sqlserver authority',
i try the command below to changed the sa pwd:

>scm -Action 7 -Service sqlserveragent -Pwd newpassword
>net start sqlserveragent
but the modify of scm is not commit although the message tell me that modify is successful.
can I use SCM to modify sqlserveragent settings?

Hi,

to change the SQL Server Agent password , first you have to change the password for a User which is used to start SQL Server Agent service and then go to Start->Settings->Control Panel->Administrative Tools-> Services->Select services ->Open it->go to Log On->and then change your new password here too.

Hemantgiri S. Goswami

|||

We can use windows authority to start mssqlserveragent and log the sqlserver instance,and windows authority+sql authority also,

windows authority to start sqlserveragent service, sql authority or windows authority to log the sqlserver instance and run service

i use sql authority to log the sqlserver instance(setting in connection option),after change the sa password,i want to use code to change the sqlserveragent settings,such as connection login user (sa) password.Can I do it?

|||

How possible is it to have this done through t-sql statements? I would like to do this with sql scripts and not using Enterprise manager to change the sql server agent's connection parameters (username and password)

Someone shed some light on this.

Cheers

|||i do not use T-SQL,but SQLSERVER tools named SCM,you can find this file in the installed directory|||

I will not recommand for T-SQL

Thanks

Faiz Farazi

www.databasetimes.net

Best learning center for Microsoft

http://www.lascomp.com

|||But, is there a way to do it through t-sql was my question. If so how to do that?|||

Yes you can use SP_PASSWORD statement and BOL defines that:

This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. Use ALTER LOGIN instead.

|||

Please read my question again. I think it was misread. I didn't want to know how to change the password... I wanted to know using t-sql how to change the connection parameters for SQL server Agent (username and password) that shows up on SQL server Agent Properties >> connection Tab >> that uses a local system account... which in this case I wanted to change it to use SA and its password or any other that has got proper permissions. Hope this explains.

|||

Hi,

Any success with your query? Have a similar requirement and have been looking around for an answer. No success yet :-(

No comments:

Post a Comment