Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Accidentally deleted all existing privilges for a domain account - Help


Accidentally deleted all existing privilges for a domain account - Help

Author
Message
Minnesota - Viking
Minnesota - Viking
SSC Veteran
SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)

Group: General Forum Members
Points: 217 Visits: 564
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.


Today is the tomorrow you worried about yesterday:-)

Keith Tate
Keith Tate
SSChasing Mays
SSChasing Mays (614 reputation)SSChasing Mays (614 reputation)SSChasing Mays (614 reputation)SSChasing Mays (614 reputation)SSChasing Mays (614 reputation)SSChasing Mays (614 reputation)SSChasing Mays (614 reputation)SSChasing Mays (614 reputation)

Group: General Forum Members
Points: 614 Visits: 979
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
Minnesota - Viking
Minnesota - Viking
SSC Veteran
SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)

Group: General Forum Members
Points: 217 Visits: 564
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 :-o ? that is like 1.5 TB worth 156 databases.


Today is the tomorrow you worried about yesterday:-)

Keith Tate
Keith Tate
SSChasing Mays
SSChasing Mays (614 reputation)SSChasing Mays (614 reputation)SSChasing Mays (614 reputation)SSChasing Mays (614 reputation)SSChasing Mays (614 reputation)SSChasing Mays (614 reputation)SSChasing Mays (614 reputation)SSChasing Mays (614 reputation)

Group: General Forum Members
Points: 614 Visits: 979
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search