Dude, you have to give the SQL engine something to work with for the install
right?  This is a large text file that is passed to the server and executed.


One part of your distribution process is to make a new Database script.  It
may take all of 2 min time to generate this unless you have hundreds of SPs
and Views then it may take 3 min.  

You could break the script into parts.  DB, Tables and Indexes.  Then SPs,
views and UDFs.  Now submit the parts instead of the whole for creation.



…………………………………………………………………
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: Saturday, November 15, 2008 7:40 AM
To: DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web
Services,.NET Remoting
Subject: [DotNetDevelopment] Re: Creating Databases using another database
as a template


thanks for ur reply. but i need to create this from my Application it
self. I'm using C# .Net i dont want to change my code which creates
the database each time i do a change the structure of the Base
Database.

On Nov 15, 6:30 pm, "Stephen Russell" <[EMAIL PROTECTED]> wrote:
> 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

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


Reply via email to