Results 1 to 7 of 7

Thread: sp_change_users_login

  1. #1
    Join Date
    Feb 2003
    Location
    Aussie Land
    Posts
    114

    sp_change_users_login

    sp_change_users_login can be used only for SQL Server logins; it cannot be used with Windows logins.

    Is there an alternative to map windows loggins other than to do these steps:
    - sp_revokelogin
    - sp_grantlogin
    - grant permissions

    ????????

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    No there is no easy fix

  3. #3
    Join Date
    Sep 2002
    Posts
    5,938
    Don't need remap db user to windows users after db restoring as long as the login is in sql server.

  4. #4
    Join Date
    Feb 2003
    Posts
    1,048
    The only shortcut that comes to mind is to write the steps into your own stored procedure named sp_something and save it in the master database. Then just call the sp.

  5. #5
    Join Date
    Feb 2003
    Location
    Aussie Land
    Posts
    114
    thanks heaps guys.

    i tested it out by backing up a db on server A and restoring it on server B; then compared the before and after results on NT Logins after a restore. It appears that if that login exists in the new server, their fixed server role on that server does not change, and user permissions did not needed re-mapping if it had existed in the first place. thank rmiao.

  6. #6
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    I thought you had mismatched windows login. If you are moving databases in the same domain then the SID remain same so everything will map, however if you ever have to move from one domain to another then you need to recreate the logins.

  7. #7
    Join Date
    Feb 2003
    Location
    Aussie Land
    Posts
    114
    my apologies skhanal;
    im still learning,
    thats why im using these forums.
    Ill try to be a bit clearer in the future.

Posting Permissions

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