Drop Table
Support Forum for database administrators and web based access to important newsgroups related to databasesIs there any stored procedure for scripting the database? SQL 2K. Thanks, John
Post Follow-up to this messagehttp://www.karaszi.com/SQLServer/ i...ript .asp -- Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://www. solidqualitylearning .com/ Blog: http:// solidqualitylearning .com/blogs/tibor/ "Smith John" <Smith_Jr@hotmail.com> wrote in message news:OZXYRiK3FHA.548@TK2MSFTNGP10.phx. gbl... > Is there any stored procedure for scripting the database? > SQL 2K. > Thanks, > John > > > > > >
Post Follow-up to this messageThere is no sp; you can use DMO (Distributed Management Objects) in some
scripting language. You can execite ActiveX script task in a scheduled job.
Here is an example of using DMO in vbscript :
Dim oSS As SQLDMO.SQLServer
Dim oDb As SQLDMO.Database
Dim oT As SQLDMO.Transfer
Dim sS As String
Sub Script()
Set oSS = New SQLDMO.SQLServer
Set oT = New SQLDMO.Transfer
oSS.LoginSecure = True
oSS.Connect
Set oDb = oSS.Databases("pubs")
oT.CopyAllTables = True
oDb.ScriptTransfer oT, SQLDMOXfrFile_Single
File, "C:\pubs.sql"
End Sub
--
Dejan Sarka, SQL Server MVP
Mentor
www. SolidQualityLearning
.com
"Smith John" <Smith_Jr@hotmail.com> wrote in message
news:OZXYRiK3FHA.548@TK2MSFTNGP10.phx.gbl...
> Is there any stored procedure for scripting the database?
> SQL 2K.
> Thanks,
> John
>
>
>
>
>
>
Post Follow-up to this messageI was searching for this article of yours a minute ago, but somehow I couldn't find it... -- Dejan Sarka "Tibor Karaszi" <tibor_please.no. email_karaszi@hotmai l.nomail.com> wrote in message news:uhNyQuK3FHA.472@TK2MSFTNGP15.phx.gbl... > http://www.karaszi.com/SQLServer/ i...ript .asp > > -- > Tibor Karaszi, SQL Server MVP > http://www.karaszi.com/sqlserver/default.asp > http://www. solidqualitylearning .com/ > Blog: http:// solidqualitylearning .com/blogs/tibor/ > > > "Smith John" <Smith_Jr@hotmail.com> wrote in message > news:OZXYRiK3FHA.548@TK2MSFTNGP10.phx.gbl...
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread