Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
elwoos
Master Smack Fu Yak Hacker
2052 Posts |
Posted - 2003-05-21 : 06:42:53
|
Is there a way of writing a script or something that will generate a script for creating database objects?thankssteve |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2003-05-21 : 07:37:37
|
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. |
|
|
elwoos
Master Smack Fu Yak Hacker
2052 Posts |
Posted - 2003-05-22 : 05:11:05
|
That's great, thanks.btw how do you know all this stuff? |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2003-05-22 : 08:03:12
|
I read Books Online. And SQLTeam!!! |
|
|
Andraax
Aged Yak Warrior
790 Posts |
Posted - 2003-05-22 : 08:28:00
|
And you're an MVP |
|
|
|
|
|