May 26, 2011 at 3:21 am
hi,
I can transfer my database one server to another server.After I created logins by using "sp_help_revlogin"
but i didnot get login roles .how can i get this roles any script is there.plz help me...
Regards:
Dastagiri.
May 26, 2011 at 5:03 am
lots and lots of script contributions here on the site:
http://www.sqlservercentral.com/search/?q=script+roles
also search fro "script permissions", lots of nice examples of that as well.
Lowell
May 26, 2011 at 12:11 pm
Yes, I wrote an article on this:
Retrieving SQL Server Fixed Server Roles for Disaster Recovery
K. Brian Kelley
@kbriankelley
May 27, 2011 at 3:14 am
hi,
I opened u r link and used script server roles code .its showing error at bellow code.
WHILE @@FETCH_STATUS = 0
BEGIN
????SET @SQLCmd = 'exec sp_addsrvrolemember ''' + @login + ''' , ''' + @RoleName + ''''
????PRINT @SQLCmd
????SET @Count = @Count + 1
--------------------
syntax error at set @sqlcmd
I attached the error screen plz check it .
May 27, 2011 at 6:54 am
Are you using double quotes for your quoted identifiers? With default settings for connections, this should work just fine (as others have used it).
K. Brian Kelley
@kbriankelley
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply