dbTalk Databases Forums  

script out DB with VBS???

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss script out DB with VBS??? in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
chris
 
Posts: n/a

Default script out DB with VBS??? - 11-03-2003 , 04:00 PM






Howdy all. Im not a guru VBS guy and Id like to use it to
script out SQL2K db objects. Say I just wanted to script
out the views and nothing more. Can VBS do this? Can
someone get me pointed in the right direction?

TIA, Chris


Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: script out DB with VBS??? - 11-03-2003 , 04:11 PM






If you want to do it in VBS and not using EM then you can use the SQLDMO
library.

Each Database object has a Views Collection. The view object has a Script
method



--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"chris" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
Howdy all. Im not a guru VBS guy and Id like to use it to
script out SQL2K db objects. Say I just wanted to script
out the views and nothing more. Can VBS do this? Can
someone get me pointed in the right direction?

TIA, Chris




Reply With Quote
  #3  
Old   
chris
 
Posts: n/a

Default Re: script out DB with VBS??? - 11-03-2003 , 04:38 PM



I appreciate your quick response. Views were an example.
Can I use it SQLDMO for other objects as well?

Quote:
-----Original Message-----
If you want to do it in VBS and not using EM then you can
use the SQLDMO
library.

Each Database object has a Views Collection. The view
object has a Script
method



--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"chris" <anonymous (AT) discussions (DOT) microsoft.com> wrote in
message
news:075701c3a255$de48d1e0$a301280a (AT) phx (DOT) gbl...
Howdy all. Im not a guru VBS guy and Id like to use it
to
script out SQL2K db objects. Say I just wanted to script
out the views and nothing more. Can VBS do this? Can
someone get me pointed in the right direction?

TIA, Chris



.


Reply With Quote
  #4  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: script out DB with VBS??? - 11-03-2003 , 05:03 PM



Oh yes

--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"chris" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
I appreciate your quick response. Views were an example.
Can I use it SQLDMO for other objects as well?

-----Original Message-----
If you want to do it in VBS and not using EM then you can
use the SQLDMO
library.

Each Database object has a Views Collection. The view
object has a Script
method



--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"chris" <anonymous (AT) discussions (DOT) microsoft.com> wrote in
message
news:075701c3a255$de48d1e0$a301280a (AT) phx (DOT) gbl...
Howdy all. Im not a guru VBS guy and Id like to use it
to
script out SQL2K db objects. Say I just wanted to script
out the views and nothing more. Can VBS do this? Can
someone get me pointed in the right direction?

TIA, Chris



.




Reply With Quote
  #5  
Old   
Sue Hoegemeier
 
Posts: n/a

Default Re: script out DB with VBS??? - 11-03-2003 , 05:07 PM



Yup. The following link has a diagram of the SQL Server DMO
Object Tree - it shows what objects are exposed in SQL-DMO:
http://msdn.microsoft.com/library/en...con03_39yd.asp
If you go to databases, you can see what db objects are
exposed. In terms of what supports the script method, there
are different script methods depending on what you are doing
or wanting to accomplish. You can find the info for the
methods in the SQL-DMO reference in books online or at:
http://msdn.microsoft.com/library/en...ef_ob_3tlx.asp

-Sue

On Mon, 3 Nov 2003 14:38:08 -0800, "chris"
<anonymous (AT) discussions (DOT) microsoft.com> wrote:

Quote:
I appreciate your quick response. Views were an example.
Can I use it SQLDMO for other objects as well?

-----Original Message-----
If you want to do it in VBS and not using EM then you can
use the SQLDMO
library.

Each Database object has a Views Collection. The view
object has a Script
method



--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"chris" <anonymous (AT) discussions (DOT) microsoft.com> wrote in
message
news:075701c3a255$de48d1e0$a301280a (AT) phx (DOT) gbl...
Howdy all. Im not a guru VBS guy and Id like to use it
to
script out SQL2K db objects. Say I just wanted to script
out the views and nothing more. Can VBS do this? Can
someone get me pointed in the right direction?

TIA, Chris



.



Reply With Quote
  #6  
Old   
Nigel Rivett
 
Posts: n/a

Default Re: script out DB with VBS??? - 11-03-2003 , 08:50 PM



Here's a examples of doing it from t-sql.
Should be easy to convert to vbs

http://www.nigelrivett.net/DMOScriptAllDatabases.html
http://www.nigelrivett.net/DMOScripting.html

Nigel Rivett
www.nigelrivett.net

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.