Home Forums SQL Server 7,2000 Administration Need a script to create a new user based on existing user's permission RE: Need a script to create a new user based on existing user's permission

  • I think what you are looking for is almost built in:

    in MS SQL Server Management Studio, browse to Server>>Security>>Logions (NOT [specific database]>>Security)

    right click on the existing user you want to "copy" and select "Script Login As...">>"New Query Window"

    change the script just slightly: find and replace the oldlogin name with the newloginname.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!