June 14, 2012 at 4:20 am
Hi,
I have a database with a 'database role' and it have a user member. If a use the 'Copy Database Wizard' to copy my database from my SQL Server 2008 to my other SQL Server 2008 R2 server the copy task failed. If i delete the database role from my source database the
database copy task run ok.
Is there a bug? In this case how i can warkaround it?
Many thanks in advance.
June 15, 2012 at 7:38 am
What error do you get? Can you script out the role and user and display the SQL for it?
June 18, 2012 at 12:34 am
Hi Robert,
I get the next error in the windows event log after execute 'Copy Database Wizard':
"Event Name: OnError
Message: ERROR : errorCode=-1073548784 description=Executing the query "sys.sp_addrolemember @rolename = N'MyRole', @m..." failed with the following error: "The role 'MyRole' does not exist in the current database.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
..."
The role script is:
CREATE ROLE [MyRole] AUTHORIZATION [dbo]
GO
And the user script is:
CREATE USER [MyUser] FOR LOGIN [MyUser] WITH DEFAULT_SCHEMA=[dbo]
GO
EXEC dbo.sp_addrolemember @rolename=N'MyRole', @membername=N'MyUser'
GO
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply