SQL Server Stored Proc Execution

Post any question you may have in regards to GoAnywhere Director and let our talented support staff and other users assist you.
5 posts Page 1 of 1

simonpascoe

Posts: 2
Joined: Thu Jun 05, 2014 6:51 pm

Post by simonpascoe » Thu Jun 05, 2014 6:55 pm
Is it possible to execute SQL Server stored procedures? If so, how? Thanks.

Support_Rick

Support Specialist
Posts: 592
Joined: Tue Jul 17, 2012 2:12 pm
Location: Phoenix, AZ

Post by Support_Rick » Thu Jun 05, 2014 7:07 pm
Just run a normal SQL Query ... like this:
Code: Select all
		<sql label="Call MSSQL Stored Proc" resourceId="MSSQL Rick&apos;s Laptop" version="1.0">
			<query label="Execute Stored Proc">
				<statement>EXEC proc_name</statement>
			</query>
		</sql>
Rick Elliott
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696

simonpascoe

Posts: 2
Joined: Thu Jun 05, 2014 6:51 pm

Post by simonpascoe » Fri Jun 06, 2014 12:32 am
Thanks. My issue was that I was using a fully qualified name for the stored procedure instead of just the stored procedure name.

WallyD444

Posts: 10
Joined: Wed Sep 17, 2014 8:38 am

Post by WallyD444 » Mon Nov 17, 2014 4:49 pm
Hi, I have GA Director 4.1.1, and it's giving an "Invalid SQL statement" error trying to execute a stored procedure:
Code: Select all
<project name="Database Exec Test1" mainModule="Main" version="2.0" logLevel="normal" threadSafe="true">

	<module name="Main">

		<sql label="DBConnection" resourceId="WORK" autoCommit="true" version="1.0">
			<query label="query1">
				<statement>EXEC EXTRACT_DATA</statement>
			</query>
		</sql>

	</module>

	<description>WORKBENCH</description>
</project>
Any ideas?

thanks!

Support_Rick

Support Specialist
Posts: 592
Joined: Tue Jul 17, 2012 2:12 pm
Location: Phoenix, AZ

Post by Support_Rick » Mon Nov 24, 2014 1:25 pm
Wally,

If you're not pointing to the current Database that has the Stored Procedure, you'll need to do that as well. Something like:

<statement>
Use MyDB;
Exec MyStoredProc;
</statement
Rick Elliott
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696
5 posts Page 1 of 1