>From SSMS you can Rt Click on a database, Generate Scripts. This brings up a wizard that you tell which dbs to script out and to what level you would like. It will allow you to define all or any SP, View, Table, User, Schema etc.
Real fast and easy to use. ......................... Stephen Russell - Senior Visual Studio Developer, DBA Memphis, TN 901.246-0159 -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of I~N~S~I Sent: Friday, November 14, 2008 10:45 PM To: DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting Subject: [DotNetDevelopment] Creating Databases using another database as a template I have a requirement which is to create a application which is able to create databases based on another database. i need to copy only the table structures no need to copy the data. At present im just creating SQL command objects with the comment text containing the the create table statements (which i had to hard code into the code) and use the ExecuteNonQuery() and execute. This becomes very painful when i do sme structure modification to the database (base database) as now i have to edit the database creation part. I found one method of doing it using 'SQL Server Management Objects' which generate the create table statements. but im not sure whether i can use it becos im running the application in machine which do not have a sql server installed (they connect to the sql server through LAN). So i cannot add the reference as most of the machines will be having only the .Net framework installed. if anyones interested refer below link for more details on this method. http://davidhayden.com/blog/dave/archive/2006/02/09/2795.aspx Is there another way of archiving this? thanks in advance No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.175 / Virus Database: 270.9.3/1786 - Release Date: 11/14/2008 8:32 AM
