Red Gate forums :: View topic - Problems with database roles
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Source Control EAP
SQL Source Control EAP forum

Problems with database roles

Search in SQL Source Control EAP forum
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Jump to:  
Author Message
dsp



Joined: 30 Jan 2010
Posts: 17

PostPosted: Tue Mar 09, 2010 1:54 pm    Post subject: Problems with database roles Reply with quote

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
Quote:
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:
Quote:
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.
Back to top
View user's profile Send private message
Chris Auckland



Joined: 24 Oct 2006
Posts: 755
Location: Red Gate Software Ltd.

PostPosted: Fri Mar 12, 2010 2:56 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail
dsp



Joined: 30 Jan 2010
Posts: 17

PostPosted: Fri Mar 12, 2010 3:52 pm    Post subject: Problems with database roles Reply with quote

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).
Back to top
View user's profile Send private message
Chris Auckland



Joined: 24 Oct 2006
Posts: 755
Location: Red Gate Software Ltd.

PostPosted: Fri Mar 12, 2010 6:33 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies. All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group