﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2008 / SQL Server 2008 - General  / Scripting out permission for database? / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Mon, 20 May 2013 21:14:19 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Scripting out permission for database?</title><link>http://www.sqlservercentral.com/Forums/Topic1384732-391-1.aspx</link><description>looks like some sort of problem with the copy\paste from the site.click on the error message in the results pane and it will take you to the actual error in the code. Its purely syntax so some character has been misinterpreted.Remember to go through the discussion on the script to get an improvement to part of it.</description><pubDate>Fri, 30 Nov 2012 03:35:26 GMT</pubDate><dc:creator>george sibbald</dc:creator></item><item><title>RE: Scripting out permission for database?</title><link>http://www.sqlservercentral.com/Forums/Topic1384732-391-1.aspx</link><description>hey I try to execute (Reverse-Engineer Database Permissions (2005 up)) http://www.sqlservercentral.com/scripts/Permissions/76450/I am getting error. Msg 102, Level 15, State 1, Procedure usp_get_object_permissions, Line 44Incorrect syntax near ' '.Msg 102, Level 15, State 1, Procedure usp_get_object_permissions, Line 50Incorrect syntax near ' '.</description><pubDate>Thu, 29 Nov 2012 12:38:05 GMT</pubDate><dc:creator>Ranzz</dc:creator></item><item><title>RE: Scripting out permission for database?</title><link>http://www.sqlservercentral.com/Forums/Topic1384732-391-1.aspx</link><description>You could try:Right-click on db name, select Tasks -&amp;gt; Generate ScriptsThere you have a number of scripting options including scripting out Users, Roles, and Schemas. There is an advanced options tab that will give you even more choices of what to put in the script output. </description><pubDate>Fri, 16 Nov 2012 11:28:30 GMT</pubDate><dc:creator>Steven Willis</dc:creator></item><item><title>RE: Scripting out permission for database?</title><link>http://www.sqlservercentral.com/Forums/Topic1384732-391-1.aspx</link><description>[quote][b]vikingDBA (11/16/2012)[/b][hr]See the following url for an Instance Security Audit script I wrote.  It prints in columnar format, and you can change one variable to make it print the actual assignment statements for the permissions.  The posting explains a little more.Hope it helps.http://www.sqlservercentral.com/Forums/Topic1251262-146-1.aspx?Update=1[/quote]If you want to share this you would be better posting it in the scripts section</description><pubDate>Fri, 16 Nov 2012 07:27:51 GMT</pubDate><dc:creator>george sibbald</dc:creator></item><item><title>RE: Scripting out permission for database?</title><link>http://www.sqlservercentral.com/Forums/Topic1384732-391-1.aspx</link><description>See the following url for an Instance Security Audit script I wrote.  It prints in columnar format, and you can change one variable to make it print the actual assignment statements for the permissions.  The posting explains a little more.Hope it helps.http://www.sqlservercentral.com/Forums/Topic1251262-146-1.aspx?Update=1</description><pubDate>Fri, 16 Nov 2012 06:36:30 GMT</pubDate><dc:creator>vikingDBA</dc:creator></item><item><title>RE: Scripting out permission for database?</title><link>http://www.sqlservercentral.com/Forums/Topic1384732-391-1.aspx</link><description>Georges link again for clarity:[b][url]http://www.sqlservercentral.com/scripts/Permissions/76450/[/url][/b]</description><pubDate>Thu, 15 Nov 2012 09:22:30 GMT</pubDate><dc:creator>Lowell</dc:creator></item><item><title>RE: Scripting out permission for database?</title><link>http://www.sqlservercentral.com/Forums/Topic1384732-391-1.aspx</link><description>have you looked at the link i posted?</description><pubDate>Thu, 15 Nov 2012 08:37:58 GMT</pubDate><dc:creator>george sibbald</dc:creator></item><item><title>RE: Scripting out permission for database?</title><link>http://www.sqlservercentral.com/Forums/Topic1384732-391-1.aspx</link><description>sp_help_revlogin : List outs all the logins from the server, I dont want all the logins. I  just need for a list all the logins in a database:which include login, roles, grant permissions. Any help is greatly appreciated..Thanks in advance. </description><pubDate>Thu, 15 Nov 2012 08:24:28 GMT</pubDate><dc:creator>Ranzz</dc:creator></item><item><title>RE: Scripting out permission for database?</title><link>http://www.sqlservercentral.com/Forums/Topic1384732-391-1.aspx</link><description>[quote][b]Danzz (11/14/2012)[/b][hr]It did'nt help....I need help in scripting out permissions for a database.Please don't say sp_help_revlogin: It gives list out all the logins on a server.[/quote]You asked for a script to list database permissions and that is exactly what it does, how did it not help?</description><pubDate>Wed, 14 Nov 2012 16:15:22 GMT</pubDate><dc:creator>george sibbald</dc:creator></item><item><title>RE: Scripting out permission for database?</title><link>http://www.sqlservercentral.com/Forums/Topic1384732-391-1.aspx</link><description>User permissions are stored in the database.  If i take a backup of MyDatabase and restore it onto a different server all the permissions are going to be the same.  the problem comes in when you create users on the new database machine, you will end up with "Orphaned" users in the database.  You have two options you can use sp_help_revlogin or you can use ALTER USER [url]http://msdn.microsoft.com/en-us/library/ms189828.aspx[/url] to map the orphaned users to a SQL Server login.  Once you have mapped the Logins to Database users (or using sp_help_revlogin you do not have to go through this step as the SID's of the users will remain the same) all the permissions will be there.</description><pubDate>Wed, 14 Nov 2012 14:34:36 GMT</pubDate><dc:creator>CapnHector</dc:creator></item><item><title>RE: Scripting out permission for database?</title><link>http://www.sqlservercentral.com/Forums/Topic1384732-391-1.aspx</link><description>It did'nt help....I need help in scripting out permissions for a database.Please don't say sp_help_revlogin: It gives list out all the logins on a server.</description><pubDate>Wed, 14 Nov 2012 14:32:57 GMT</pubDate><dc:creator>Ranzz</dc:creator></item><item><title>RE: Scripting out permission for database?</title><link>http://www.sqlservercentral.com/Forums/Topic1384732-391-1.aspx</link><description>try [url=http://www.sqlservercentral.com/scripts/Permissions/76450/]this[/url], exactly what you want.read the discussion afterwards as well</description><pubDate>Wed, 14 Nov 2012 10:25:27 GMT</pubDate><dc:creator>george sibbald</dc:creator></item><item><title>RE: Scripting out permission for database?</title><link>http://www.sqlservercentral.com/Forums/Topic1384732-391-1.aspx</link><description>Thanks for your replay, If I am doing refresh from PROD to DEV.I need take a backup script out permissions for a database before restoring in DEV.and restore the permissions back in DEV, when the refresh is done. So, I need help in scripting out permissions for a database..</description><pubDate>Wed, 14 Nov 2012 09:54:55 GMT</pubDate><dc:creator>Ranzz</dc:creator></item><item><title>RE: Scripting out permission for database?</title><link>http://www.sqlservercentral.com/Forums/Topic1384732-391-1.aspx</link><description>you'll need to get a copy of sp_help_revlogin from microsoft; there are different versions, depending on 2000/2005, maybe even for 2008 and above, i don't quite remember.assuming you are going to do a backup from Prod and Restore on the new server, you should be good with that...object permissions are stored int eh databases themselves, and the procedure above will carry the correct sids along with it, so that makes it fairly seamless.don't forget all the other things on production, like certificates, linked servers,and more; theres a current thread on side by side server migration you might want to peek at:[url]http://www.sqlservercentral.com/Forums/Topic1384265-391-1.aspx[/url]</description><pubDate>Wed, 14 Nov 2012 09:43:26 GMT</pubDate><dc:creator>Lowell</dc:creator></item><item><title>Scripting out permission for database?</title><link>http://www.sqlservercentral.com/Forums/Topic1384732-391-1.aspx</link><description>Hi All, moving databases from Prod to new server. And also want to carry forward permissions. Need help on moving permissions. thanks in advance.</description><pubDate>Wed, 14 Nov 2012 09:34:44 GMT</pubDate><dc:creator>Ranzz</dc:creator></item></channel></rss>