Video Screencast Help

How do I run a SQL Stored Procedure from my DS script?

Created: 09 Oct 2013 • Updated: 21 Oct 2013 | 6 comments
This issue has been solved. See solution.


I found this article

But I can't get the answer to work.

I tried this

set free="%#*"{call sel_free_disk_space(%ID%,'C')}"%"

echo %free%

I also tried to run the stored procedure from the sql server to see the result, this is correct. 

Kind Regards


Operating Systems:

Comments 6 CommentsJump to latest comment

ericg2's picture

I do not have any DS 6.9 left here but we were using this.  In the deployment server console somewhere in the settings you have to mark the storedproc as readable...

also I see you are using #* so you are sure the default database for your user is the right one and not master or something like this ?

CMelsby's picture


This storedproc I used is a DS buildin (default database) and I have added it in as described in article TECH174001.

I have a nother storedproc also buildin DS %#*"{call ins_location(%ID%,'Test' ) }"% this is working. (Just to see if all settings is right)

But in the ins_location is only to insert variable and from sel_free_disk_space I want to grep the output.

Conclusion is that I can insert data but not receive data from a storedproc.

ericg2's picture

Sounds crazy but I think your problem is not the storedproc but the variable.

Can you try FREE instead of free

and if this does not work try to echo without using a variable

echo "%#*"{call sel_free_disk_space(%ID%,'C')}"%"

CMelsby's picture

The result is "" and there is no difference between FREE or free

I thought that these commands would be more powerfull

But I realize that the compiler is very simple for SQL

Thomas Baird's picture

can't you just use OSQL?

Thomas Baird
Enthusiast for making things better!