SQL Script to generate SQL Scripts??? 
Author Message
 SQL Script to generate SQL Scripts???
Is there a way I can programatically do a "Generate SQL Script" (which I
normally do using Enterprise Manager) using SQL?

Reason being is that I have a lot of databases that need to be scripted
periodically (and in some cases it's just a subset of objects), and it's
getting to be a bit of a pain doing it manually.

Thanks for your help
Alex.



Sat, 27 Aug 2005 11:56:53 GMT
 SQL Script to generate SQL Scripts???

Hi Alex,
For objects other than Tables you can use syscomments .  You should note
that scripts over 4000 characters are spilt into multiple rows.  For Table
objects I haven't come accross a good method to script them yet.

As an alternative, try AGS SQL Scribe Documentation Bulder.  This is my
product and apart from generating great documentation on all scehema objects
it also captures the script from rebuilding them.  You can check out my web
site for an online demo and also to download a 30 day trial.

http://www.ag-software.com/ags_scribe_index.asp

--
I hope this helps
regards
Greg O MCSD
SQL Scribe Documentation Builder
Document any SQL server database in minutes
Programmers love it, DBA dream of it
AGS SQL Scribe download a 30 day trial today
http://www.ag-software.com/ags_scribe_index.asp


Quote:
> Is there a way I can programatically do a "Generate SQL Script" (which I
> normally do using Enterprise Manager) using SQL?

> Reason being is that I have a lot of databases that need to be scripted
> periodically (and in some cases it's just a subset of objects), and it's
> getting to be a bit of a pain doing it manually.

> Thanks for your help
> Alex.



Sat, 27 Aug 2005 12:11:09 GMT
 SQL Script to generate SQL Scripts???
Alex,

I recently came across a good  book that describes how to do things like
this named "Real-World SQL-DMO for SQL Server". You could also try a product
I offer named Largo SQL Tools.  It does scripting of many database objects
and much more.

J.R.
Largo SQL Tools
http://www.largosqltools.com


Quote:
> Is there a way I can programatically do a "Generate SQL Script" (which I
> normally do using Enterprise Manager) using SQL?

> Reason being is that I have a lot of databases that need to be scripted
> periodically (and in some cases it's just a subset of objects), and it's
> getting to be a bit of a pain doing it manually.

> Thanks for your help
> Alex.



Sat, 27 Aug 2005 20:06:02 GMT
 SQL Script to generate SQL Scripts???
SQLDMO (for generating the SQL Scripts) +
VBScript  (to drive the whole process) +
Visual Source Safe (for version control) +
CDO (for email notification of the jobs)
Windows Task Scheduler (for scheduling of the jobs)

is how I do it. All I've gotta do is check my inbox every morning --
email
comes in and tells me if the jobs succeeded or failed. If you don't
need the
version control, you can skip the VSS and the rest of the components
are free!


Quote:
> Is there a way I can programatically do a "Generate SQL Script"
(which I
> normally do using Enterprise Manager) using SQL?

> Reason being is that I have a lot of databases that need to be
scripted
> periodically (and in some cases it's just a subset of objects), and
it's
> getting to be a bit of a pain doing it manually.

> Thanks for your help
> Alex.



Sat, 27 Aug 2005 22:51:27 GMT
 SQL Script to generate SQL Scripts???
I enjoy the free stuff in life, what you mention below is quite close to
what I want to get done (minus the VSS, it's not needed in my case). Do you
have any pointers (links etc) as to how I could get started?

Thanks
Alex



Quote:
> SQLDMO (for generating the SQL Scripts) +
> VBScript  (to drive the whole process) +
> Visual Source Safe (for version control) +
> CDO (for email notification of the jobs)
> Windows Task Scheduler (for scheduling of the jobs)

> is how I do it. All I've gotta do is check my inbox every morning --
> email
> comes in and tells me if the jobs succeeded or failed. If you don't
> need the
> version control, you can skip the VSS and the rest of the components
> are free!



> > Is there a way I can programatically do a "Generate SQL Script"
> (which I
> > normally do using Enterprise Manager) using SQL?

> > Reason being is that I have a lot of databases that need to be
> scripted
> > periodically (and in some cases it's just a subset of objects), and
> it's
> > getting to be a bit of a pain doing it manually.

> > Thanks for your help
> > Alex.



Sun, 28 Aug 2005 07:09:50 GMT
 
 [ 5 post ] 

 Relevant Pages 

1. Generate MS-ACCESS table using SQL Script generated by SQL Server

2. generate SQL scripts from a script or stored procedure

3. Generate SQL script in SQL 2000 for SQL 6.5

4. Generating SQL Scripts out of an SQL Server.

5. Generate SQL scripts of database with T-SQL ?

6. Generate SQL Script via SQL Agent Jobs

7. Generate SQL script for all objects in a database - but using ADO,not SQL-DMO

8. SQL 7.0 Generate SQL Scripts with Dependent Objects

9. IN SQL 7.0 Generate SQL Script not working

10. Generate SQL Script for data of SQL Server table

11. Generate SQL Scripts using T-SQL

12. Generate SQL Script for data of SQL Server table


 
Powered by phpBB® Forum Software