[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

SQL 2005 Export user securables

Posted on 2014-01-27
2
Medium Priority
?
850 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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:
Deepak Chauhan earned 1500 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
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.

649 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