Schema owned by a role - Deployment Error

Compares and synchronizes SQL Server databases, backups and scripts.

Moderators: JonathanWatts, Chris Auckland, David Atkinson, eddie davis, Anu Deshpande, Michelle Taylor, alice.easey, james.billings, chengvoon.tong

Schema owned by a role - Deployment Error

Postby ohm » Thu May 10, 2012 5:45 am

When trying to deploy a database with SQL Compare to a new database and the source database contains a schema that is owned by a role an error can occur.

The way deployment scripts are ordered schemas are created before roles, so in the case of the above the following error will occur:

Code: Select all
[15151] Cannot find the user 'TEST_SCHEMA', because it does not exist or you do not have permission.
CREATE SCHEMA failed due to previous errors.

The following SQL command caused the error:

CREATE SCHEMA [TEST_SCHEMA]
AUTHORIZATION [TEST_SCHEMA]


This is obviously because your role hasn't yet had the chance to be deployed and hence your script will fail. Editing the script manually to create the role before said schema will allow the deployment through without fault.

Can the developers please check for schemas owned by roles and rearrange how the deployment scripts are created for these cases?

Thanks!
ohm
 
Posts: 1
Joined: Thu May 10, 2012 5:39 am

Postby eddie davis » Mon May 14, 2012 10:15 am

Hi Ohm

Thank you for your post into the forum.

I have added the details of this forum post to an existing Bug Report reference SC-5584. We hope to have a fix for this particular bug in the next version SQL Compare V10.2. Sadly I do not have a release date at this time.

I will update this forum post when I receive further information.

Many Thanks
Eddie
Eddie Davis
Technical Support Engineer
Red Gate Software Ltd
E-mail: support@red-gate.com
eddie davis
 
Posts: 943
Joined: Wed Jun 14, 2006 3:47 pm
Location: Red Gate Software

Postby eddie davis » Wed May 16, 2012 6:16 pm

Hi Ohm

Quick update for you. Sadly your bug SC-5584, did not make into SQL Compare V10.2 released earlier today. I am sorry if I raised your expectations on fixing this problem.

Hopefully this bug will be fixed in the near future.

Many Thanks
Eddie
Eddie Davis
Technical Support Engineer
Red Gate Software Ltd
E-mail: support@red-gate.com
eddie davis
 
Posts: 943
Joined: Wed Jun 14, 2006 3:47 pm
Location: Red Gate Software

Postby eddie davis » Wed Jun 06, 2012 7:49 pm

Hi Ohm

You will be please to know that the bug you reported to us in this forum thread which resulted in Bug report SC-5584 has now been resolved in SQL Compare V10.2.0.916.

Please use this LINK to download.

Can you please download and upgrade to confirm that this problem is resolved in your environment.

Many Thanks
Eddie
Eddie Davis
Technical Support Engineer
Red Gate Software Ltd
E-mail: support@red-gate.com
eddie davis
 
Posts: 943
Joined: Wed Jun 14, 2006 3:47 pm
Location: Red Gate Software


Return to SQL Compare 10

Who is online

Users browsing this forum: No registered users and 0 guests