Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CASE-OPENED] Creating synonym using External SQL Script - Bug in WebFocus

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CASE-OPENED] Creating synonym using External SQL Script - Bug in WebFocus
 Login/Join
 
Member
posted
I had created the synonym(master file and access file) to use the External SQL Script. I have multiple oracle adapter configured on the server.
When I tried to run the report which was using synonym created above, it didn't work. When I traced this problem, I came to know that this synonym is not using CONNECTION(Adapter) specified in access file. Instead it was using the first adapter specified in "edasprof.prf" file.

Does anybody know why it is ignoring connection specified in access file and using the first connection configured on the server?

This message has been edited. Last edited by: Kerry,


7.6.9/7.7
Windows/OS 390
HTML
 
Posts: 11 | Location: Pune | Registered: March 08, 2011Report This Post
Guru
posted Hide Post
Sounds like you are using the SQL Pass Thru method to get to your data? This method does not need Meta Data and does not use the access file.

It does, however use the Adapter connection and requires that you're IBI_USER account have SELECT rights on the Object on the Oracle side.

There are hundreds of SQL Pass Thru posts here but in short, you invoke your SQL as so.
ENGINE SQLORA SET DEFAULT_CONNECTION [adapt connection name here]
SQL SQLORA PREPARE SQLOUT FOR

SELECT TO_CHAR(TO_DATE(SYSDATE,'DD-MON-RR'),'RRRRWI') FROM DUAL;
-RUN

TABLE FILE SQLOUT
PRINT *
END
-RUN

Look for the Adapt Connection Name in an Access file that uses the same tables from the database that you want to connect to.

Example Access File:
--------------------------------------------------------------------------------
SEGNAME=DATABASENAME, TABLENAME=DATABASENAME, CONNECTION=youradaptname, KEYS=0, $

Good Luck


WebFOCUS Administrator @ Worldpay FIS
PROD/DEV/TEST: 8204, SANDBOX: 8206 soon - BIP, Reportcaster, Resource Manager, EUM, HyperStage soon, DB: HIVE,Oracle,MSSQL
 
Posts: 291 | Location: Greater Cincinnati  | Registered: May 11, 2005Report This Post
Member
posted Hide Post
I'm not using the SQL Pass Thru.
I'm creating the synonym using .sql file.

Here it is my access file-
SEGNAME=SAMPLE, DATASET=/ibi/apps/sample/sample.sql, CONNECTION=ORACLEDEV, $


Same connection(ORACLEDEV) is working when I use table name instead of DATASET.
i.e.
SEGNAME=SAMPLE, TABLENAME=SAMPLE,
CONNECTION=ORACLEDEV, $


7.6.9/7.7
Windows/OS 390
HTML
 
Posts: 11 | Location: Pune | Registered: March 08, 2011Report This Post
Guru
posted Hide Post
Does DATASET= belong in the MAS file?

http://forums.informationbuild...791097802#9791097802


WebFOCUS Administrator @ Worldpay FIS
PROD/DEV/TEST: 8204, SANDBOX: 8206 soon - BIP, Reportcaster, Resource Manager, EUM, HyperStage soon, DB: HIVE,Oracle,MSSQL
 
Posts: 291 | Location: Greater Cincinnati  | Registered: May 11, 2005Report This Post
Expert
posted Hide Post
Don, apparently yes!

I never knew this but you can create metadata for s SQL script file, which is very intriguing.

Dhananjay, I would put the SQL file in one of your Application Folders, then use the WebFOCUS Reporting Server Create Synonym page to generate the metadata. My acx file looks like this:

 SEGNAME=TEST_ROUTINE, CONNECTION=mysqltest1, 
   DATASET=baseapp/test_routine.sql, $


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, 2005Report This Post
Expert
posted Hide Post
SEGNAME=SAMPLE, DATASET=/ibi/apps/sample/sample.sql, CONNECTION=ORACLEDEV, $

change to
SEGNAME=SAMPLE, DATASET=sample/sample.sql, CONNECTION=ORACLEDEV, $


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, 2005Report This Post
Member
posted Hide Post
Francis,
Thanks for your suggestion.
But it didn't work.

I changed
DATASET=/ibi/apps/sample/sample.sql

to
DATASET=sample/sample.sql

where "sample" is my application.

