Sunday, February 14, 2010

rman backup intergated dengan net backup

barangkali berguna, di sini saya akan sedikit membahas
rman backup ke tape dengan menggunakan third party net backup
1. install net backup client
2. test backup file system di client ke tape dengan menggunakan
   net backup, untuk memastikan komunikasi antara server media        dengan client tidak bermasalah
3. install netbackup's oracle add-on
4. di net backup master
   a. buat sebuah policy baru contoh CL-SERVER1-RMAN-DEMO
   b. pilih policy type "Oracle"
   c. dalam tab client di net backup master pilih client  
   d. dan pastikan bahwa backup type "Application Backup"
   e. save policy
5. di server database
   a. perlu restart database hanya sekali saja untuk mengenali/link       database ke net backup agent
   b. login sebagai user oracle
   c. sebagai user oracle jalankan script
      /usr/openv/netbackup/bin/oracle_link
6. test backup database
   di server database
   $ rman target=/
   RMAN> run {
      2> ALLOCATE CHANNEL c1 DEVICE TYPE sbt;
      3> send 'NB_ORA_POLICY=CL-SERVER1-RMAN-DEMO,NB_ORA_SERV=NBU-         MASTER-SRV';
      4> BACKUP current controlfile;
      5> release channel c1;}
   kalau bingung coba langsung jalankan script :
      
   RMAN> run {
      2> ALLOCATE CHANNEL c1 DEVICE TYPE sbt;
    
3> BACKUP current controlfile;
      4> release channel c1;}

Note :
pastikan di $ORACLE_HOME/lib sudah ada libobk.so yang merupakan link dari /usr/openv/netbackup/bin/oracle_link
dan jangan lupa juga LD_LIBRARY_PATH nya mengarah ke $ORACLE_HOME/lib

Thursday, January 28, 2010

Migrate 32-Bit Oracle to 64-Bit Oracle

 
32 Bit Machine 
 
 
1. Run SHUTDOWN IMMEDIATE on the database: 
 
   SQL> SHUTDOWN IMMEDIATE
 
2. Perform a full offline backup of the database. This backup is used only as a preventive action incase there is problem in removing OLAP options.  
 
3. Startup database again to remove OLAP options.
   SQL> STARTUP 
 
Run this script to remove OLAP options from the database :
 
----> Remove OLAP Catalog
SQL> @?\olap\admin\catnoamd.sql
 
----> Remove OLAP API
SQL> @?\olap\admin\olapidrp.plb
SQL> @?\olap\admin\catnoxoq.sql
 
----> Deinstall APS - OLAP AW component
SQL> @?\olap\admin\catnoaps.sql
SQL> @?\olap\admin\cwm2drop.sql
 
----> Recompile everything
SQL> @?\rdbms\admin\utlrp.sql
 
4. Shutdown the database and perform another full offline backup of the  database. This backup will be restored and converted to 64-bit database on 64-bit mechine. 
 
 
64 Bit Machine
 
1. Install the Oracle 10.2.0.1 64-bit version on 64-bit mechine.
 
2. Patch 10.2.0.1 32-bit software to 10.2.0.4 64-bit software
 
3. Copy configuration files from Oracle 32-bit mechine to a location outside of the old Oracle home (including init and password file).
 
   @ORACLE_HOME/database/
 
 
4. For changing wordsize from a 32-bit Oracle version to a 64-bit Oracle version, Oracle recommends doubling the size of parameters such as:
 
SHARED_POOL_SIZE
SHARED_POOL_RESERVED_SIZE
LARGE_POOL_SIZE
 
So, set new values of those parameters to double of current values in init password file (currently init file used on production is $ORACLE_HOME/database/initSERP_INFOR.ora)
    
5.  Copy offline backup files, which is backed up after removing OLAP options, from 32 bit mechine to the same location and path of 64 bit mechine.
 
 
6. Start SQL*Plus and connect to the database instance AS SYSDBA. 
    Startup using the edited PFILE using this command :
 
    SQL> STARTUP UPGRADE pfile= (edited pfile)
 
7. Set the system to spool results to a log file for later verification of success: 
 
    SQL> SPOOL catoutw.log
 
    If you want to see the output of the script you will run on your screen, then you can also issue a SET ECHO ON statement: 
 
    SQL> SET ECHO ON
 
8. Run utlirp.sql: 
 
    SQL> @$ORACLE_HOME/rdbms/admin/utlirp.sql
 
    The utlirp.sql script recompiles existing PL/SQL modules in the format required by the new database. 
 
 
 
9. Check the validity of the DBMS_STANDARD package:
 
    SQL> select status from dba_objects
    where object_name='DBMS_STANDARD'
    and object_type='PACKAGE'
    and owner='SYS';
 
10. If the package is invalid, recompile it:
 
    SQL> alter package dbms_standard compile;
 
11. Run the following SQL statement to check for invalid objects:
 
    SQL> select owner, object_name, object_type from dba_objects
    where status <> 'VALID';
 
12. Turn off the spooling of script results to the log file: 
 
    SQL> SPOOL OFF
 
    Then, check the spool file and verify that the packages and procedures  compiled successfully. You named the spool file in Step 15; the suggested name was catoutw.log. Correct any problems you find in this file (for example, compile any invalid objects)
 
    If you specified SET ECHO ON, then you may want to SET ECHO OFF now: 
 
    SQL> SET ECHO OFF
 
13. Shutdown and restart the database without upgrade options : 
 
    SQL> SHUTDOWN IMMEDIATE
    SQL> STARTUP
 
 
***