?
Solved

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

Posted on 2014-09-05
6
Medium Priority
?
745 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 1500 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 1500 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
Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

 
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

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
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.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Suggested Courses

771 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