But no luck. It is still using the first connection specified in "edasprof.prf" and ignoring the CONNECTION attribute specified in access file. Even if I remove CONNECTION attribute from access file, still it works and use first connection specified.


7.6.9/7.7
Windows/OS 390
HTML
 
Posts: 11 | Location: Pune | Registered: March 08, 2011Report This Post
Member
posted Hide Post
After few days of testing what I seen is criticizing.

It is using randomly selected connection and not the only first one. Just the probability of selecting first connection is more.

To test this I have created synonym from the query(for Oracle database)-
select * from user_users

When I ran report using synonym created for above query, it is giving me different user name every time. If it is using the connection that is specified in access file, it should give the same username every time.

Please help!


7.6.9/7.7
Windows/OS 390
HTML
 
Posts: 11 | Location: Pune | Registered: March 08, 2011Report This Post
Master
posted Hide Post
Sounds like you are, at the moment, hand coding the .mas and .acx files?

If so, and this is a syntax issue, perhaps try creating the meta data with Web Console?:

Web Console
Click 'New'
Select 'Synonym'
Select Adapter
Select Restrict object type to
'External SQL Scripts'
and so on..




Pilot: WebFOCUS 8.2.06 Test: WebFOCUS 8.1.05M Prod: WebFOCUS 8.1.05M Server: Windows Server 2016/Tomcat Standalone Workstation: Windows 10/IE11+Edge Database: Oracle 12c, Netezza, & MS SQL Server 2019 Output: AHTML/XLSX/HTML/PDF/JSCHART Tools: WFDS, Repository Content, BI Portal Designer & ReportCaster
 
Posts: 822 | Registered: April 23, 2003Report This Post
Member
posted Hide Post
Hello David,

I have created .mas and .acx file using web console only, still I'm facing this issue.


7.6.9/7.7
Windows/OS 390
HTML
 
Posts: 11 | Location: Pune | Registered: March 08, 2011Report This Post
Expert
posted Hide Post
Until you figure out what's wrong, you could set the connection manually in the program that uses this master:

ENGINE SQLORA SET DEFAULT_CONNECTION ORACLEDEV

This may override the selection of a "random" data adapter connection.


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, 2005Report This Post
Member
posted Hide Post
Thank You Francis. We were just thinking to use the same approach.

Even though there are few cons of this approach like we have to edit the report definition while migrating code from dev to qa or prod which otherwise could have been managed at metadata layer(access file). But we don't have other option.

I have also opened the case with IBI for the same.


7.6.9/7.7
Windows/OS 390
HTML
 
Posts: 11 | Location: Pune | Registered: March 08, 2011Report This Post
Member
posted Hide Post
Here is the new problem that poped up. Frowner

When I used
ENGINE SQLORA SET DEFAULT_CONNECTION ORACLEDEV

and query the data using only that synonym then it is working fine.

But when I use it to join with another synonym, it gives following error-
(FOC1356) NO TABLE NAME FOR THE SEGMENT IN THE ACCESS FILE


e.g.
Say if I have created TEST synonym using SQL Script and queried data following way-
TABLE FILE TEST
PRINT
*
END

It gives the data.
But for following code generate error-
JOIN
LEFT_OUTER JOINFLD1 IN ABC TO
UNIQUE   JOINFLD2 IN TEST
 TAG J0 AS J0
 END
TABLE FILE ABC 
PRINT
*
END

Where ABC is another synonym which is working fine in the join with other tables.


7.6.9/7.7
Windows/OS 390
HTML
 
Posts: 11 | Location: Pune | Registered: March 08, 2011Report This Post
Platinum Member
posted Hide Post
Hi

Creating Joins with master files which describe .sql script is not supported.
see case 81492516
as far as I know this is a NFR which might be implemented quite soon in new releases and will pass the join to the DB (join to SQL query "derived table")
I would recommend you to open a case with IBI and also request this functionality

Yours
Eran


Yours,
Eran
SRL Products

http://www.srl.co.il

 
Posts: 97 | Location: Tel Aviv, Israel | Registered: November 20, 2005Report This Post
Expert
posted Hide Post
Have you considered the "CREATE SYNONYM" command?
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CASE-OPENED] Creating synonym using External SQL Script - Bug in WebFocus

Copyright © 1996-2020 Information Builders