Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Running a stored proc remotely


Running a stored proc remotely

Author
Message
charya
charya
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 6
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!
SQLKnitter
SQLKnitter
SSC Rookie
SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)

Group: General Forum Members
Points: 30 Visits: 85
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.
charya
charya
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 6
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.
SQLKnitter
SQLKnitter
SSC Rookie
SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)

Group: General Forum Members
Points: 30 Visits: 85
On demand run by the user? I hope someone hops in here with an idea, I'd like to learn it too.
stevenb 14609
stevenb 14609
Old Hand
Old Hand (302 reputation)Old Hand (302 reputation)Old Hand (302 reputation)Old Hand (302 reputation)Old Hand (302 reputation)Old Hand (302 reputation)Old Hand (302 reputation)Old Hand (302 reputation)

Group: General Forum Members
Points: 302 Visits: 459
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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search