In a project I work on, we would like to generate scripts for them and create a database named differently than we have.
For example: our application/database is called 'Original', now I would like to generate all scripts but change the to-be-created database name to 'Customer' without having to edit the scripts or open them in the SQL Server Management Studio and run them myself. (One-click deployment)
Connecting to the database 'Customer', which does not exists yet, will ensure the checkboxes (in the 'Execute source code' step) are checked accordingly. The 'DB' and the 'Create' scripts are checked and the generated script will run on the given database. But sadly the first script does not contain the 'Customer' database name, but the 'Original' name. So an error will occur since it tries to create a database that already exists, or even worse, make a database which will not be used.
Where can I change this?
I noticed that the Runtime configuration does affect the generation of the 'DB' script but is this the only way?
Solved
Is it possible to generate a 'DB' script with a different database name than used before?
Best answer by Anne Buit
Hi Mark,
You are correct, in 2018.3 the fields Dave was writing about have been moved. These settings can now be found in the menu, under Deployment - Runtime configurations.
The database name used in the default runtime configuration will be used in database creation scripts.
View originalYou are correct, in 2018.3 the fields Dave was writing about have been moved. These settings can now be found in the menu, under Deployment - Runtime configurations.
The database name used in the default runtime configuration will be used in database creation scripts.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.