Discussion:
Unable to create user error when using copy database task
(too old to reply)
Rob Nicholson
2009-01-19 12:13:31 UTC
Permalink
I'm trying to copy a database from one SQL 2005 server to another using the
copy database task in SSIS. The basic copy of the database appears to be
working fine but after the copy, the following error is displayed:

Error: The Execute method on the task returned error code 0x80131500 (ERROR
: errorCode=-1073548784 description=Executing the query "CREATE USER
[COMPANY\XYZ] FOR LOGIN [COMPANY\XYZ] " failed with the following error:
"User, group, or role 'COMPANY\InforMed - Employee' already exists 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. helpFile= helpContext=0
idofInterfaceWithError={8BDFE893-E9D8-4D23-9739-DA807BCDC2AC}). The Execute
method must succeed, and indicate the result using an "out" parameter.

COMPANY\XYZ is the Windows account used for access to this database. It's
exists as a login on the destination server but looking at the users against
the copied database, the user doesn't exist. In fact, manually running
Create User command on the database as query works fine.

Any ideas?

Thanks, Rob.
Rob Nicholson
2009-01-19 15:02:11 UTC
Permalink
Post by Rob Nicholson
Error: The Execute method on the task returned error code 0x80131500
(ERROR : errorCode=-1073548784 description=Executing the query "CREATE
USER
Later - this is a bug in the system somewhere fixed with SQL 2005 SP2. I
found a report of a similar problem which said that the "Create User" query
was been run against the master database and not the target database. This
bug was fixed in SP2 and appears to fix my bug as well.

Cheers, Rob.

Continue reading on narkive:
Loading...