February 4, 2009 at 9:29 am
When I ran my restore/backup code, one of my roles are coming back, so I do:
use [Master]
restore database cs_DotNetNuke
from disk = 'c:\cs_DotNetNuke.dat'
with move 'cs_DotNetNuke' to 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\cs_DotNetNuke.ndf',
move 'cs_dotnetnuke_log' to 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\cs_DotNetNuke_log.ldf',
REPLACE
go
EXEC sp_addrolemember N'db_datareader', N'S602561DC4EW31\GPWebUser'
EXEC sp_addrolemember N'db_datawriter', N'S602561DC4EW31\GPWebUser'
After this I go back to the GPWebUser Roll and db DotNetNuke is not checked, but security rolls checked under db. What I am doing wrong?Thank you
February 4, 2009 at 11:53 am
Have this included in your restore statement after restore code
use [cs_DotNetNuke]
EXEC sp_addrolemember N'db_datareader', N'S602561DC4EW31\GPWebUser'
EXEC sp_addrolemember N'db_datawriter', N'S602561DC4EW31\GPWebUser'
HTH!
MJ
February 4, 2009 at 11:59 am
And be sure to execute the following, if adding the user to the master database roles was not your intention:
USE [master]
GO
EXEC sp_droprolemember N'db_datareader', N'N'S602561DC4EW31\GPWebUser'
GO
EXEC sp_droprolemember N'db_datawriter', N'N'S602561DC4EW31\GPWebUser'
GO
"Got no time for the jibba jabba!"
-B.A. Baracus
February 4, 2009 at 1:02 pm
I actually do run this:
use [cs_DotNetNuke]
EXEC sp_addrolemember N'db_datareader', N'S602561DC4EW31\GPWebUser'
EXEC sp_addrolemember N'db_datawriter', N'S602561DC4EW31\GPWebUser'
and like I said before db is not checked, but rolemember is and don't know why?Thank you
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply