Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Accidentally deleted all existing privilges for a domain account - Help Expand / Collapse
Author
Message
Posted Wednesday, November 13, 2013 3:19 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Friday, December 12, 2014 3:06 PM
Points: 211, Visits: 525
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
Post #1514078
Posted Wednesday, November 13, 2013 3:51 PM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Thursday, December 18, 2014 10:53 AM
Points: 597, Visits: 937
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
Post #1514087
Posted Wednesday, November 13, 2013 3:55 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Friday, December 12, 2014 3:06 PM
Points: 211, Visits: 525
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
Post #1514090
Posted Thursday, November 14, 2013 8:39 AM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Thursday, December 18, 2014 10:53 AM
Points: 597, Visits: 937
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
Post #1514322
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse