Focal Point
[SOLVED] Dynamically Identify Masterfile Accessed

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9337075676

June 05, 2015, 03:46 PM
eric.woerle
[SOLVED] Dynamically Identify Masterfile Accessed
I'm working on improving my DBA security by writing Dynamic DBA security files into FOCCACHE off of custom tables I've built in Oracle. One of the fields in my table is the Table that needs to be restricted. As it stands now, the only thing that I need to specify for each master file is the table to restrict on. Outside of this, I could have 1 MFD_PROFILE fex for all of my metadata. Does anyone have any ideas how I could identify the masterfile that is running the MFD_Profile procedure?

I've been thinking about maybe using ? FF, but I can't think of a way to write it to a flat file to pull the filename out.

I thought I had seen in the past people who have written checkfile to a flat file. But I can't seem to find the post...

Thanks for any thoughts.

This message has been edited. Last edited by: eric.woerle,


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
June 08, 2015, 05:10 PM
Francis Mariani
Maybe this thread will help: Quickly Find TABLENAME for Medata/Synonym


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
June 09, 2015, 06:05 PM
eric.woerle
Thanks for the suggestion Francis. It seems that the link is providing a way to identify all of the tables on the server. I need to figure out which one I need to write my DBA rules for. So I don't actually know what Master File is being accessed at that particular time. Thats what I'm trying to figure out.

For example when I issue ?F after a table request

 TABLE FILE CAR
PRINT COUNTRY
WHERE RECORDLIMIT EQ 1
ON TABLE HOLD AS MYHOLD
END

?F 


I get the following

  0 NUMBER OF RECORDS IN TABLE=        1  LINES=      1
 FILENAME=  CAR
 COUNTRY
 CAR
 MODEL
 BODYTYPE      SEATS         DEALER_COST   RETAIL_COST   SALES
 LENGTH        WIDTH         HEIGHT        WEIGHT        WHEELBASE
 FUEL_CAP      BHP           RPM           MPG           ACCEL
 WARRANTY
 STANDARD
 LIST
 


I figure if I could write the result to a file, I could use -READ to pull out the filename in the MFD_PROFILE. If there was a variable or function that captured this instead it would be even better... But I've never heard of any that store the Master File name.


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
June 09, 2015, 06:20 PM
eric.woerle
I just found what I was looking for in the help files

The name of the calling Master File is passed as the first parameter (&1) to the MFD_PROFILE procedure.

I found this under the section Reference: Usage Notes for MFD_PROFILE

One Fex to RULE them ALL!


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2