Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] DB2 SQL Passthru WITHOUT DEFAULT_CONNECTION
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] DB2 SQL Passthru WITHOUT DEFAULT_CONNECTION
 Login/Join
 
Expert
posted
In a fex I would like to run a SQL Passthru command, but I would like to NOT set the DEFAULT_CONNECTION. Is there some other way to specify the connection? If I use SET DEFAULT_CONNECTION, it may override something else that occurs in the fex.

Thanks,

This message has been edited. Last edited by: Francis Mariani,


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Francis

The first connection listed in the edasprof.prf will be the default connection.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 1506 | Location: Customer Support | Registered: April 12, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
I would like to run a SQL Passthru command without altering what the default connection is.

If the first connection in edasprof.prf is zzz and I want to use a SQL Passthru command that needs to connect to aaa and which is included in all fexes, how do I access aaa without overriding the first connection zzz? Does SQL COMMIT undo the DEFAULT_CONNECTION that I used to connect to aaa?


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
If I must use DEFAULT_CONNECTION then maybe this command undoes this back to the default connection of the first connection listed in edasprof.prf:

ENGINE aaa SET AUTODISCONNECT ON COMMIT


As long as I also have a COMMIT command...


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Reply With QuoteReport This Post
Silver Member
posted Hide Post
 
SQL SQLORA
select * from db_name where rownum<5;
;
TABLE FILE SQLOUT
PRINT *
END
 


This works for me . It automatically takes the first defined adapter configuration from edaprof


Webfocus 8.1
Windows x64
Excel
 
Posts: 39 | Location: Pittsburgh | Registered: July 25, 2017Reply With QuoteReport This Post
Silver Member
posted Hide Post
quote:
Originally posted by Aswin Ravikumar:
the first defined adapter configuration from edaprof


By this i mean first configured oracle adapter.


Thanks,
Aswin Ravikumar


Webfocus 8.1
Windows x64
Excel
 
Posts: 39 | Location: Pittsburgh | Registered: July 25, 2017Reply With QuoteReport This Post
Expert
posted Hide Post
I don't want the first configured adapter, I need one specific adapter for one request, then the default (or specified) adapter for any other requests.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Hi Francis,
Is it possible to put the SQL Passthru command in a separate fex and execute it with EX to run in a separate agent with its own database connection, so the original procedure keeps its own connection as well.
If the SQL Passthru is dependant on all kind of parameters in the original procedure which would not be available in the EXecuted procedure, maybe you could dynamically create this procedure.
Hope this works.


WebFocus 7.7.06M/8.2.03M, iWay DataMigrator, Windows, DB2 Windows V10.5, MS SQL Server, Azure SQL, Hyperstage, ReportCaster
 
Posts: 149 | Registered: March 29, 2013Reply With QuoteReport This Post
Guru
posted Hide Post
Is it an option to do the SQL passthru in the masterfile (create a separate .sql file and reference it with DATASET)?


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 381 | Location: Europe | Registered: February 05, 2007Reply With QuoteReport This Post
Expert
posted Hide Post
Martin, I like your idea.
Frans, your idea is a possibility too.

Thanks very much.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] DB2 SQL Passthru WITHOUT DEFAULT_CONNECTION

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.