Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL and Perl Scripts

Status
Not open for further replies.

trumb1mj

MIS
Joined
Jun 29, 2006
Messages
12
Location
US
Ok. I have a problem completing a data fill prjoect. First of all, here is my scenario. I have created a perl script to create data files. These data files are then loaded into the database using Bulk Insert in the Query Analyser. As it stands, this is a multi step process. I was wondering if I could make this into a single step process. Please, any input would be very helpful as I am reaching my deadline at work with this project. Thanks!
 
You could use a Perl ODBC module to INSERT rows into the database. The text files would not be needed if that is your only reason for creating them.

Or use DTS to create a package that imports the text file; then create a SQL Server job and schedule it to run the DTS package.

Or use the command line program, dtsrun, and execute that from your Perl script.
Code:
system "C:\\dtsrun /Sserver_name /Uuser_nName /Ppassword /Npackage_name /Mpackage_password"

See Books Online topics dtsrun utility.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top