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     [SOLVED] retrieving the server and or SQL database name

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] retrieving the server and or SQL database name
 Login/Join
 
Silver Member
posted
If I want to find out who is running a focus procedure, I can use something like this:

-SET &&USERID=GETUSER('A66');
-TYPE Your username is &&USERID

Is there something equivalent to GETUSER to find out information about the reporting server and/or the connection to the SQL db or anything else like that?

Or, what are these things called so that I can search for them? Are these functions? Reserved words? System variables?

Thanks,
Mark

[going from v77 to v82; and wanting to verify I'm using the correct server]

This message has been edited. Last edited by: FP Mod Chuck,


WF 8.2.02
App Studio
DataMigrator
ReportCaster
Windows Server 2016
 
Posts: 42 | Registered: September 08, 2003Report This Post
Expert
posted Hide Post
Mark, it is difficult to see how this would work: one report could access multiple database connections and/or multiple tables, the report could be using WebFOCUS code or SQL Passthru - how would you envision the system provide this info?


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
Silver Member
posted Hide Post
Francis,

I was hoping it would give me the information similar to the way it can tell me which user is running a procedure.

Thanks,
Mark


WF 8.2.02
App Studio
DataMigrator
ReportCaster
Windows Server 2016
 
Posts: 42 | Registered: September 08, 2003Report This Post
Virtuoso
posted Hide Post
folkie,

There is a place within the Admin Console that lets you configure your site.wfs profile with "custom settings". Therein, you can add some variables for your environment to make available to you and your users regarding their sessions.

These are as follows:

<SET> IBIMR_folder (pass)
<SET> IBIMR_fullpath (pass)
<SET> IBIMR_user (pass)
<SET> IBIMR_domain (pass)
<SET> MR_FULL_FEXNAME (pass)
<SET> MR_ITEM_HANDLE (pass)
<SET> IBIMR_memberof (pass)
<SET> FOCSECGROUPS (pass)
<SET> FOCSECGROUP (pass)
<SET> FOCSECUSER (pass)
<SET> userDescription (pass)


I do not know of one that lets you get the server a master file is hitting myself. You could create a fex of all your master files and assign the server they each belong to into an amper, then write some logic that checks which server belongs to which master that way I would think. Then add it here to your site.wfs. GETUSER() is a function however. Not something necessarily related to custom settings. There may be other functions similar, but I've not come across any that give a request's server it's hitting.

There's also a WHENCE command that shares which app folder a master is being read from. If your app folders are named after the servers and databases they come from, you could pull from that I would think.

Just some ideas and insights.

Good luck!


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
 
Posts: 1113 | Location: USA | Registered: January 27, 2015Report This Post
Silver Member
posted Hide Post
CoolGuy,

Okay. I'll see if I can figure out something there.

Thanks,
Mark


WF 8.2.02
App Studio
DataMigrator
ReportCaster
Windows Server 2016
 
Posts: 42 | Registered: September 08, 2003Report This Post
Expert
posted Hide Post
The big difference between retrieving the User and retrieving the database connection is that ONE user is running the report you're retrieving the user for, whilst multiple database connections and/or tables could be used by that report.


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
This documentation describes what Cool Guy posted.

WF 7.7.02 - WebFOCUS Security and Administration

Look at Manipulating WebFOCUS Variables > WebFOCUS Script Commands. This describes the available variables.

The doc does not solve your issue.


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
Master
posted Hide Post
Folkie,

This sounds like something that you would want to look at resource analayzer for. You can monitor which DB is being used, procedure usage etc with that tool.


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
 
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013Report This Post
Master
posted Hide Post
quote:
retrieving the server and or SQL database name

Here is an example for a MS SQL Server instance:
ENGINE SQLMSS SET DEFAULT_CONNECTION CON01
SQL SQLMSS PREPARE SQLOUT FOR
 SELECT
  @@servername   AS 'Server Name'
  ,@@servicename AS 'Instance Name'
  ,DB_NAME()     AS 'Database Name'
  ,HOST_NAME()   AS 'Host Name'
  ,@@VERSION     AS 'SQL Server Version'; 
END
-*
TABLE FILE SQLOUT
"MS SQL Server Details for Connection CON01"
PRINT *
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
 INCLUDE = jellybean_combo, $
 TYPE=DATA, COLUMN=N5, WRAP=.5, $
ENDSTYLE
END 

This message has been edited. Last edited by: David Briars,
 
Posts: 822 | Registered: April 23, 2003Report 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     [SOLVED] retrieving the server and or SQL database name

Copyright © 1996-2020 Information Builders