Monday, July 6, 2015

RPD Upload Using Web logic Scripting Tool

Step 1:
Run Weblogic Scripting Tool.
Go To this path
Double Click wlst File

After Clicking We Got this Window.
Now Its in Offline Mode.
We have to connect to Online mode
Make sure before connect to online mode All Servers Should be up.
Run This Commend: Connect (‘weblogic user name’,’pwd’)
In my case: Connect (‘weblogic’,’Admin123’)

Now wlst connected to online Mode.

After connecting online mode we have to run Rpd upload script.
# Connect to the BIDomainMBean that controls the BI domain
# We will use this MBean to lock and then commit our config changes

print 'Connecting to Domain ...'
cd ('..')

cd ('oracle.biee.admin')

cd ('oracle.biee.admin:type=BIDomain,group=Service')

# define the MBean parameters and data types as arrays  
objs = jarray.array([],java.lang.Object)
strs = jarray.array([],java.lang.String)

# Invoke the lock operation from the BIDomainMBean
# (equivalent to the Lock and Edit Configuration button in
# Enterprise Manager

print 'Locking the domain ...'


# Read the name of the first instance from first entry
# in the BIInstances property within the BIDomainMBean
# (initially returned as an array, first value selected)

biinstances = get('BIInstances')
biinstance = biinstances[0]

# Connect to the corresponding BIInstanceMBean

print ('Connecting to BIInstance MBean')

cd ('..')
cd (biinstance.toString())

# Retrieve the name of the MBean for managing the
# BI Server configuration

biserver = get('ServerConfiguration')

# Connect to the ServerConfigurationMBean for this BI Server

cd ('..')
cd (biserver.toString())

# Now prepare for the RPD upload
# Prepare arrays for parameters and datatypes
# Load the parameters with the RPD name and password
# Then invoke the uploadRepository within the ServerConfigurationMBean

print ('Uploading repository ...')

argtypes = jarray.array(['java.lang.String','java.lang.String'],java.lang.String)
argvalues = jarray.array(['C:\Users\Rajkumar\Desktop\HMS.rpd','HMS@1234'],java.lang.Object)


# Now go back to the BIDomainMBean and commit the change
# (equivalent to the Activate Changes button in Enterprise Manager)

print ('Committing the update ...')

objs = jarray.array([],java.lang.Object)
strs = jarray.array([],java.lang.String)


print ('Now restarting the instance, to pick up the new RPD file')

print 'Connecting to BIInstance MBean ...'
cd ('..')
cd (biinstance.toString())

# The BIInstanceMBean controls the overall status of
# the Oracle instance, and if directed to stop or start
# will stop/start all components together

print 'Getting instance status ...'

# ServiceStatus property in BIInstanceMBean returns
# the current status of the instance

print 'BIInstance MBean; ServiceStatus: ' + servicestatus

# Stop action, if invoked, will stop entire instance

print 'Calling stop ...'
objs = jarray.array([], java.lang.Object)
strs = jarray.array([], java.lang.String)
invoke('stop', objs, strs)

print 'BIInstance MBean; ServiceStatus: ' + servicestatus

# Start action will start the instance, and pick up
# the configuration change (the new RPD file path)

print 'Calling start ...'
objs = jarray.array([], java.lang.Object)
strs = jarray.array([], java.lang.String)
invoke('start', objs, strs)

print 'BIInstance MBean; ServiceStatus: ' + servicestatus

print 'RPD Upload now complete!'
And save this file as .py format
Now run execfile(“filepath\”)

No comments:

Post a Comment