Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,
I want to copy a database to new database and save that in given location. Also tell me can the new database name is same as previous one?
Posted
Comments
Om Prakash Pant 16-Sep-11 6:04am    
you want this in c# or you need one time database backup and restore?
Mehdi Gholam 16-Sep-11 6:04am    
SQL Server, Oracle, Access, Sqlite, MySql which database?
sachin10d 16-Sep-11 6:38am    
We can copy database to new database and save that in given location.
but we cannot give the same name to the new database.
ssyuvaraja 16-Sep-11 7:17am    
K. Please tell me the commend for that.

1 solution

check the following article for backup and restore database (SQL Server)

http://www.sqlteam.com/article/backup-and-restore-in-sql-server-full-backups[^]

if you want to do this using c#, then check the following article:

SQL Server 2005 Database Backup and Restore using C# and .NET 2.0[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900