I have run into something quite odd, i haven't had this issue before, or maybe i'm missing something here.
In SQL Server Management Studio 2012 i am trying to run a Query to create a new database but it ends up cloning an old database, the code i'm using is:
CREATE DATABASE SEC_SSG_INOUT;
GO
USE SEC_SSG_INOUT;
GO
The database gets created with the correct name but it contains the same tables and stored procedures as an old database called SEC_SSG, but with empty data.
What is going on here?
To create a development database In SQL Server Object Explorer, under the SQL Server node, expand your connected server instance. Right-click the Databases node and select Add New Database. Rename the new database to TradeDev. Right-click the Trade database in SQL Server Object Explorer, and select Schema Compare.
A database clone is a complete and separate copy of a database system that includes the business data, the DBMS software and any other application tiers that make up the environment.
Expand Databases, right-click the desired database, point to Tasks, and then select Copy Database... If the Welcome to the Copy Database Wizard splash page appears, select Next. Select a Source Server page: Specify the server with the database to move or copy.
You must have added these objects to your model
database by mistake at some point.
This gets used as the template for all new databases. Any objects created in there will be present in new databases CREATE
-ed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With