Solved

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

Posted on 2014-09-05
6
710 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
  • 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 65

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
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 
LVL 65

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 65

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

In couple weeks ago, I encountered an extremely difficult problem while deploying 2008 SSIS packages to a new environment (SQL Server 2014 standard).  My scenario is: We have one C# application that is calling 2008R2 SSIS packages to load text fi…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

810 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