Solved

SQL 2005 Export user securables

Posted on 2014-01-27
2
791 Views
Last Modified: 2014-02-15
I have a database table that has a user with 40 or 50 securable references to SPROC, tables etc.

Is there a way to export those securable references along with their associated granted permissions so they can be applied to the same user in a test environment?

i.e.   Sproc1     stored procedure
         execute
         Table1     table
          execute, insert

Thanks
0
Comment
Question by:jdr0606
2 Comments
 
LVL 34

Expert Comment

by:Brian Crowe
ID: 39813525
Options include:

Third-party tool (i.e. RedGate SQL Compare)
Script (i.e. http://www.sqlsoldier.com/wp/sqlserver/transferring-logins-to-a-database-mirror)
0
 
LVL 15

Accepted Solution

by:
deepakChauhan earned 500 total points
ID: 39862236
First transfer the logins to testing instance by using the scripts in below Microsoft link.
 http://support.microsoft.com/kb/918992

Generate the scripts of the database by using the generate scripts wizard.
Run the database scripts on to testing instance. –method one
or
Take the backup of database and restore it on the testing environment. –method 2
Find the orphan user in database
Use <[test database]>
Execute sp_change_users_login 'report'
Go
Execute sp_change_users_login 'auto_fix', ‘<user name>’
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question