Re: How to generate SQL server script programmatically?
From: FLX (nospam_at_hotmail.com)
Date: 06/24/04
- Next message: Brian: "Event ID 40961 when trying to connect to SQL"
- Previous message: Steve Thompson: "Re: what does "ingnore duplicate key" do when creating an index"
- In reply to: Mark Allison: "Re: How to generate SQL server script programmatically?"
- Next in thread: Mark Allison: "Re: How to generate SQL server script programmatically?"
- Reply: Mark Allison: "Re: How to generate SQL server script programmatically?"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 24 Jun 2004 09:22:30 -0500
Dave,
Thank you very much for the quick response.
I will try the VB solution.
I have two other questions:
1) Do you know any Java solution for this? I can play with VB, but more
comfortable with Java.
2) Can the VB solution deal with the encrypted stored procedures?
Lixin
"Mark Allison" <marka@no.tinned.meat.mvps.org> wrote in message
news:eND9wEfWEHA.2972@TK2MSFTNGP12.phx.gbl...
> Lixin,
>
> There are several solutions to this. Depends on how you want to do it.
> Options are:
>
> 1) T-SQL to generate INSERT statements for your data. see
> http://vyaskn.tripod.com/code.htm#inserts
>
> 2) SQL-DMO to script out a server. See
> http://www.apress.com/book/bookDisplay.html?bID=118 there's a code link
> in there for some VB with SQL-DMO to script out a server. Perhaps you
> can adapt the code there.
>
> 3) Book. http://vyaskn.tripod.com/real_world_sql_dmo_for_sql_server.htm
;-)
>
> I am also aware of a few third party products that can do this, have a
> search on Google.
>
> --
> Mark Allison, SQL Server MVP
> http://www.markallison.co.uk
>
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
>
>
> FLX wrote:
> > I need prepare an install package for a production SQL Server, which has
> > several databases. The install package basically will consist of scripts
for
> > every objects in the databases, like all the tables, stored procedures,
> > logins, insert statements for the static in the tables, views, User
defined
> > functions, etc. The goal here is to run these scripts so that we can
rebuild
> > the databases on different servers easily.
> >
> > The databases sizes are all very large. It is not practical to make a
backup
> > file and restore, reattach, etc.
> >
> > Is there easy way to do this? I know how to manually generate scripts
using
> > Enterprise Manager. However, I like to find a better and more efficient
way
> > to do it. If I can have or even write a program to do it for me that
will
> > be great. Can anybody show me your "tricks" or point to me a right
> > direction?
> >
> > Thanks a lot,
> > Lixin
> >
> >
> >
- Next message: Brian: "Event ID 40961 when trying to connect to SQL"
- Previous message: Steve Thompson: "Re: what does "ingnore duplicate key" do when creating an index"
- In reply to: Mark Allison: "Re: How to generate SQL server script programmatically?"
- Next in thread: Mark Allison: "Re: How to generate SQL server script programmatically?"
- Reply: Mark Allison: "Re: How to generate SQL server script programmatically?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|