Shell script within Stored Procedure

110 pts.
Tags:
Shell scripts
SQL stored procedures
Unix
Unix shells
How do I execute a UNIX shell (.sh) script from within an MS SQL Stored Procedure?

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 4  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • mshen
    What version of Unix/Linux are you using or is it on a windows machine?
    27,385 pointsBadges:
    report
  • Denny Cherry
    As SQL Server only runs on Windows, are you trying to run a Unix script on Windows, or do you need to log into a Unix server then run the Unix script?
    66,195 pointsBadges:
    report
  • VelameLaCosa
    The stored procedure itself will run on a Windows 2003 Server (SQL 2005). The script should connect to a Solaris 10 (UNIX) box to execute some commands.
    110 pointsBadges:
    report
  • petkoa
    > > The stored procedure itself will run on a Windows 2003 Server (SQL 2005). > The script should connect to a Solaris 10 (UNIX) box to execute some commands. > So, then the easiest way will be to write and put shell script on the UNIX box, then the stored procedure should just call rsh/ssh client and execute the script. Sure, you should (1) install some windows port of rsh/ssh on win2003 system, and (2) make arrangements for the non-interactive login (e.g., non-password protected ssh private key on win2003 system, or some rhosts assignments on the solaris system - of course, the environment should be secure enough). My advice would be to go with ssh - not because of encryption and security, unattended login should create security hole anyway, but because of ease of setup: rsh is a protocol quite tricky for firewalls. BR and good luck, Petko
    3,120 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following