gence domain. An instance corresponds to
a collection of servers, presentation servers,
and other system components within an
Oracle Business Intelligence Enterprise
Edition 11 g system.
The ServerConfigurationMBean actually performs the repository upload. It is
one of several MBeans within the Oracle
BI Systems Management API that handle
a variety of administrative tasks, such as
managing the query cache, managing
e-mail configurations, adding components
to and removing them from the cluster, and
configuring security.
To make use of these particular JMX
MBeans, you can either invoke their methods
manually from the System MBean Browser
graphical interface or call them from within
a Java application. The latter is what actually
happens when you use the Oracle Enterprise
Manager console to manage your instance.
To implement these same functions from a
script, you use WebLogic Scripting Tool.
SCRIP TING THE ORACLE BI S YSTEMS
MANAGEMENT API
WebLogic Scripting Tool is a command-line
tool for performing administration functions and viewing the configuration state of
an Oracle WebLogic Server domain. You can
use WebLogic Scripting Tool “online,” typing
commands for immediate execution, or
“offline,” writing a script for later execution
in batch form. You write scripts in a language
called Jython, which is an implementation
of the Python language in Java. WebLogic
Scripting Tool is installed automatically
as part of the Oracle Business Intelligence
Enterprise Edition 11 g initial setup.
The following example shows how to use
WebLogic Scripting Tool, along with the JMX
Administration MBeans identified earlier, to
perform the repository upload task.
5. Use a text editor on the server hosting
Oracle Business Intelligence Enterprise
Edition 11 g to create the WebLogic
Scripting Tool script in Listing 1, available
with the online version of this article at
bit.ly/nv4n7U.
6. Save the script as
RPDUpload.py, and
copy it to a temporary directory such as
c:\temp on the server.
7. To create a test repository to upload,
copy the SampleAppLite.rpd file (which
you can usually find at ORACLE_HOME/
instances/instance1/bifoundation/
coreapplication_obis1/repository/
SampleAppLite.rpd) to the same tempo-
rary directory on the server. Rename this
file SampleAppLite_test.rpd.
wlst c:\temp\ RPDUpload.py
localhost 7001 weblogic welcome1
c:\temp\SampleAppLite_test.rpd
Admin123
9. The script will run and output comments
at various stages of the process.
To check that your new repository
uploaded successfully, use your Web browser
to navigate to the Oracle Enterprise Manager
site at http://<host>:7001/em. Log in
using the same Oracle WebLogic Server
administration username and password as
above, and then use the navigation tree on
the left-hand side of the screen to navigate
to Business Intelligence -> coreapplication.
Using the tabs on the right-hand side of
the screen, click Deployment and then
Repository, and check that your new repository is listed as the default online repository
for your domain.
RESTARTING COMPONENTS AND
COMPLETING THE TASK
Looking at the repository in Oracle Enterprise
Manager, you may notice the warning
message “Restart to apply recent changes.”
Oracle Enterprise Manager displays this
message when you need to restart one or
more system components after a configura-
tion change. You can perform the restart
by clicking the Restart All button on the
Capacity Management -> Availability tab, or
you can modify your WebLogic Scripting Tool
script by moving the final exit() command
to the end of the script and adding the lines
shown in Listing 2, available with the online
version of this article at bit.ly/nv4n7U.
IN SUMMARY
Performing system administration tasks
for an enterprisewide distributed Oracle
BI system can involve making changes to
many components spread over multiple
servers. The Oracle BI Systems Management
API, part of Oracle Business Intelligence
Enterprise Edition 11 g, together with
WebLogic Scripting Tool, provides a handy
command-line environment for managing
and propagating changes either interactively
or through Jython-based scripts. Use the
Oracle BI Systems Management API when
you need to deploy repositories, catalogs, or
other metadata as part of a systems rollout
or when you need to script changes across
several environments in a controlled and
repeatable manner.
Mark Rittman is an
Oracle ACE Director,
cofounder of Rittman
Mead Consulting, and
an executive board
member of the Oracle
Development Tools User Group. He writes for the
Rittman Mead blog at rittmanmead.com/blog.
NEXT STEPS
READ online-only article content
bit.ly/nv4n7U
READ more Rittman
bit.ly/nMo8CG
LEARN more about
Oracle Business Intelligence Enterprise
Edition 11g
bit.ly/ihRSZR
Oracle BI Systems Management API
bit.ly/piMtDE
NOVEMBER/DECEMBER 2011
ORACLE.COM/ORACLEMAGAZINE