Oracle OPatch Failure & OPatch Rollback

OPatch Failure

I was encountering an OPatch failure during my Oracle Application Server 10g upgrade. The reason is that our previous developers failed during the last patch installation. The failure message is displayed below:

      Interim Patch is holding the lock from xxxxxxx

It looked like during the last unsuccessful patch installation. Patch number xxxxxxx acquired the patch lock but not released it. When the new patch was trying to aquire the same lock. It would be on hold. This information is generated during the last patch run and stored in the patch_locked file under the directory:

       $ORACLE_HOME/.patch_storage

If some interruption happened during an unsuccessful installation of the patches, the locks would not be released and this file would not be removed as well. Therefore, the following patch installation would encounter the share lock issue further caused by this file.

    Delete this file and then reinstall the patch. You would be good to go!

OPatch Rollback

Sometimes when you applied the patches, there would be some incompatiabity that would arise in the system. This new upgrade needs to be rolled back to keep the original environment.

Here are two useful commands for checking the version and the list of pathes that are touched.

opatch version

opatch lsinventory

Suppose my OAS Home is under /oracle/app/10gR3mid

Suppose you put your opatch folder temporarily under /tmp and under the tmp folder there is patch folder : 10031961

Run the command below marked in red in each subfolder of 10031961, suppose we would firstly rollback 10011970

So let us look at the before and after results from running opatch lsinventory

Before we apply the patch rollback, you could see the patch number exsits in the red box. 

After we apply the rollback it is gone.

[OBIEE Issue]11g BIP Error Code:InvocationTargetException

After I upgraded my 10g BIP reports to 11g, I was thinking of linking to the reports from the 11g BIF like what I did with old 10g OBIEE BIP. Let us review what we did in 10g firstly.

So basically when we we login to 10g xmlpserver and access the report, on the uppper right corner there shows up a link: Lind to the report

Four options are exposed for your referrence purposes. Suppose you click on No header option. You would get a link to this report like below:

http://domain_name:port/xmlpserver/report_folder/sample_report.xdo?_xpf=&_xpt=0&_xdo=%2Freport_folder%2Fsample_report.xdo&parameter1=sth&parameter2=sth&_xt=sample_reportTemplate&_xf=html&_xmode=2

Here note that _xmode=2 means you are using the no header option. So you could assume that if _xmode=3 would mean that you are chosing No Parameters option and so on.(See the table below) .

Parameter Value Refer To
_xmode 0 Current Page
_xmode 2 No header
_xmode 3 No Parameters
_xmode 4

Document Only

And also _xf refers to the format that how you are going to present the report. There are a few options as well in the following table.By default we are using html if we want to refer to the report through a browser. 

Now you get the link and you paste it into your browser, it would redirect you to the original report without header being showed up.

I tried to do the same thing with BIP 11g, and I figured out that it inheritantly had the same feature to get the link to the report like below.

I then generated the link through the second option: No header. It gave me the link like below:

http://domain_name:port/xmlpserver/report_folder/sample_report.xdo?_xpf=&_xpt=0&_xmode=4&_xdo=%2Freport_folder%2Fsample_report.xdo&_xpf=&_xpt=0&_xdo=%2Freport_folder%2Fsample_report.xdo&_paramsparameter1=sth&_paramsparameter2=sth&_xt=sample_reportTemplate&_xf=html&_xautorun=false

The link above is reformed a little bit from the 10g version and now I will paste it into the browser and see what happens.

It shows up the report.  But the header is still there.

Then I started trying other options except mode 2, for example, No Parameters. I got the following error.

Solutions:

This is a bug for the release Oracle Business Intelligence Product Version 11.1.1.5.0 (Build 110427.0752 64-bit)

    Oracle just released a patch for 11g 11.1.1.5.0 BIP to fix a bunch of bugs including the one we found:

        11850902 – SHARE REPORT LINK “NO PARAMETERS” AND “DOCUMENT ONLY” RENDER INCORRECTLY

    

     For details check out this link:

         http://prsync.com/oracle/bi-publisher-january-patch-for–402573/

     Download the patch file from:

         https://updates.oracle.com/Orion/Services/download/p13554951_11g_Generic.zip?aru=14460731&patch_file=p13554951_11g_Generic.zip

        Apply it according to the readme.txt included in the package. The bug would be solved! Good luck!

     

What really interested me is when you try to generate the same report from BI Answers 11g. It gave the link which looked different from the BIP version.

http://domain_name:port/analytics/saw.dll?bipublisherEntry&Action=open&itemType=.xdo&bipPath=%2Freport_folder%2Fsample_report.xdo&bipParams={“_xmode”:”2″,”_xpf”:”",”_xpt”:”0″,”_xdo”:”%2Freport_folder%2Fsample_report.xdo”,”_paramsparameter1″:”",”_paramsparameter2″:”",”_xt”:”sample_reportTemplate”,”_xf”:”html”,”_xautorun”:”true”}

And if you apply this link to the browser, even though you keep changing _xmode from 0 to 4, it didn’t make much difference.Anyone has any idea for this issue?

[OBIEE ISSUE]Upgrade BI Publisher reports from 10G to 11G

I have to highly recommend the following blog article that talks about the upgrade of 10g BI Publisher reports to 11g.

Blog link: http://bipconsulting.blogspot.com/2011/07/10g-users-lets-upgrade-to-bi-publisher.html

Kan explains the process in detailed steps and I followed his steps to perform the upgrade. The upgrade was successful as he showed in the last picture of publisher reports upgrade section. I have seen my old 10g publisher reports folder showing up. But when I went under my report folders, I tried to open my reports xdo file, it gave me an error below:

ShockedThe report cannot be rended because of an error,please contact the administrator.

It looked like my report xdo file is not associated with the correct data model file.So then I tried to edit my vat_report report and I saw that after automatic upgrade, my vat_report report was set with the default data model : vat_report.xdm which doesn’t exsit on my data model list. In the presentation layer, the actual data model is called vat_report. Match the correct model by clicking  button.

Click View Report to check if you still have the error above and click save to enable the change.

Good luck!

AlienNote: There are file structure changes for BI Publisher upgrade. The original .xdo now is split into two components – .xdm and .xdo as illustrated:(The following picture is borrowed from my other favorite blog:  http://howtobi.wordpress.com/2011/01/14/upgrading-obiee-10g-content-to-11g/)

[OBIEE ISSUE] OBIEE 11G startup&shutdown script on UNIX

Oracle Obiee 11g now is a more complex system taking longer time for startup and shutdown compared to 10g. It is better for our dev team to come up with a script running on background to manipulate the services. In order to make it smoothly work in the UNIX system(Solaris) , here are a few things you might consider to implement on UNIX environment.

Step 1:Compose the startup and shutdown script. and set the path to the your .profile in order that you could run your script from anywhere.

The code snippets below is originally from an oracle obiee 11g guru’s blog that I found very useful. I tweaked a little bit for our DEV environment.

#!/bin/bash
#
# Purpose: Start and stop Oracle Business Intelligence 11g components.
#
# description: Manage OBIEE service.
## These values must be adapted to your environment.ORACLE_OWNR=oracle

ORACLE_BASE=/oracle # Local Unix user running OBIEE
ORACLE_FMW=/oracle/middleware
# Deployment root directory
export WLS_USER=weblogic # BIEE administrator name
export WLS_PW=weblogic1
BIEE_DOMAIN=bifoundation_domain # Domain name
BIEE_INSTANCE=instance1 # Instance name
BIEE_SERVER=bi_server1 # Server name
BIEE_MANAGER_URL=:7001 # Admin server URL (hostname:port)

# These should require no change.

WL_PATH=$ORACLE_FMW/wlserver_10.3/server/bin
BIEE_PATH=$ORACLE_BASE/$BIEE_DOMAIN/bin
ORACLE_INSTANCE=$ORACLE_FMW/instances/$BIEE_INSTANCE

export ORACLE_INSTANCE

START_LOG=/log/obiee-start.log #Put the log info under the dir where you could easily check on
STOP_LOG=/log/obiee-stop.log

start() {
echo "********************************************************************************"
echo "Starting Admin Server on $(date)"
echo "********************************************************************************"
su $ORACLE_OWNR -c "$BIEE_PATH/startWebLogic.sh" &
wait_for "Server started in RUNNING mode"

echo "********************************************************************************"
echo "Starting Node Manager on $(date)"
echo "********************************************************************************"
su $ORACLE_OWNR -c "$WL_PATH/startNodeManager.sh" &
wait_for "socket listener started on port"

echo "********************************************************************************"
echo "Starting Managed Server $BIEE_SERVER on $(date)"
echo "********************************************************************************"
su $ORACLE_OWNR -c "$BIEE_PATH/startManagedWebLogic.sh $BIEE_SERVER http://$BIEE_MANAGER_URL" &
wait_for "Server started in RUNNING mode"

echo "********************************************************************************"
echo "Starting BI components on $(date)"
echo "********************************************************************************"
su $ORACLE_OWNR -c "$ORACLE_INSTANCE/bin/opmnctl startall"

echo "********************************************************************************"
echo "OBIEE start sequence completed on $(date)"
echo "********************************************************************************"
}

stop() {
echo "********************************************************************************"
echo "Stopping BI components on $(date)"
echo "********************************************************************************"
su $ORACLE_OWNR -c "$ORACLE_INSTANCE/bin/opmnctl stopall"

echo "********************************************************************************"
echo "Stopping Managed Server $BIEE_SERVER on $(date)"
echo "********************************************************************************"
su $ORACLE_OWNR -c "$BIEE_PATH/stopManagedWebLogic.sh $BIEE_SERVER t3://$BIEE_MANAGER_URL $WLS_USER $WLS_PW"

echo "********************************************************************************"
echo "Stopping Node Manager on $(date)"
echo "********************************************************************************"
pkill -TERM -u $ORACLE_OWNR -f "weblogic\\.NodeManager"
pkill -TERM -u $ORACLE_OWNR -f "java -client -Xms32m -Xmx200m -XX"

echo "********************************************************************************"
echo "Stopping Admin Server on $(date)"
echo "********************************************************************************"
su $ORACLE_OWNR -c "$BIEE_PATH/stopWebLogic.sh $WLS_USER $WLS_PW"

echo "********************************************************************************"
echo "OBIEE stop sequence completed on $(date)"
echo "********************************************************************************"
}

wait_for() {
res=0
while [[ ! $res -gt 0 ]]
do
res=$(tail -5 "$START_LOG" | fgrep -c "$1")
sleep 5
done
}

case "$1" in
start)
echo "********************************************************************************"
echo "Starting Oracle Business Intelligence on $(date)"
echo "Logs are sent to $START_LOG"
echo "********************************************************************************"
start &> $START_LOG

;;
stop)
echo "********************************************************************************"
echo "Stopping Oracle Business Intelligence on $(date)"
echo "Logs are sent to $STOP_LOG"
echo "********************************************************************************"
stop &> $STOP_LOG
;;
status)
echo "********************************************************************************"
echo "Oracle BIEE components status...."
echo "********************************************************************************"
su $ORACLE_OWNR -c "$ORACLE_INSTANCE/bin/opmnctl status"
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: $(basename $0) start|stop|restart|status"
exit 1
esac

exit 0

Step 2. We are using the script to pass in the two parameters: WLS_USER and WLS_PW. Otherwise you might have to input the value during the startup. You also need to modify startManagedWebLogic.sh under dir: BIEE_PATH. Comment out the following lines in the red box to prevent the original script from replacing the two key values.

Step 3. Now you could be able to use the script.

Appendix: Kill Processes Running On a Particular Port if you don’t have lsof on your UNIX box. The following example shows that if you want to find the current process id that is running on port 9556.

$for x in `ps -ef | sed 1d | awk '{print $2}'`
> do
> echo $x
> pfiles $x 2>/dev/null | grep "port: 9556"
> done

The results looks like below:

...

4193
5054
5055
4206
4200
5225
4620
sockname: AF_INET 0.0.0.0 port: 9556
sockname: AF_INET 0.0.0.0 port: 9556
5061
7550

...

So now you get 4620 as the process id and you could do: ps -ef | grep 4620 to check the process details.

[OBIEE Issue] OBIEE 11g Deinstall Q&A

In order to get rid of the failed installation of the my last OBIEE 11G installation with the simple install. I performed the following tasks:( The reason that I did not use the uninstall wizard is there existed failure during my last installation and prevented the uninstall wizard from working correctly. I will cover the regular uninstall procedure after this.)

After that, I tired to install obiee 11g from the installation wizard again and when it came to the RCU configuration page.I encountered the following error:

INST-08020: One or more entries are found in HSS_COMPONENT table.
– A new schema must be used in order to install successfully.

Reason: When you conducted the simple install, you also had to point to the BIPLATFORM and MDS schemas. These schema tables get populated with the first installation attempt and succeeded. If you want to reinstall the software to enterprise install. You have to drop the BIPLATFORM and MDS Schemas created by the RCU install. Those schemas can only contain one OBI installation at a time unless you changed the prefix (ie: DEV_,QA_,PROD_,etc.) of the schemas if you had the RCU a second time against that same database.

Solutions: If you want to use the same database, then drop the schema firstly using the wizard and then manually delete the corresponding tablespaces. (ie: DEV_BIPLATFORM.dbf, DEV_MDS.dbf,etc)

Appendix: The regular uninstall procedure (Condition: Last install should be successfully completed)

1. Run the deinstall script and select the Deinstall instances managed by a WebLogic domain option.
* open terminal, go to /Oracle_BI1/oui/bin
* run deinstallation script:

$ ./runInstaller.sh -deinstall

1. Welcome
* next
2. Select Deinstallation Type
* select Deinstall ASInstances…
3. Specify Weblogic Domain Detail
* domain host:
* domain port: 7001
* username: weblogic
* password: weblogic1
4. Select Managed Instance
* select instance1, all become checked.
5. Deinstallation Summary
* save deinstallation configuration to: (You could save this information for debugging purpose)
* Deinstall
6. Deinstallation Progress
* no errors
7. Deinstallation Complete
* Success, click finish

* verify success of script by going to the instances folder and making sure it doesn’t contain the instances that were deleted

2. Stop all Oracle Business Intelligence processes and servers, including all OPMN-controlled components and JEE components.
* Go to http://:7001/em then click core application under the business intelligence folder. Stop the components.
* Components already stopped
3. Drop the Metadata Services (MDS) and Business Intelligence Platform (BIPLATFORM) schemas using RCU.
* on my desktop load the rcu: C:\ofm_rcu_win_11.1.1.5.0_disk1_1of1\rcuHome\BIN\rcu.bat
note: make sure all components are stopped otherwise errors will occur. opmnctl stopall
1. Welcome
2. Drop Repository
3. Database Connection Details
* database type: oracle database
* host name:
* port: 1521
* service name:
* username: sys
* password: *******
* role: sysdba
4. Select Components
* select DEV (note: it might be a different name according to your installation)from the drop down menu
* four check marks automatically on:
1. AS Common Schemas
2. Metadata Services
3. Oracle Business Intelligence
4. Business Intelligence Platform
* ok, ok
5. Summary
* drop
6. Completion Summary
* sucess, close
4. Run the deinstall script and select the Deinstall Oracle Home option.

$ cd /Oracle_BI1/oui/bin
$ ./runInstaller.sh -deinstall

1. Welcome
* next
2. Select Deinstallation Type
* select Deinstall Oracle Home…
3. Deinstall Oracle Home
* save response file to:(save to somewhere for further use, it is optional)
* deinstall
4. Deinstallation Progress
* yes, delete directory after deinstall
5. Deinstallation Complete
* finish

5. Deinstall the Oracle Common home manually or by running the deinstall script that it contains.

* If you installed Oracle Business Intelligence using the Simple or Enterprise Install type,
you can fulfill this requirement by specifying the JDK directory that was created by
Oracle Business Intelligence 11g Installer in the Middleware home.

$ cd /oracle_common/oui/bin
$ ./runInstaller.sh -deinstall -jreLoc /usr/java

1. Welcome
2. Deinstall Oracle Home
* save response file: (save to somewhere for further use, it is optional)
* deinstall
3. Deinstallation Progress
* yes to delete the directory after deinstall
4. Deinstallation Complete
* finish

6. Use the Oracle WebLogic Server uninstaller to uninstall WebLogic Server.

$ cd /wlserver_10.3/uninstall
run the shell script : /utils/uninstall/uninstall.sh

7. Remove the Middleware home (if necessary). If you have done enterprise install, then remove the foundation domain home as well.

* Delete all remainding files/directories

8 End of the instruction.

[OBIEE Issue] How to remotely connect to online RPD

Step 1. Set up your system DSN. Go to “Start” at the left corner of your windows system and click to expand the panel. And then click “Control Panel” on the right.

Step 2. Click “Administrative Tools“, and then click “Data Sources (ODBC)” .

Step 3. Click “System DSN” and then click “Add” to add a new one.

Step 4. Choose “Oracle BI Server” as the driver.Note: Once you install the 10g OBIEE package which by default would include the driver installation.Step 5. Fill in the Server name (this one would show up when you use admin tool to remotely connect to the online rpd) and IP address where your remote rpd locates on. Then click “Next“.Step 6. On this page, type the Login ID as your rpd Admin login id. By default it should be “Administrator“. And the Password should be remote rpd login password. I would check the last box marked in red to make a trial connection to the remote rpd and make sure this connection is valid. Then click “Next“.

Step 7. If you could see this page  with the remote subject areas showing up , in this case (Sample 1 and Sample 2 are the two subject areas on my remote rpd). Then this DSN is valid. Then click “Finish“.Step 8. Go to your admin tool and then click the blue folder button for opening online rpd. Then on the pop-up window, it lists all the DSNs available. Choose the one you just created and type the rpd password. Then you could be able to login to your remote rpd.

[OBIEE Issue] SSO server version v3.0 is not supported

Background:

I made an upgrade on SSO Server 1  from 10.1.2.x to 10.1.4.x ,while for SSO Server 2, I kept the older version. Here is the version number comparison that you could easily found out from the setupinfo.txt under the software installation folder.

and then I tried to register the same partner application server with the same syntax I used to write on SSO Server 2 like below:

It actually gave me no complaint on the SSO Server 1.However, when I transfered the osso.conf file to my partner application server and put it under the same directory I used to. After restarting the HTTP Server, I got the following error: SSO server version v3.0 is not supported.

Solutions:

This is caused by a version mismatch in the SSO conf file I generated from my SSO Server 1. The SSO version was 10.1.4.0.1 as you could see above and I was using the generated conf file for my partner application of a version 10.1.3.4.1 like below:

.     By default, using the same syntax for registering the partner application server on Server 1 would create an osso.conf file of a version 3 which is a higher version that is not compatible with our partner server. In order to solve the problem, we have to explicitly tell the SSO Server to generate a lower version file by giving an extra parameter specifying this need. So the new syntax would look like:

After restarting the HTTP Server, it worked perfectly with the new file! Good luck!