Hi
We are running SQL server 7.0 on windows NT server. We want to automate the run of a stored procedure once a unix script completes on unix server.
Please help in this.
Thanks
I don't have much experience with Unix, but do you have a prompt based utility on the unix system that could connect with your SQL server? If you did, you could write it into the tail end of the script to run the job through that program.
As for SQL server actually testing for the completion of the script, you could possibly make a procedure in SQL Server that runs a batch file that would test for the completion somehow, maybe a text file that is created when the script is done?(look up the xp_cmdshell command in BOL). The way xp_cmdshell should work is it reads what would normally be printed to the screen if the batchfile were run from a prompt. So if the output was a single number( 0 or 1 ), you could test the return code and either run the job or not. The only problem is the procedure would have to be set up as a job on SQL Server that is scheduled for certain times. So it would not automatically kick off, it would just check every time it is scheduled to execute.
You can execute the stored procedure as a part of the Unix Script as long as you can point to SQL Server 7.0 Data Server on Unix by using ISQL Utitity.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.