Tuesday, May 31, 2016

Restore 11g Full BAckup To 12c

Rman can restore a backup taken on older database version into new version.Important point is after restore and recover process , database must not be opened and manual upgrade operation must be done.This method can be used for out-of place upgrades.In my case I have a full backup from 11g and it will be restored into 12c version on new host.

Before start , in older version pre-upgrade and post-upgrade procedures should be completed for successfull upgrade.

Basically ,

  1. Copy preupgrd.sql and utluppkg.sql files from new 12c $ORACLE_HOME/rdbms/admin to old 11g $ORACLE_HOME/rdbms/admin
  2. Execute  preupgrd.sql under 11g to detect pre-upgrade issues that must be completed.
  3. Backup full database 
  4. Copy backup files and archive logs to new host 
  5. Copy current init file and password file to new 12c $ORACLE_HOME/dbs
  6. Startup database in nomount mode
  7. Restore controlfile.
  8. Open database in mount mode.
  9. Restore and recover database
  10. Shutdown database
  11. Open database in upgrade
  12. SQL> startup upgrade
    In this step i have encountered error ,

    ORA-01589: must use RESETLOGS or NORESETLOGS option for database open

    ORA-1589 signalled during: ALTER DATABASE OPEN MIGRATE...

    In order to pass over this error  following command can be used.

    alter database open resetlogs upgrade 
  13. For 12c new catctl.pl perl script is executed
    cd $ORACLE_HOME/rdbms/admin
    $ORACLE_HOME/perl/bin/perl catctl.pl -n  6 -l $ORACLE_HOME/diagnostics catupgrd.sql
     
  14. Run post-upgrade status tool $ORACLE_HOME/rdbms/admin/utlu121s.sql to display the summary of upgrade process.If any error(s) declared in output these errors must be exmained.
  15. Upgrade log file which is located at $ORACLE_HOME/diagnostics/catupgrd0.log is checked for "BEGIN catuppst.sql" to verify catuppst.sql ran during upgrade process.If this sql has not run then execute it .
  16. Run utlrp.sql to recompile invalid objects.
  17. Change parameter compatible in init.ora to "12.0.0"
  18. Shutdown database
  19. Recreate password file
  20. Startup database
After these steps new db version is 12c and it has been ugraded successfully. If you have a downtime and necessary disk size , this method can be used for upgrade to new versions.

Friday, May 6, 2016

Using SSL web service certificates in Oracle EBS

In this blog post, i would like to give some basic information about using SSL certificates in Oracle EBS applications. This requirement came from new development which takes data from web service over SSL. In order to connect securely, distributed certificate must be imported into keystore which your program will use to connect.

The keystore (cacerts) located in $AF_JRE_TOP/lib/security was used for this.To import related certificates into this truststore $AF_JRE_TOP/bin/keytool is used.

Change directory into $AF_JRE_TOP/bin

cd $AF_JRE_TOP/bin
./keytool -keystore ../lib/security/cacerts -importcert -file "your_cert_file" -alias "your_alias"

Default keystore password is : changeit

After answer "trust this certificate "as Yes , your certificate will be imported.

You can query certificate with following command,

./keytool -keystore ../lib/security/cacerts -list | grep "your_alias"

Output should show your certificate information .The keystore is now used in any code for using web service calls.