Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Running a stored proc remotely Expand / Collapse
Author
Message
Posted Tuesday, July 29, 2014 8:56 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, September 3, 2014 12:20 PM
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!
Post #1597340
Posted Tuesday, July 29, 2014 9:23 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, October 9, 2014 7:17 AM
Points: 29, Visits: 81
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.
Post #1597353
Posted Tuesday, July 29, 2014 9:31 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, September 3, 2014 12:20 PM
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.
Post #1597365
Posted Tuesday, July 29, 2014 9:37 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, October 9, 2014 7:17 AM
Points: 29, Visits: 81
On demand run by the user? I hope someone hops in here with an idea, I'd like to learn it too.
Post #1597366
Posted Wednesday, July 30, 2014 6:22 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, November 26, 2014 11:58 AM
Points: 242, Visits: 293
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.
Post #1597679
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse