Friday, July 17, 2020

Deploying Web Catalog on BI domain

Namaste!! Welcome to 'My OFMW Experiments' blog!, Here in this post, I would like to explore more deeper about CLI tools available on Bi platform. 

BI Catalog deployments



Earlier in OBIEE there were multiple catalog files together can be deployed with BAR files. Now in OAS we have to use runcat.sh or runct.cmd script. that is present in the BI domain/bitools/bin directory.


Deploying Web Catalog on OBIEE/OAS domain


Help of runcat command

The following is the OBIEE 12.2.1.4 Environment with the -help options.
	# Command : -help

Catalog Manager understands commands in the following areas:

Development To Production
createFolder            Creates folder in the catalog
delete                  Deletes the given path from the catalog
maintenanceMode         Puts the catalog into or out of Maintenance Mode (aka ReadOnly)
rehash                  Rehashes /users in the catalog
rename                  Renames an item in the catalog
report                  Generates a report on the contents of the catalog
replace                 Search and replace on the contents of the catalog
repair                  Repairs damage caused by errant 3rd party ftp programs
localize                Enables localization for catalog contents
archive                 Creates an archive of a subset of the catalog
unarchive               Extracts an archive into the catalog
archiveContent          Returns the List of Objects in the Archive File
setItemProperties       Sets the properties for an object in the web catalog
upgradeCatalog          Upgrades catalog from 11g (11.1.1.7.0) or later version to latest version.
exportCatalog           Export catalog in offline mode
migrate                 Migrates a catalog object from one type to another

Patch Management
tag                     Tags all XML documents in a catalog with a unique id and common version string
diff                    Compares two catalogs
inject                  Injects a single item to a diff file
injectBatch             Injects multiple items to a diff file
createPatch             Creates a patch to upgrade a catalog from one version to another
applyPatch              Applies a patch to a catalog
publisherPermissionsImport      Imports BI Publisher Permissions into the web catalog
detectConflicts         Compares two diff files
combineDiffs            Combines multiple diff files to produce single diff file

Account Management
renameAccounts          Renames users/groups/approles in the catalog
forgetAccounts          Removes users/groups/approles from the catalog
replaceAccountInPermissions     Replaces a specified account with another in all catalog object ACLs
setOwnership            Set the ownership property for an object in the web catalog
setItemPermissions      Add/Modify/Delete a permission entry in the ACL of an object in the web catalog
migrateWebcatGroupsToApproles   Change web catalog groups to approles across the entire catalog, with "_GRP2ROLE_" prefix.

Subject Area Management
clearQueryCache         Clears the query cache

Catalog Unarchive

There are two options for this unarchive command online offline

Unarchive with online option


The Unarchive command with online will be using boot.txt as a credentials. So to pass this boot.txt file let's create a boot.txt file that contains the WebLogic domain console credentials.
login=weblogic
pwd=MyOFMW123

./runcat.sh -cmd unarchive -folder 
"/shared" -online http://localhost.locladomain:9502/analytics-ws/saw.dll 
-credentials boot.txt 
-inputFile "/u01/deliverables/reports/sample.catalog" -overwrite all

Unarchive with offline option


This option we will be using whenever online option fails! but not necessary. Here you don't need to give the running BI service details for runcat command. The common thing in online and offline are: -inputFile for "Catalog" file path and -folder.
./runcat.sh -cmd unarchive -offline /u01/fmw/domains/demo_domain/bidata/service_instances/ssi/metadata/content/catalog \
-inputFile "/u01/deliverables/reports/sample.catalog" -folder /shared

CatalogManager Account management

We can do this activity in online and offline modes. The help command gives syntax and examples of Setting permission as well.
 
./runcat.sh -cmd setItemPermissions -help

Add Account Permissions offline to a Catalog


Oracle BI CatalogManager is connecting offline and the add the account permissions as per the needs. Here in this example I've choosen 'BIServiceAdministrator' assign to approle generally it will be 'weblogic' user. This command will be using only catalog user population on the instance by refering to the default Instance path.
Now let's do simple add experiment
 
[oracle@obiee bin]$ ./runcat.sh -cmd setItemPermissions -setOption changeMentioned -changeOption add -accountName "BIServiceAdministrator" -accountType approle -permission F -item "/shared/Sample DV Projects" -recursive true -offline /u01/obiee/app/Middleware/user_projects/domains/bi/bidata/service_instances/ssi/metadata/content/catalog
Instance Name is missing. Using default Instance Name: obips1
Using Oracle BI Home: /u01/obiee/app/Middleware/bi
env:
INSTANCE_NAME: obips1
ORACLE_HOME: /u01/ora180/app/oracle/product/18.0.0/dbhome_1
ORACLE_INSTANCE: /u01/obiee/app/Middleware/user_projects/domains/bi/config/instances/i1
BI_PRODUCT_HOME: /u01/obiee/app/Middleware/bi
DOMAIN_HOME: /u01/obiee/app/Middleware/user_projects/domains/bi
ORACLE_BI_APPLICATION:
COMPONENT_TYPE:
COMPONENT_NAME:
ORACLE_BIPS_INSTANCE_CONFIGDIR: /u01/obiee/app/Middleware/user_projects/domains/bi/config/fmwconfig/biconfig/OBIPS
ORACLE_BIPS_INSTANCE_DIAGNOSTICSDIR: /u01/obiee/app/Middleware/user_projects/domains/bi/servers/obips1
ORACLE_BIPS_INSTANCE_TEMPDIR: /u01/obiee/app/Middleware/user_projects/domains/bi/servers/obips1/tmp
JAVA_HOME: /u01/common/java/jdk1.8.0_191
LD_LIBRARY_PATH: :/u01/obiee/app/Middleware/bi/modules/oracle.bi.datadirect.odbc/8.0.2/lib:/u01/obiee/app/Middleware/bi/modules/oracle.bi.datadirect.odbc/8.0.1/lib:/u01/obiee/app/Middleware/bi/modules/oracle.bi.datadirect.odbc/7.1.6/lib:/u01/obiee/app/Middleware/bi/modules/oracle.bi.datadirect.odbc/7.1.5/lib:/u01/obiee/app/Middleware/bi/modules/oracle.bi.datadirect.odbc/7.1.4/lib:/u01/obiee/app/Middleware/bi/modules/oracle.bi.datadirect.odbc/5.3/lib:/u01/obiee/app/Middleware/oracle_common/jdk/jre/lib/amd64/server:/u01/obiee/app/Middleware/oracle_common/jdk/jre/lib/amd64//://://:/u01/obiee/app/Middleware/bi/bifoundation/server/bin:/u01/obiee/app/Middleware/bi/bifoundation/web/bin:/u01/obiee/app/Middleware/bi/clients/epm/Essbase/EssbaseRTC/bin:/u01/obiee/app/Middleware/bi/bifoundation/odbc/lib:/u01/obiee/app/Middleware/bi/bifoundation/lib:/u01/obiee/app/Middleware/bi/lib:/u01/obiee/app/Middleware/lib:/u01/obiee/app/Middleware/oracle_common/adr:/u01/obiee/app/Middleware/oracle_common/lib:
BIFNDN_LABEL =BIFNDN_12.2.1.4.0_LINUX.X64_180408.2241
# Command : -cmd setItemPermissions -setOption changeMentioned -changeOption add -accountName BIServiceAdministrator -accountType approle -permission F -item /shared/Sample DV Projects -recursive true -offline /u01/obiee/app/Middleware/user_projects/domains/bi/bidata/service_instances/ssi/metadata/content/catalog
[Util Logger] Type: Information. Severity: Fatal. File: project/webutil/deploymentprofile.cpp. Line: 192. Deployment profile is ON_PREMISE
N1      saw.catalogmanager      Oracle BI CatalogManager 12.2.1.4.0 (Build BIPS-20180409020153 64-bit) is connecting offline.
N1      saw.catalog.manager.loadCatalog Catalog system -
         Running mode is: 12c
         Catalog reside in: File System
         Tenancy mode is: Single Service Instance
N1      saw.catalog.manager.initialize  Using only catalog user population
N1      saw.catalog.local.initialize    Instance Catalog Path: '/u01/obiee/app/Middleware/user_projects/domains/bi/bidata/service_instances/ssi/metadata/content/catalog/root'.
Command 'setItemPermissions' completed successfully.
Return status from Catalogmanager command : 0

Remove permissions offline


You can remove the account permission for a Catalog in Offline mode. Sample catalog : Sample DV Catalog and it is for AccountName BIServiceAdmnistrator.
  ./runcat.sh -cmd setItemPermissions -setOption removeMentioned -accountName "BIServiceAdministrator" -accountType approle -item "/shared/Sample DV Projects" -recursive true -offline /u01/obiee/app/Middleware/user_projects/domains/bi/bidata/service_instances/ssi/metadata/content/catalog

We are building this experiments by learning by doing many success paths by overcoming lots of failures and troubleshootings. You need to double check the input file.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.