DB deployment - Create if not exists

Automated deployment for web applications and databases

DB deployment - Create if not exists

Postby paraggadkari » Thu Dec 19, 2013 3:34 am

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!
paraggadkari
 
Posts: 15
Joined: Tue Nov 05, 2013 3:25 pm
Location: United States

Postby Mike Upton » Thu Dec 19, 2013 2:24 pm

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

Project Manager - SQL Compare|Data Compare|Comparison SDK
Redgate Software Ltd.
Mike Upton
 
Posts: 189
Joined: Wed May 11, 2011 8:04 am
Location: Redgate

Postby paraggadkari » Thu Dec 19, 2013 5:08 pm

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:
paraggadkari
 
Posts: 15
Joined: Tue Nov 05, 2013 3:25 pm
Location: United States

Postby Mike Upton » Thu Dec 19, 2013 5:13 pm

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

Project Manager - SQL Compare|Data Compare|Comparison SDK
Redgate Software Ltd.
Mike Upton
 
Posts: 189
Joined: Wed May 11, 2011 8:04 am
Location: Redgate


Return to Deployment Manager

Who is online

Users browsing this forum: No registered users and 0 guests