Log in user error

  • Hello everyone

    I create one user with windows authentication and that user has read only permissions.

    and i select master database as default database. and user mapping to STARS database.

    it created successfully.

    but problem is,

    The STARS database is restore everyday. so after restore that user mapping is missing for this user.

    so i need to map STARS Database after Database getting restored.

    so what i need to do for user mapping is there after Database restores everyday.

    Please help me to do this.

    Thanks

  • if the database is restored automatically each day, the easy solution is to add to teh current script, so that after teh restore, the mapping you need is performed.

    if it's done manually, you could make an extended event that performs your mapping after the AUDIT_BACKUP_RESTORE_EVENT event.

    there's a good article on event notifications here:

    http://www.sqlservercentral.com/articles/Event+Notifications/68831/

    By Jonathan Kehayias, 2009/12/22

    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!

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply