SQL Compare Error using sp_addrolemember
BaPoll01
Posts: 2
Hi,
We use SQL Compare 9. We are synchronizing from DB-Snapshot scripts to Database in local instance SQL Server Version 2008.
Using the scripts we get errors like the example below when SP addrolemember tries to add an item x (a role or a user) to a role, but x does not yet exist since it is created later in the script.
Procedure sp_addrolemember,
User or role 'aspnet_Membership_FullAccess' does not exist in this database.
Is there a way to influence the order in which objects are defined taking into consideration the dependencies between objects ? We have searched this forum and google without success. Thx for any help.
We use SQL Compare 9. We are synchronizing from DB-Snapshot scripts to Database in local instance SQL Server Version 2008.
Using the scripts we get errors like the example below when SP addrolemember tries to add an item x (a role or a user) to a role, but x does not yet exist since it is created later in the script.
Procedure sp_addrolemember,
User or role 'aspnet_Membership_FullAccess' does not exist in this database.
Is there a way to influence the order in which objects are defined taking into consideration the dependencies between objects ? We have searched this forum and google without success. Thx for any help.
Comments
There isn't any way at all to say "create this object before that" I'm afraid, although the SQL Compare dependency engine should be handling it correctly. If it's not, it's a bug.
Have you tried this with V10? If the same thing happens, we'd need copies of your schemas to reproduce and assuming we could reproduce it, we can schedule a bug fix for a later release of the tool.
Pete
Red Gate Software Ltd
+44 (0)870 160 0037 ext. 8569
1 866 RED GATE ext. 8569