I need to run the following command on a SQL2008 R2 server:-
master..xp_cmdshell 'osql -Usa -Pabc -Q"EXEC master..sp_help_revlogin" -dmaster -o\\c:\sql_logins.sql'
This command is running fine on another server producing the correct output - a list of sql logins to a file on the file system
However, on this particular server it is returning
Login failed for user 'sa'.
This is despite me changing the sa password to a simple password of abc
Any assistance appreciated
Thanks