Solved

SQL 2005 Export user securables

Posted on 2014-01-27
2
772 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

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
MS SQL Bulk load data error 5 33
PL/SQL query 14 40
Complex SQL 10 33
How to find duplicates in SQL Server 3 21
I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

707 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now