Accidentally deleted all existing privilges for a domain account - Help

  • I was using a tool to copy permissions from old account to new accounts and I dont know what in the seven hills the tool did but today morning I realized that both my source and destination logins have no permissions in them except public on server.

    So if I go back one day in time the logins had access to certain databases. I don't know to which. How do I recover the privillges for certain logins (known) on certain databases (unknown).

    I thought sp_helplogins will save me but unfortuantely it runs a cursor in the background that spans across all DBs and checks for current permissions.

    I have A backup of Master DB from Yesterday. Will this help ?

    In other words I need the output of sp_helplogins .. but from yesterday. And sp_helplogin is deriving everything from master DB it is gng DB by DB to look for current logins.

    Please suggest.

    [font="Verdana"]
    Today is the tomorrow you worried about yesterday:-)
    [/font]

  • So basically you will need the Master database to get the permissions for your logins and the user database(s) for the permissions for the users that are associated with those server logins.

    Do you have a test server where you can restore the master and all user databases to?



    Microsoft Certified Master - SQL Server 2008
    Follow me on twitter: @keith_tate

    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • Yes, I do have a test server and I can restore the master there. but Do i have to restore all the user DBs as well 😮 ? that is like 1.5 TB worth 156 databases.

    [font="Verdana"]
    Today is the tomorrow you worried about yesterday:-)
    [/font]

  • The master will have your login premissions, but if you want to get back your DB premissions you will need to have the user databases. Now maybe you have orphaned users in your user DBs, so I would restore master first and then use sp_change_users_login sproc to see if you can take care of the orphaned users. If not, then you will need to restore at least the Primary FG on each user database.

    http://technet.microsoft.com/en-us/library/ms177425.aspx



    Microsoft Certified Master - SQL Server 2008
    Follow me on twitter: @keith_tate

    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

Viewing 4 posts - 1 through 3 (of 3 total)

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