Red Gate forums :: View topic - DB deployment - Create if not exists
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
Deployment Manager
Deployment Manager forum

DB deployment - Create if not exists

Search in Deployment Manager forum
Post new topic   Reply to topic
Jump to:  
Author Message
paraggadkari



Joined: 05 Nov 2013
Posts: 15
Location: United States

PostPosted: Thu Dec 19, 2013 3:34 am    Post subject: DB deployment - Create if not exists Reply with quote

For DB deployment, there are two options for each environment:
- Upgrade
- Drop and Create

Is there a way to create the DB if not exists otherwise upgrade the existing DB?

Thanks!
Back to top
View user's profile Send private message
Mike Upton



Joined: 11 May 2011
Posts: 108
Location: Red Gate

PostPosted: Thu Dec 19, 2013 2:24 pm    Post subject: Reply with quote

Upgrade mode will do what you want. Drop and create always drops any existing database before recreating it, while upgrade just applies whatever changes are necessary. This includes creating the database if it doesn't exist.
_________________
Mike Upton

Software Engineer
Red Gate Software Ltd.
Back to top
View user's profile Send private message
paraggadkari



Joined: 05 Nov 2013
Posts: 15
Location: United States

PostPosted: Thu Dec 19, 2013 5:08 pm    Post subject: Reply with quote

Unfortunately, "Upgrade" mode looks for a DB and fails with network error if DB doesn't exist.

After searching through the documentation, I did find this behavior documented in the below link:
Back to top
View user's profile Send private message
Mike Upton



Joined: 11 May 2011
Posts: 108
Location: Red Gate

PostPosted: Thu Dec 19, 2013 5:13 pm    Post subject: Reply with quote

Would you be able to post the deployment log from the failing deployment? If you go the deployment details page and click the 'Raw' link, you'll get a plain text version of the log you can copy and paste.
_________________
Mike Upton

Software Engineer
Red Gate Software Ltd.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic 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