Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2002
    Location
    India
    Posts
    37

    Unanswered: Another Login after restoring database

    Hello all,
    I have created a backup of a database and Restored as a new database in another machine.
    Primary login of the database was X , now after restoring as a new database I dont want X as the login name i want it to be Y ...
    how to do that ?

    I can create other login as y and Give necessary premissions...but the Problem is i have to manually issue all the permissions to the new user which i feel is a time taking process.

    Please let me know about it..

    Thanks and Regards
    sai

  2. #2
    Join Date
    Jan 2003
    Location
    India
    Posts
    523
    I am not sure but u can try this :
    script the login and user for the database in question,after generating the script for the user X,delete the the user X from the database ,Replace the user/login name X from the script with Y and run the script on the database.
    I think this should work after some enhancements in the script.

  3. #3
    Join Date
    Dec 2002
    Location
    Czech Republic
    Posts
    249
    Use roles!

    Or sp_change_users_login SP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •