Wednesday, August 24, 2011

WLST OBIEE Bounce BI server

Script to bounce the BI server using the WLST:


# Bounce BI server using WLST
# Be sure we are in the root
cd('..\..')

print 'Connecting to Domain ...'
try:
domainCustom()
except:
print 'Already in domainCustom'

print 'Go to biee admin domain'
cd('oracle.biee.admin')

print 'Go to coreapplication_obips1 Mbean'
cd('oracle.biee.admin:oracleInstance=instance1,type=BIDomain.BIInstanceDeployment.BIComponent,biInstance=coreapplication,process=coreapplication_obis1,group=Service')

print 'Stopping the BI server'
params = jarray.array([], java.lang.Object)
signs = jarray.array([], java.lang.String)
invoke('stop', params, signs)

BIServerStatus = get('Status')
print 'BI ServerStatus ' +BIServerStatus

print 'Starting the BI server'
params = jarray.array([], java.lang.Object)
signs = jarray.array([], java.lang.String)
invoke('start', params, signs)

BIServerStatus = get('Status')
print 'BI ServerStatus ' +BIServerStatus


Till Next Time

WLST OBIEE Bounce Presentation Server

Script to bounce the presentation server using the WLST:


# Bounce Presentationserver using WLST
# Be sure we are in the root
cd('..\..')

print 'Connecting to Domain ...'
try:
domainCustom()
except:
print 'Already in domainCustom'

print 'Go to biee admin domain'
cd('oracle.biee.admin')

print 'Go to coreapplication_obips1 Mbean'
cd('oracle.biee.admin:oracleInstance=instance1,type=BIDomain.BIInstanceDeployment.BIComponent,biInstance=coreapplication,process=coreapplication_obips1,group=Service')

print 'Stopping the presentation server'
params = jarray.array([], java.lang.Object)
signs = jarray.array([], java.lang.String)
invoke('stop', params, signs)

print 'Starting the presentation server'
params = jarray.array([], java.lang.Object)
signs = jarray.array([], java.lang.String)
invoke('start', params, signs)

PresentationServerStatus = get('Status')
print 'PresentationServerStatus± ' +PresentationServerStatus


Till Next Time

WLST OBIEE Change WebCat Location

Small script I use to changer the WebCat Location on a OBIEE11g BI system:


# Be sure we are in the root
cd('..\..')

print 'Connecting to Domain ...'
try:
domainCustom()
except:
print 'Already in domainCustom'

print 'Go to biee admin domain'
cd('oracle.biee.admin')

# Go to the presentation server catalog location
cd('oracle.biee.admin:type=BIDomain.BIInstance.PresentationServerConfiguration,biInstance=coreapplication,group=Service')

# Lock the System
execfile("F:\WLST\Lock System.py")

# Go to the presentation server catalog location
cd('..')
cd('oracle.biee.admin:type=BIDomain.BIInstance.PresentationServerConfiguration,biInstance=coreapplication,group=Service')

# Get the old WebCatalogSharedLocation
WebCatalogSharedLocation = get('WebCatalogSharedLocation')
print 'old WebCatalogSharedLocation = ' + WebCatalogSharedLocation

# set the old WebCatalogSharedLocation
newWebCatalogSharedLocation = '$ORACLE_INSTANCE/SampleAppWebcatNew'
set('WebCatalogSharedLocation',newWebCatalogSharedLocation)
WebCatalogSharedLocation = get('WebCatalogSharedLocation')
print 'new WebCatalogSharedLocation = ' + WebCatalogSharedLocation

# Commit the system
execfile("F:\WLST\Commit System.py")

print 'please restart Presentation-server using opmnctl'



Till Next Time

WLST OBIEE Upload RPD

Small script I use to upload RPD on the OBIEE11g BI system:

# Be sure we are in the root
cd('..\..')

print 'Connecting to Domain ...'
try:
domainCustom()
except:
print 'Already in domainCustom'

print 'Go to biee admin domain'
cd('oracle.biee.admin')

# go to the server configuration
print 'Go to BIDomain.BIInstance.ServerConfiguration MBean'
cd('oracle.biee.admin:type=BIDomain.BIInstance.ServerConfiguration,biInstance=coreapplication,group=Service')

# Lock the System
execfile("F:\WLST\Lock System.py")

cd('..')
# go to the server configuration
cd('oracle.biee.admin:type=BIDomain.BIInstance.ServerConfiguration,biInstance=coreapplication,group=Service')
print 'Uploading RPD'
# Set the parameters
params = jarray.array(['/home/oracle/Desktop/FolderShortcuts/OBIEEInstallHome/instances/instance1/bifoundation/OracleBIServerComponent/coreapplication_obis1/repository/10719.rpd','Admin123'],java.lang.Object)
# Set the parameters Signs
sign = jarray.array(['java.lang.String', 'java.lang.String'],java.lang.String)
# Invoke the procedure
invoke( 'uploadRepository', params, sign)

# Commit the system
execfile("F:\WLST\Commit System.py")

print 'please restart BI-server using opmnctl'


! DON’T FORGET to BOUNCE the BI-SERVER!



Till Next Time

WLST OBIEE Commit system

Small script I use to commit on the OBIEE11g BI system:

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

objs = jarray.array([], java.lang.Object)
strs = jarray.array([], java.lang.String)
try:
    invoke('commit', objs, strs)
except:
    print('System not locked')

I have put it in a separate file which I call from my main script:

execfile("F:\WLST\Commit System.py")

Till Next Time

WLST OBIEE Place Lock on system


Small script I use to set a lock on the OBIEE11g BI system:

print 'Calling lock ...'
cd ('..')
cd ('oracle.biee.admin:type=BIDomain,group=Service')
objs = jarray.array([], java.lang.Object)
strs = jarray.array([], java.lang.String)
try:
    invoke('lock', objs, strs)
except:
    print 'System already locked'
I have put it in a separate file which I call from my main script:
execfile("F:\WLST\Lock System.py")
Till Next Time

Friday, July 15, 2011

WLST (un)deploying an application directory

#
# Deploy and start an application directory
# using WLST (online)
# John Minkjan Ciber Netherlands
#

print 'deploying....'
deploy('OBIEE_META2', 'D:/OBIEE_META2', targets='AdminServer,bi_server1')

print 'starting.....'
startApplication('OBIEE_META2')


#
# stop and undeploy an application directory
# using WLST (online)
# John Minkjan Ciber Netherlands
#

print 'stoping.....'
stopApplication('OBIEE_META2')

print 'undeploying....'
undeploy('OBIEE_META2')

Till Next Time