Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Old Forums
 CLOSED - General SQL Server
 scripting scripts
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

elwoos
Flowing Fount of Yak Knowledge

United Kingdom
2052 Posts

Posted - 05/21/2003 :  06:42:53  Show Profile
Is there a way of writing a script or something that will generate a script for creating database objects?

thanks

steve

robvolk
Most Valuable Yak

USA
15732 Posts

Posted - 05/21/2003 :  07:37:37  Show Profile  Visit robvolk's Homepage
The SQL-DMO object library has a Script method for pretty much every object in SQL Server. There are code examples in Books Online under "Building SQL Server Applications, SQL-DMO". Since it's a COM library you could use sp_OACreate and such to run these methods from a T-SQL stored procedure.

Go to Top of Page

elwoos
Flowing Fount of Yak Knowledge

United Kingdom
2052 Posts

Posted - 05/22/2003 :  05:11:05  Show Profile
That's great, thanks.

btw how do you know all this stuff?

Go to Top of Page

robvolk
Most Valuable Yak

USA
15732 Posts

Posted - 05/22/2003 :  08:03:12  Show Profile  Visit robvolk's Homepage
I read Books Online.

And SQLTeam!!!

Go to Top of Page

Andraax
Aged Yak Warrior

Sweden
790 Posts

Posted - 05/22/2003 :  08:28:00  Show Profile
And you're an MVP

Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000