Running a stored proc remotely

  • Hey all!

    I've been trying to look for a solution to this but haven't really been successful.

    Basically, I have a stored procedure in SQL Server 2008 (the stored proc is actually stored there with a name) and I can run it with the 'exec storedproc_name insert_date' command (my stored proc needs a date to run).

    The stored proc just creates a temp table with some data (but we can ignore this bit).

    I only need a way to run this stored proc remotely (I dont care about getting the data, I just need to run it in the server).

    Is there any way of doing this? Preferably via a unix system? I just need a way to run the 'exec' command. Returning data etc. isn't needed.

    Any ideas?

    Thanks!

  • I hope I'm not off topic because you did mention needing to use UNIX, but if you want it to run at certain times you can put a job in the SQL server agent and schedule it to run. If you have access to the agent remotely, you can right click on the job and run it ad-hoc as well. I sometimes work from home and have done that.

    I run table builds for users that way.

  • SQLKnitter (7/29/2014)


    I hope I'm not off topic because you did mention needing to use UNIX, but if you want it to run at certain times you can put a job in the SQL server agent and schedule it to run. If you have access to the agent remotely, you can right click on the job and run it ad-hoc as well. I sometimes work from home and have done that.

    I run table builds for users that way.

    Hey

    Yeah Im doing that too. This UNIX thing is to able to run this stored proc on demand.

  • On demand run by the user? I hope someone hops in here with an idea, I'd like to learn it too.

  • You really just need to get a connection to the SQL Server from your Unix box. A quick search for SQL Server Linux Client got me to http://richbs.org/post/43142767072/connecting-to-microsoft-sql-server-from-unix-linux-mac

    That page will go all the way through getting access with Python, but if you follow the instructions down to getting isql up and running, you should get to where you want to be. With isql, you can connect to your box and enter your exec statement to run your stored procedure.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply