Results 1 to 3 of 3

Thread: script logins

  1. #1
    Join Date
    Apr 2005
    Posts
    8

    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.

  2. #2
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    Create job for Command exec and use the below command

    osql.exe -SServernmae -E -Q"exec master..sp_help_revlogin" > c:\Logins.txt

  3. #3
    Join Date
    Apr 2005
    Posts
    8

    Thumbs up

    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
  •