-
script logins
i need to script out the logins/passwords for a server into a text file on a regular basis.
i am using the sp_help_revlogin stored procedure (http://support.microsoft.com/default...b;en-us;246133)to generate the
script required to recreate logins/passwords.
how do i send the output of "exec sp_help_revlogin" to a text file in a job?
i tried using bcp but it gives an error "host files must contain at least one column".
idea? thoughts?
thanks.
-
Create job for Command exec and use the below command
osql.exe -SServernmae -E -Q"exec master..sp_help_revlogin" > c:\Logins.txt
-
coolness ! thanks much
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|