Oracle Business intelligence 12c introduced a new set of command line utilities that will make it easier for BI System administrator to manage the OBIEE service instance ; release 12c has shifted the process control operations that used to be performed from the web applications such as Enterprise Manager Fusion Manager to command line scripting utilities. Operations such as uploading an RPD can no longer be accomplished from EM. The new command utilities are the following:
- lisconnectionpool
- updateconnectionpool
- listrpdvariables
- updaterpdvariables
- downloadrpd
- uploadrpd
- renameapproles
- deletapproles
- renameusers
- deleteusers
All these commands invoke under the covers a new REST API that enables to collect information and perform certain operations on your instance.
- Examples of information that can be collected from the API
- health of BI System instance
- Service instance status
- list of services instances
- Examples of operations that can be performed
- create/delete new service instance
- Check BI service instance overall health, components health, dependencies health
- Export BAR file
- perform operations on the RPD such as those we listed under the new commands (upload/download RPD etc.) , getrepositories (list of RPD from the BI Server),
To obtain an exhaustive list of services, one can use a REST client such as RESTClient or curl. The screen shot below shows an example using a RESTClient plugin for Firefox:
The REST API can be invoked from the following endpoints (PORT is the managed server port, 9502 by default)
http://[hostname]:[PORT]/bi-lcm/v1/s1 : for all listing service instances, creating a new service instance
http://[hostname]:[PORT]/bi-lcm/v1/s1/ssi : for information and operations on our single service instance (ssi)
- http://[hostname]:[PORT]/bi-lcm/v1/s1/ssi/bar : for exporting the service instance as a BAR file ( for more information about a BAR file see following post)
- http://[hostname]:[PORT]/bi-lcm/v1/s1/ssi/health: Check SI status and diagnose issues:
- /bi-lcm/v1/s1/ssi/health/status: overall health check
- /bi-lcm/v1/s1/ssi/health/checks: health check for SSI
- /bi-lcm/v1/s1/ssi/health/components: health check for internal components
- /bi-lcm/v1/s1/ssi/health/components: health check for dependencies
- http://[hostname]:[PORT]/bi-lcm/v1/s1/ssi/rpd: Operations on the RPD for this SI
- /bi-lcm/v1/s1/ssi/download/downloadrpd:
- /bi-lcm/v1/s1/ssi/rpd/uploadrpd:
- /bi-lcm/v1/s1/ssi/rpd/listconnectionpool:
- /bi-lcm/v1/s1/ssi/rpd/updateconnectionpool:
- /bi-lcm/v1/s1/ssi/rpd/users/rename:
- /bi-lcm/v1/s1/ssi/rpd/users/delete:
- /bi-lcm/v1/s1/ssi/rpd/approles/delete
- /bi-lcm/v1/s1/ssi/rpd/approles/rename
Utilities
Coming back to the new commands listed in the documentation, there is a main script called data-model-cmd.sh to run that takes each of the new command line utility as an argument.
[ORACLE_HOME]/user_projects/domains/bi/bitools/bin/data-model-cmd.sh
downloadrpd
To get the correct syntax for each of the new command line utilities, run the script data-model-cmd.sh with the –h flag; note that the flag needs to be lowercase; for example to show the correct syntax for the downloadrpd command, run the following:
./data-model-cmd.sh downloadrpd–h
Usage
Note that the port is 9502 on my default installation
you will be prompted to enter the RPD password, then a status message will be displayed.
Note that the logging level was set to FINEST in order to get more debug output, this is done by altering the logging.properties file located in:
[Oracle_Home]/bi/modules/oracle.bi.commandline.tools/scripts/
uploadrpd
Usage
./data-model-cmd.sh uploadrpd -h
usage: downloadrpd -I <RPD filename> -W <RPD password> -U <cred user> [-P <cred password>] [-SI <service instance>] [-S <host>] [-N <port>] [-SSL] [-Y]
-SSL - use a secure connection to the server
listconnectionpool
Usage
./data-model-cmd.sh listconnectionpool -U <cred user> [-P <cred password>] [-SI <service instance>] [-S <host>] [-N <port>] [-V <true/false>] [-O <outputFile.json>] [-SSL]
File outputFile.json content:
{
"Title":"List Connection Pools",
"Conn-Pool-Info":[
{
"uid":"<uid1>",
"connPool":"<conn pool name1>",
"parentName":"<parent name1>",
"user":"<username1>",
"password":"<password1>",
"dataSource":"<data Source value1>",
"appServerName":"<app server name1>"
},
{
"uid":"<uid2>",
"connPool":"<conn pool name2>",
"parentName":"<parent name2>",
"user":"<username2>",
"password":"<password2>",
"dataSource":"<data Source value2>",
"appServerName":"<app server name2>"
}
],
Output: JSON file containing the list of connection pools and details
updateconnectionpool
Usage
./data-model-cmd.sh updateconnectionpool -C <connPoolList.json> -U <cred user> [-P <cred password>] [-SI <service instance>] [-S <host>] [-N <port>] [-SSL]
File connPoolList.json content:
{
"Title":"List Connection Pools",
"Conn-Pool-Info":[
{
"uid":"<uid1>",
"connPool":"<conn pool name1>",
"parentName":"<parent name1>",
"user":"<username1>",
"password":"<password1>",
"dataSource":"<data Source value1>",
"appServerName":"<app server name1>"
},
{
"uid":"<uid2>",
"connPool":"<conn pool name2>",
"parentName":"<parent name2>",
"user":"<username2>",
"password":"<password2>",
"dataSource":"<data Source value2>",
"appServerName":"<app server name2>"
}
],
"Variables-In-Conn-Pool":[
{
"uid":"<uid1>",
"variable":"<VARNAME1>",
"value":"'<VALUE1>'"
},
{
"uid":"<uid2>",
"variable":"<VARNAME2>",
"value":"'<VALUE2>'"
}
]
}
Input file: JSON file containing the changes to be made to the connections pool (1 or many). Example is shown below
listrpdvariables
Usage
./data-model-cmd.sh listrpdvariables -U <cred_username> [-P <cred_password>] [-SI <service instance>] [-S <hostname>] [-N <port_number>] [-V <comma or new line separated FILE containing selected variables names>] [-O <outputFile.json>] [-SSL] [-H]
File outputFile.json content:
{
"Title":"List Rpd Variables",
"Rpd-Variables":[
{
"uid":"<uid1>",
"variable":"<VARNAME1>",
"value":"'<STRING_VALUE>'"
},
{
"uid":"<uid2>",
"variable":"<VARNAME2>",
"value":"<NUMBER_VALUE>"
},
{
"uid":"<uid3>",
"variable":"<VARNAME3>",
"value":"'<EXPRESSION>'"
},
{
"uid":"<uid4>",
"variable":"<VARNAME4>",
"value":"<FUNCTION>"
}
]
}
Output: JSON file containing the list of RPD variable
Rather than displaying all the RPD variables, you can create a CSV file containing the list of variables you’d like to output and feed it to the script with the –V flag.
updaterpdvariables
Usage
/data-model-cmd.sh updaterpdvariables -C <rpdVariablesList.json> -U <cred_username> [-P <cred_password>] [-SI <service instance>] [-S <hostname>] [-N <port_number>] [-SSL] [-H]
File rpdVariablesList.json content:
{
"Title":"List Rpd Variables",
"Rpd-Variables":[
{
"uid":"<uid1>",
"variable":"<VARNAME1>",
"value":"'<STRING_VALUE>'"
},
{
"uid":"<uid2>",
"variable":"<VARNAME2>",
"value":"<NUMBER_VALUE>"
},
{
"uid":"<uid3>",
"variable":"<VARNAME3>",
"value":"'<EXPRESSION>'"
},
{
"uid":"<uid4>",
"variable":"<VARNAME4>",
"value":"<FUNCTION>"
}
]
}
renameapproles
Usage
[oracle@demo bin]$ ./data-model-cmd.sh renameapproles -T <approlenamelist.json> [-L <plugin list>] -U <cred user> [-P <cred password>] [-SI <service instance>] [-S <host>] [-N <port>] [-SSL]
File approlenamelist.json content:
{
"Title":"Target Application Roles",
"App-Roles":[
{ "oldname":"<current_approle1>", "newname":"<new_approle1>" },
{ "oldname":"<current_approle2>", "newname":"<new_approle2>" },
{ "oldname":"<current_approle3>", "newname":"<new_approle3>"}
]
}
deletapproles
Usage
renameusers
Usage
./data-model-cmd.sh -T <usernamelist.json> [-L <plugin list>] -U <cred user> [-P <cred password>] [-SI <service instance>] [-S <host>] [-N <port>] [-SSL]
File usernamelist.json content:
{
"Title":"Target Users",
"Users":[
{ "oldname":"<current_user1>", "newname":"<new_user1>" },
{ "oldname":"<current_user2>", "newname":"<new_user2>" },
{ "oldname":"<current_user3>", "newname":"<new_user3>" }
]
}
deleteusers
Usage
./data-model-cmd.sh deleteusers -T <usernamelist.json> [-L <plugin list>] -U <cred user> [-P <cred password>] [-SI <service instance>] [-S <host>] [-N <port>] [-SSL]
File usernamelist.json content:
{
"Title":"Target Users",
"Users":[
{ "name":"<user1>" },
{ "name":"<user2>" },
{ "name":"<user3>" }
]
}
The purpose of this post was to experiment with the new command line tools and to list all the commands with the correct syntax for easy future reference. The new commands are part of the first version v1 of the BI Lifecycle Management REST API; there no doubt that more commands will be added to the API in future releases, this is a big step forward for automating operations and monitoring the BI instance without having to interact with the UI.
N.B.
I was unsuccessful at running the user and role management commands (last 4 command listed) : the error message is “Operation failed”, using curl to perform the same operation by invoking the REST API directly failed as well. As soon as we find resolve this issue, this post will be updated.