qbjgqbjg
asked on
ssis - execute stored procedure
I am trying to figure out how to execute a stored procedure from ssis. I have a working stored procedure. It has no parameters. I want to somehow execute it fro an ssis package. I found something at another site that says: Another option is to use expressions in the execute sql task editor. You could create an expression for the SqlStatementSource property. A simple example:"exec usp_SomeProc @somevar = '"+ @[User::strSomeVar]+"'"
but I could not figure out how to do that. I just want a simple EXEC dbo.usp_MAINTAIN_UDF_HISTO RY.
but I could not figure out how to do that. I just want a simple EXEC dbo.usp_MAINTAIN_UDF_HISTO
ASKER
I was already using SET NOCOUNT ON. Actually I think I may have it figured out. I used execute sql task . And the trick was for the sql command, I had to spell out execute. So the command was
EXECUTE dbo.usp_MAINTAIN_UDF_HISTO RY. It worked. Now I am trying to figure out how to make it send me an email if it fails.
EXECUTE dbo.usp_MAINTAIN_UDF_HISTO
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I had already tried it with EXEC dbo.usp_MAINTAIN_UDF_HISTO RY in the execute sql task. It did not work. It produced an error. EXECUTE dbo.usp_MAINTAIN_UDF_HISTO RY does work.
We are using sql server 2005. So maybe there is a difference.
execute-stored-procedure.docx
We are using sql server 2005. So maybe there is a difference.
execute-stored-procedure.docx
"
SET FMTONLY ON
SET NOCOUNT ON
exec usp_SomeProc @somevar = '"+ @[User::strSomeVar]+"'"