Groups | Blog | Home
all groups > sql server (microsoft) > august 2005 >

sql server (microsoft) : Calling DTS From Stored Procedure


Purple-Man NO[at]SPAM hotmail.com
8/12/2005 6:20:00 AM
I wanted to use sp_OACreate, sp_OAMethod and sp_OADestroy to execute a
DTS package from a stored procedure. I had the dba (using the sa
account) create a wrapper stored procedure as recommended in

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsqldev/html/sqldev_10182004.asp

msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsqldev/html/sqldev_10182004.asp

However, when I executed the wrapper stored procedure, I still
received privilege errors from the underlying sp_oa extended stored
procedures.

Server: Msg 229, Level 14, State 5, Procedure sp_OACreate, Line 6
EXECUTE permission denied on object 'sp_OACreate', database 'master',
owner 'dbo'.

Any ideas on what we could be doing wrong, or any suggested resolutions
would be appreciated.


Thank you very much.
louis
8/13/2005 5:54:04 PM
The error message is saying your account doesn't have permissions to
run the spOAcreate proc.

However, the more traditional approach is call the Dtsrun Utility (a
command line) utility, using xp_cmdshell within the stored proc. No
need for spOA...
AddThis Social Bookmark Button