Creating new database fails (Object already exists)
pasha
Posts: 7
Good Morning!
Not sure if it is a bug or an option to be turned on or off. When database is being deployed to a server, it fails with the message that the object already exists (stored procedure). This stored procedure is in both, the original database and the model database on the destination server. So, when the new database is created, the stored procedure is created automatically (from model); then, the Packager tries to create that stored procedure again (from the script).
I know I can de-select the stored procedures when packaging the database, but it is very inconvenient, as I have to do it on many databases. A feature of dropping if exists would be very useful.
Thanks,
Pasha
Not sure if it is a bug or an option to be turned on or off. When database is being deployed to a server, it fails with the message that the object already exists (stored procedure). This stored procedure is in both, the original database and the model database on the destination server. So, when the new database is created, the stored procedure is created automatically (from model); then, the Packager tries to create that stored procedure again (from the script).
I know I can de-select the stored procedures when packaging the database, but it is very inconvenient, as I have to do it on many databases. A feature of dropping if exists would be very useful.
Thanks,
Pasha
Comments
The feature you are looking for is not currently available in SQL Packager.
I have submitted a feature request for the development team to consider adding a new feature - IF EXISTS DROP.
Unfortunately I cannot guarantee that the request will obtain approval and if approval is given, what future version of SQL Packager the feature will appear in.
Many Thanks
Eddie
Eddie Davis
Product Support Engineer
Red Gate Software Ltd
E-Mail support@red-gate.com
Senior Product Support Engineer
Redgate Software Ltd
Email: support@red-gate.com