Step 1:
Run Weblogic Scripting Tool.
Go To this path
D:\OBIEE_Int\wlserver_10.3\common\bin,
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.
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 ('..')
domainCustom()
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 ...'
invoke('lock',objs,strs)
# 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)
invoke('uploadRepository',argvalues,argtypes)
# Now go back to the BIDomainMBean and commit the change
# (equivalent to the Activate Changes button in Enterprise Manager)
print ('Committing the update ...')
cd('..')
cd('oracle.biee.admin:type=BIDomain,group=Service')
objs = jarray.array([],java.lang.Object)
strs = jarray.array([],java.lang.String)
invoke('commit',objs,strs)
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
servicestatus=get('ServiceStatus')
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)
servicestatus=get('ServiceStatus')
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)
servicestatus=get('ServiceStatus')
print 'BIInstance MBean; ServiceStatus: ' + servicestatus
print 'RPD Upload now complete!'
And save this file as .py format
Now run execfile(“filepath\filename.py”)
execfile(“E:\WLST\RPDUpload.py”)
No comments:
Post a Comment