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.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Setting up a Job

Author  Topic 

gnjida
Starting Member

3 Posts

Posted - 2004-06-15 : 12:01:06
Hi everybody,

Thanks for takin the time to read this post...

I am setting up a new job on my SQL Server Enterprise Manager. Using my SQL Server agent I created a job(lets call it 'myJOB') that has a number of tasks in it.

the first task would be to import data from a 'myCSVfile.csv' file,transform it, and place it into 'myTABLE' in 'myDB'.

Simple, right?

Here's the thing. Currently unless I write a VBScript that I can execute in the command shell, or write a script that is less than 3200 characters(thats all that fits in the command window of edit job step) which will execute SQL script to create the table and populate it,etc etc., I am boned.

I dont want to have a script in the little command window since, down the road, I might change it. And it much easier to replace the script, than it is to edit it in the little command window of edit Job-step.

I know you can save your import/export data task as a DTS package, but I cant really incorporate it as a job-step in 'myJOB'. I could really run it separately, and make sure the scheduling is correct, but it seems like a hassle.


Is there a simpler way? Can I weasel out of writing another VBScript?
I leave it up to you to help me with the answer, providing you understood this post,

thanks to all

mr_mist
Grunnio

1870 Posts

Posted - 2004-06-15 : 12:10:15
quote:
but I cant really incorporate it as a job-step in 'myJOB'


Why not?

-------
Moo. :)
Go to Top of Page

gnjida
Starting Member

3 Posts

Posted - 2004-06-15 : 12:18:40
well I tried, and the options in the Job properties window-->Steps tab are not letting me use a DTS package as a step.

I am sure there are ways around this, but I, with my limited brain capacity, have not found the way

thanks
Go to Top of Page

gnjida
Starting Member

3 Posts

Posted - 2004-06-15 : 16:09:42
Nevermind, I got it .....

Heres what I did(2 ways)
The easy way:

Run dtsrun.exe and choose my packages

the hard-er way:
wrote a VBScript that runs dtsrun.exe, this is one is great if you got something like a 1000 files that you need in a table(s)

*The only problem I forsee, if you use these solutions are possible difficulties, when you try to use this in an ORACLE environment. Other than that its gravy

thanks everyone
Go to Top of Page
   

- Advertisement -