.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

How to duplicate database using asp.net

Posted By: Ashutosh Jha     Posted Date: December 26, 2013    Points:5   Category :ASP.Net
Hi All,

I am developing one application where i am using SQL Server 2008. I kept one sample database with complete structure and i want when admin will create login for another user a duplicate database should be created automatically with the structure same as the sample database and the newely user will use the duplicate database.

Author: Nagarajan             
Posted Date: December 28, 2013     Points: 20   


We have option to Backup and Restore the DB in SQL. Take the Backup of master DB and Restore it in another DB. And Change the Connection string for New (Ordinary) User. Admin will take care of Master DB.

Author: Ashutosh Jha             
Posted Date: December 29, 2013     Points: 20   

Hi Nagarajan,

Thanks for the update. But can you tell me excately how it can be done. It will be really helpfull if you could provide any reference for this.

Ashutosh Jha

Author: Nagarajan             
Posted Date: January 04, 2014     Points: 20   

Hi Ashutosh,

Here you may find example for Copy DB and changing the connection string dynamically.

Copy DB:

Dynamic Connection string:

Author: Ashutosh Jha             
Posted Date: January 06, 2014     Points: 20   

Thanks Nagarajan.
i will try and get abck to you if i need any help.

Ashutosh Jha


Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend