Reputation: 1609
I have one machine only (A) and I have a databese (db1) and I want to copy this database to same machine but to a newone database db2.
I am using SQL Server Management Studio 2008 and my database is MS SQL Server 2008
How can do that
Thank you
Upvotes: 1
Views: 90
Reputation: 1609
Thank @Manoj I try the solution 3 BUT first I deleted the destination databse (db2) and then made the restore and works fine.
So the solution is A. Delete Destination database B. See @Manoj Solution 3
Upvotes: 0
Reputation: 883
try this way when it has to be in same machine
1. RightClick on you existing database then - Task - Restore - Database
2. A new window will open
3. Specify new database name in "To Database"
4. Then click OK
Thanks
Manoj
Upvotes: 1
Reputation: 13931
Solution 1.
You can use export database feature.
After this you can select source and destination.
However this will "copy" only data, stored procedures will be not copied.
Solution 2.
You can generate SQL scripts to re-create all objects in database (including stored procedures).
However I dont know if this will copy all objects with data in tables or just table structure.
Solution 3.
Edited.
Use backup/restore feature.
For details see Manoj answer above/below.
Upvotes: 1