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)
 Call a Perl Script from a stored procedure.

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-07-16 : 09:42:05
Steve Byrne writes "Hi , I have an SQL2000 server SP2. I need a stored procedure that will call a perl script that is saved on the local drive.

Do you have anything like that? It needs to be an SP so that I can automate the script to run every hour using SQL Agent.

Hope you can help,

Steve Byrne"

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-07-16 : 10:02:24
Disclaimer: don't know how to run Perl scripts on Windows machines, so I need your knowledge.

I imagine that there is a command-line utitlity to run Perl scripts on Windows, so you can call that utility and pass the name of the script file to it. That is by far your best option.

You *can* do this through a SQL Server stored procedure, but it's far easier and better to create a new job and add an Operating System command step. That step runs the command-line utility to execute the Perl code; just paste the proper command text into the job step code window.

If you have SQL Enterprise Manager you can set this up in about 2 minutes. Expand the SQL Server tree and go to Management:SQL Server Agent, and look under jobs. Create a new job, give it a name, and go to the Steps tab and click New. From the Type dropdown, select Operating System Command and fill out the command-line text. Then set up the proper schedules on the schedules tab and save the job.

Go to Top of Page
   

- Advertisement -