Problems with database roles

Early Access Program for SQL Source Control

Moderators: Chris Auckland, David Atkinson, sherr

Problems with database roles

Postby dsp » Tue Mar 09, 2010 1:54 pm

I am currently testing the DotnetNuke database. My colleague linked it to TFS and I tried to create it. At the level "Applying changes to database" an error appears
User or role 'aspnet_Membership_FullAccess' does not exist in this database.
.
When I close the errorwindow I see that the script to create this role has been unchecked, a link "Conflict - click" appears in front of it with the following error:
Conflict:
The database version of the object and the source control version have both been modified. These modifications are not compatible, resulting in a conflict.
Resolution:
Update the object with the latest source control version, and then make your changes to that updated version.
Note that this overwrites the current database version.
or
Manually revert the affected object using your source control system.


The database versions are both 2008 so I don't understand that message.

I can click 'Cancel' or 'Acknowledge that Database Version Can Be Overwritten'. If I choose Acknowledge and get the latest version again, it gives an error at aspnet_Profile_BasicAccess. In the "Get Latest" list I find two conflict links. This time I clicked cancel and tried it again. I receive a Dependencies window that let me choose to include the two excluded roles. I uncheck the dependencies and get an error on the next role.

I decided to uncheck all roles to see what was going to happen and errors about schemas started to appear. I even got some exceptions that let me send reports (which I did several times). The errors were about files being in use in my local folders\\Redgate directory.
dsp
 
Posts: 17
Joined: Sat Jan 30, 2010 7:46 pm

Postby Chris Auckland » Fri Mar 12, 2010 2:56 pm

Thanks for your post.

I'm guessing that you already have an existing copy of DotNetNuke db on your local instance, and the problem is trying to overwrite your copy with the version in source control.

We should be able to handle this scenario with SQL Source control, but we currently have a few issues if users start off with an existing db.

Would you be able to send us the schema for your local and source controlled copy and we can see if we can spot the problem? You can take a schema snapshot of your local db with the following tool: http://labs.red-gate.com/index.php/Red_Gate_Snapper

Are you able to 'get latest' if you start off with a blank db and link to that?

If you need to keep the data, would you be able to use SQL Data Compare to populate the latest schema with the data from the old database.

If you can send us a zip with the files, please send to support@red-gate.com and mark it for the attention of Chris.

Thanks,
Chris
Chris Auckland
 
Posts: 757
Joined: Tue Oct 24, 2006 2:12 pm
Location: Red Gate Software Ltd.

Problems with database roles

Postby dsp » Fri Mar 12, 2010 3:52 pm

No, I did not have a copy of this db, I created a blank database with the correct name and that was all, the schema for the source controlled copy I'll send you by mail (it can not in this forum I presume).
dsp
 
Posts: 17
Joined: Sat Jan 30, 2010 7:46 pm

Postby Chris Auckland » Fri Mar 12, 2010 6:33 pm

Thanks for the snapshot, I can see the problem now.

It looks like SQL Source control is failing bacuse it is trying to create role memberships with roles that haven't yet been created.

This is now logged as bug SOC-830 and will be look at by the development team.

You can workaround the problem for now by first retrieving only the roles, and then retrieve all the other objects. Don't worry about resolving the conflicts until you have all the roles in your local db. Once you have the roles, you can resolve the conflicts and grab the rest of the objects.

I hope this helps.
Chris
Chris Auckland
 
Posts: 757
Joined: Tue Oct 24, 2006 2:12 pm
Location: Red Gate Software Ltd.


Return to SQL Source Control EAP

Who is online

Users browsing this forum: No registered users and 0 guests