Groups | Blog | Home
all groups > sql server dts > july 2006 >

sql server dts : Import DTS-Package (as VB-Script) without Visual-Studio 6?



Hans Glasbrenner
7/7/2006 12:00:00 AM
Hi,

we exports a DTS-Package as a VB-Script to change the some servernames
with search and replace operations. Now we should import the modified
package (VB-Script) to the SQL-Server, but the SQL-servers dont't have
any Visual-Studio-Software.

It's possible to import a DTS-Package as a VB-Script with tools like
SQL-Enterprisemanager?

Thanks for answer

Davide Rossetti
7/7/2006 12:00:00 AM
Hello Hans,

[quoted text, click to view]

I do not know if does exist a tool to automate this matter;anyway if you
saved your DTS as a *.bas file at the end of the Private Sub Main()
you should find the statement 'goPackage.Execute'(you sholud comment this)
with an upper commented statement like this 'goPackage.SaveToSQLServer "(local)",
"sa", "" '
The commented one is the statement to save your modified package on SQL Server
so you shold uncomment it giving it the right params, compile the .bas and
run.

For ref. look at this:
http://doc.ddart.net/mssql/sql2000/html/dtsprog/dtspmethjz_25k4.htm

Allan Mitchell
7/8/2006 2:41:43 PM
Hello,

I agree with Davide's recommendation for this but I would not have taken
the package to .bas in the first place. It seems to me to be process heavy
doing it like this. What you need to do ideally is to use the Dynamic properties
task to set up properties of objects within your package.

Allan




[quoted text, click to view]

Hans Glasbrenner
7/9/2006 12:00:00 AM
Hi Davide,

thanks for answer i will test next week to pratice your usefull tip.

Best Regards

Hans Glasbrenner
7/9/2006 12:00:00 AM
Hi Allan,

thanks for answer.

Can you show me a example to modify a DTS-Package with a another
DTS-Package. My problem is only the change the servernames from the
original to the destination. The servername is in some statements who
can't use global variables (update-statements).

Best regards

Allan Mitchell
7/9/2006 12:00:00 AM
Hello Hans,

We arote this article which may help

Execute a package from a package
(http://www.sqldts.com/default.aspx?215)


Allan



[quoted text, click to view]

Hans Glasbrenner
7/10/2006 12:00:00 AM
Hi Davide,

now i'm try to compile my DTS-Package with Visual-Studio 6.

At the first line with a DTS-Oject (DTS.Package) stops with a
"undefined error".

I need a methode to make public the DTS-Objects for the VB-Compiler.

Can you show me some technics to compile a DTS-VB-Script with VS 6 ?

Thanks for help

Davide
7/10/2006 12:00:00 AM
Hello Hans,

[quoted text, click to view]

When you open the .bas file,on the menu select Project-->References and
check 'Microsoft DTSPackage Object library'.
Bye

Hans Glasbrenner
7/10/2006 4:49:44 PM
Hello Davide,

the Tip was right. Now can i store the DTS-Script to a SQL-Server.

A little bit more and it is perfect. I can run the script in the
Visual-Studio but i need a EXE to distribute to another Server. In the
VS - Menu i can't find "Build all" or compile to Exe. The project-type
is standard exe. The shortcut ctrl + F5 runs the script without error,
but it save no EXE-File.

Thanks for help

Hans

P.S.: Your name sounds like italian. Congratulation to win the
Davide
7/10/2006 4:55:27 PM
Hello Hans,

[quoted text, click to view]

Well, It sounds good !! ;)
Anyway, can' t you find ' File --> Make <nameofyourproject>.exe ?

Bye

Hans Glasbrenner
7/10/2006 7:06:30 PM
Hello Davide,

sorry it's yery hot in good old germany, the brain goes damp. Now i
have seen the build exe entry in the file-dialog.

Many Thanks for help

Hans
AddThis Social Bookmark Button