Database Change Management
Database Change Management
Home | Profile | Register | Active Topics | Active Polls | Members | Private Messages | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?




 All Forums
 Support
 DB Ghost Support Forum
 Continue on Error failed to create object
 New Topic  New Poll New Poll
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

bwakefield


1 Posts

Posted - 09/10/2009 :  12:52:50  Show Profile Send bwakefield a Private Message  Reply with Quote
Hello. I have an issue trying to create a "shell" database from scripts (Database Builder version 5.0.0.1092). Most of the objects do get created, but there are some stored procedures which have problems. The error is similar to below:
Error in C:\xxx\Stored Procedures\dbo.up_MyProc.sql
Msg 15151, Level 16, State 1, Line 1
Cannot find the user 'joe', because it does not exist or you do not have permission.

The stored proc script is a pretty standard format with an “If exist/drop” in the beginning, and the “Grant execute” at the bottom. The user does exist on the database, but isn’t scripted out and under the the .\Logins folder as having permissions to the new db. In the past, the object would still get created, just with the exclusion of the user permissions. With this newer version, the object isn’t created at all. Almost like the whole stored procedure script is in a transaction and is rolled back on any error.

We often would deploy to many different environments (dev, test, uat, production, etc.) and we don’t have all the same users with all the same permissions in every environment.

Has anybody experienced this before? And, any suggestions on how to better work around this?

Thanks,
Bruce

Google AdSense

USA
Mountain View


dbghost



66 Posts

Posted - 09/11/2009 :  06:20:22  Show Profile  Visit dbghost's Homepage Send dbghost a Private Message  Reply with Quote
Hi Bruce,

If you uncheck the "Include Permissions" option the Sproc scripts will not include the GRANT stmts. This will allow the object to be created without the error.

I am assuming you have deliberately chosen not to script out the logins and users.

Hope this helps you.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  New Poll New Poll
 Reply to Topic
 Printer Friendly
Jump To:
Database Change Management © Copyright 2005 Innovartis Ltd. Go To Top Of Page
Snitz Forums 2000
RSS Feed 1 RSS Feed 2
Powered by ForumCo 2000-2008
TOS - AUP - URA - Privacy Policy
ForumCo Free Blogs and Galleries
Signup for a free forum or Go Banner Free