Solved

SSIS 2012:  Execute SQL Task to execute an Informix SP, with parameter

Posted on 2014-09-05
6
736 Views
Last Modified: 2016-02-11
Hi guys

Would anyone have an example of what to put in the SQLStatement property of an Execute SQL Task to execute an Informix Stored Procedure that passes a parameter?

database:  scadev (also name of connection to it)
procedure:  ssim

A Google search turned up empty.  (Hint:  If you post a link that I've already seen in a Google search, then you likely aren't helping...)

Thanks in advance.
Jim
0
Comment
Question by:Jim Horn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 16

Assisted Solution

by:DcpKing
DcpKing earned 500 total points
ID: 40307431
I haven't used Informix since before MS introduced DTS, but have you tried running the proc from a Script Task, with an ODBC connection to the Informix database?

hth

Mike
0
 
LVL 66

Author Comment

by:Jim Horn
ID: 40307671
Using ODBC to connect right now, and that's essentially my question.

I have a SQL Task 'DELETE * FROM table' and a data pump from text file to Informix table working.
0
 
LVL 16

Assisted Solution

by:DcpKing
DcpKing earned 500 total points
ID: 40308170
In that case it would appear that a SQL Task "insert into <tablename> select  <parametervalue>" should work. If so, set up a new table, put the parameter value in there, and get the informix sp to read it, act on it, and delete it from the table (so it doesn't get used twice).  Similarly for returning values - a two-column name-value table ...

It is, I'll admit, a bit of a kludge, but sometimes .....

hth

Mike
0
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
LVL 66

Author Comment

by:Jim Horn
ID: 40310128
The task is to execute an Informix procedure, so not sure how "insert into <tablename> select  <parametervalue>"  accomplishes that.
0
 
LVL 66

Accepted Solution

by:
Jim Horn earned 0 total points
ID: 40317886
I ended up dodging the issue by creating a script task that parsed the SP call via VB...
Dim sSQL As String
   sSQL = "EXECUTE PROCEDURE ssim_load('" + Now.ToString("yyyy-MM-dd hh:mm:ss") + "')"
   Dts.Variables("sSQL").Value = sSQL

Open in new window

.. and then in the Execute SQL Task passing sSQL as the SourceVariable.
0
 
LVL 16

Expert Comment

by:DcpKing
ID: 40318385
My thought was to add the parameters to a table instead of directly to the SP, and then alter the SP to read the parameters from the table rather than receive them when called..... However, you've solved the problem another way ... well done!

Mike
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question