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)
 Execute a sql file within DTS

Author  Topic 

1fred
Posting Yak Master

158 Posts

Posted - 2004-08-10 : 17:13:24
I have a dump from another DB that looks like that :

insert into table mytable(row1,row2) values(1,2);
insert into table mytable(row1,row2) values(1,2);
insert into table mytable(row1,row2) values(1,2);
insert into table mytable(row1,row2) values(1,2);

I have to call an URL from the DTS for the file to be generated, this is gonna be accomplished by calling a .bat with the win32 process of the DTS.

Then how can I load the file and execute them with automated commands?

Thanks

Fred

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-08-10 : 17:19:26
You would call osql.exe to run that file. You would use the -i switch and pass it the filename and path.

Tara
Go to Top of Page
   

- Advertisement -