Having an ADO.net source read PL/SQL from a file as opposed to inserting the code into the SQL Command Box
Hey Arthur Thanks a million, 1) I read Andy's posting yesterday. There are a few concerns. a)When executing the query from within SSIS, it seems to want a ADO.net source as opposed to an OLE/DB source. The query has many subqueries and is most efficent and is doing parallel processing on the UNIX box. If you note..when you set up an execute task, it wants to use OLE/DB. b) With the Execute SQL task (even if I did create the 400 odd variables required to cover the PL/SQL query code ) AND even if by some odd chance that I could get it to work with OLE/DB connectivity, how would you suggest getting the query result set into the sql server table from the Execute SQL Task. Remember that it is sending the request through to an Oracle server. I think what I am getting to is how does one capture the resulting dataset returned by the query to provide IT as input to the next task (which would insert it into the sql server table). regards Steve
April 13th, 2011 11:19am

Hi All This is the problem. I have a series of complex PL/SQL queries that I am using to extract data from Oracle tables to insert into SQL Server 2008 tables. The queries have a start and end date within the predicate. These start and end dates will change weekly. Now, I have a program that generates the 37 odd PL/SQL query files(including the date). The problem that I am encountering using a ADO.NET source is that once I change the code, by inserting the new file (say for this week's process) into the SQL Command box, there are a lot of "invalid references" generated. I can clean these up.. but it is not nice nor quick. 1) Is there any way to parameterize the dates using SSIS variables so that the variable values may be changed WITHOUT affecting the validity of the query (i.e. without generating "invalid references")? Any thoughts on this one would be greatly appreciated. sincerest regards Steve
Free Windows Admin Tool Kit Click here and download it now
April 13th, 2011 11:41am

You can create a package variable and populate it using an expression with the right date format, then pass it into the Execute SQL. Example on a variable as expression: http://sqlblog.com/blogs/andy_leonard/archive/2009/01/31/ssis-expression-language-and-variables.aspx and http://consultingblogs.emc.com/jamiethomson/archive/2005/03/19/SSIS_3A00_-Evaluating-variables-as-expressions.aspx How to map parameters in Execute SQL Task: http://technet.microsoft.com/en-us/library/ms140355.aspxArthur My Blog
April 13th, 2011 12:15pm

Hi Steve, it seems your inquest boils down to merely shredding a recordset. Please see this post if it gives you enough insight: http://www.sqlis.com/post/Shredding-a-Recordset.aspxArthur My Blog
Free Windows Admin Tool Kit Click here and download it now
April 13th, 2011 3:35pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics