Click here to Skip to main content
15,920,687 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to clone a sql database (without data) by C# programmatically?
Posted
Comments
Afzaal Ahmad Zeeshan 21-Nov-14 8:53am    
Read the schema of the database, and create an exact database with that schema.
Maciej Los 21-Nov-14 8:55am    
That's an answer ;)
Afzaal Ahmad Zeeshan 21-Nov-14 8:56am    
I would post it then. :D

1 solution

Like this:

Copy Database Schema and Data Using SQL Server Management Objects (SMO)[^]

You can skip the TransferData part if you are not interested in copying data.
 
Share this answer
 
Comments
Maciej Los 21-Nov-14 11:41am    
+5

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