Solved

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

Posted on 2014-09-05
6
731 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 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
Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

 
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

734 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