Wednesday, May 28, 2014

Oracle DB - Upgrade 11.1.0.6.0 to 11.1.0.7.0


Opisaću proceduru instalacije 11.1.0.7.0 patche-a za Oracle 11gR1 (11.1.0.6.0) bazu podataka koja je instalirana na Windows Server 2003 x64 operativnom sistemu.

PatchSet se može download-ovati sa Metalink-a (odabrati odgovarajući operativni sistem).

Procedura primjene PatchSet-a je sledeća:

1. Provjera posojeće PatchSet verzije:
CMD> sqlplus /nolog
SQL> conn / as sysdba
Connected.
SQL> SELECT * FROM V$VERSION;
BANNER
------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
PL/SQL Release 11.1.0.6.0 - Production
CORE    11.1.0.6.0      Production
TNS for 64-bit Windows: Version 11.1.0.6.0 - Production
NLSRTL Version 11.1.0.6.0 – Production

SQL> set pages 250
SQL> set lines 1000
SQL> col comp_name for a40
SQL> select comp_name, version, status from dba_registry;

COMP_NAME                                VERSION                        STATUS
---------------------------------------- ------------------------------ -----------
OWB                                      11.1.0.6.0                     VALID
Oracle Application Express               3.0.1.00.08                    VALID
Oracle Enterprise Manager                11.1.0.6.0                     VALID
Oracle Ultra Search                      11.1.0.6.0                     VALID
OLAP Catalog                             11.1.0.6.0                     VALID
Spatial                                  11.1.0.6.0                     VALID
Oracle Multimedia                        11.1.0.6.0                     VALID
Oracle XML Database                      11.1.0.6.0                     VALID
Oracle Text                              11.1.0.6.0                     VALID
Oracle Expression Filter                 11.1.0.6.0                     VALID
Oracle Rules Manager                     11.1.0.6.0                     VALID
Oracle Workspace Manager                 11.1.0.6.0                     VALID
Oracle Database Catalog Views            11.1.0.6.0                     VALID
Oracle Database Packages and Types       11.1.0.6.0                     VALID
JServer JAVA Virtual Machine             11.1.0.6.0                     VALID
Oracle XDK                               11.1.0.6.0                     VALID
Oracle Database Java Packages            11.1.0.6.0                     VALID
OLAP Analytic Workspace                  11.1.0.6.0                     VALID
Oracle OLAP API                          11.1.0.6.0                     VALID
2. Ugasiti Oracle bazu podataka i sve servise koji su instalirani sa bazom.
CMD> sqlplus /nolog
SQL> conn / as sysdba
Connected.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
3. Napraviti backup ORADATA foldera (control fajlove, data fajlove, redo log fajlove, archive fajlove i temp fajlove) kao i backup ORACLE_HOME foldera.

4. Instalirati PatchSet software.

- Startovati installer:


- Kliknuti na dugme Next.


- Odabrati odgovarajući ORACLE_HOME i kliknuti na Next.


- Kliknuti na Next.


- Kliknuti na Next.


 - Kliknuti na Install, i sačekati da installer završi instalaciju software-a:




- Na kraju kliknuti na Exit.

5. Sada je potrebno uraditi upgrade same baze podataka. To je moguće uraditi na dva načina: manuelno (pokretanjem odgovarajućih skripti) i automatski (pomoću Database Upgrade Assistant-a - DBUA). Ja ću predstaviti ovaj prvi način.

- Startovati Listener servis i bazni servis.

- Provjeriti da li su ispunjeni svi uslovi za upgrade Oracle baze podataka.

- Pozicionirati se u folder %ORACLE_HOME%\RDBMS\ADMIN i konektovati se na baznu instancu:
E:\>cd E:\Oracle\product\11.1.0\db_2\RDBMS\ADMIN
E:\Oracle\product\11.1.0\db_2\RDBMS\ADMIN>set ORACLE_SID=db1
E:\Oracle\product\11.1.0\db_2\RDBMS\ADMIN>set ORACLE_HOME=E:\Oracle\product\11.1.0\db_2
E:\Oracle\product\11.1.0\db_2\RDBMS\ADMIN>sqlplus /nolog
SQL*Plus: Release 11.1.0.7.0 - Production on Sri Svi 28 08:46:04 2014
Copyright (c) 1982, 2008, Oracle.  All rights reserved.

SQL> conn /as sysdba
Connected to an idle instance.

SQL> startup upgrade;
ORACLE instance started.
Total System Global Area  860160000 bytes
Fixed Size                  2134296 bytes
Variable Size             616566504 bytes
Database Buffers          239075328 bytes
Redo Buffers                2383872 bytes
Database mounted.
Database opened.

SQL> spool F:\pre_upgrade.log
SQL> @utlu111i.sql
SQL> spool off;

- Ukoliko log fajl F:\pre_upgrade.log ne sadrži greške nastaviti sa procedurom upgrade-a, a ako sadrži greške potrebna je intervencija na bazi kako bi se te greške otklonile.

- Pokrenuti skriptu za upgrade baze:

SQL> spool F:\upgrade_28.05.2014.log
SQL> @catupgrd.sql
SQL> spool off;

- Skripta za upgrade baze na kraju stopira bazu. Sada je potrebno startovati bazu i izvršiti rekompajliranje svih objekata čiji je status INVALID.

SQL> startup

ORACLE instance started.
Total System Global Area  860160000 bytes
Fixed Size                  2134296 bytes
Variable Size             717229800 bytes
Database Buffers          138412032 bytes
Redo Buffers                2383872 bytes
Database mounted.
Database opened.

SQL> spool F:\recompile.log
SQL> @utlrp.sql
SQL> spool off;

6. Na kraju provjeriti verziju upgrade-ovane baze:

SQL> SELECT * FROM V$VERSION;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
PL/SQL Release 11.1.0.7.0 - Production
CORE    11.1.0.7.0      Production
TNS for 64-bit Windows: Version 11.1.0.7.0 - Production
NLSRTL Version 11.1.0.7.0 – Production

SQL> set pages 250
SQL> set lines 1000
SQL> col comp_name for a40
SQL> select comp_name, version, status from dba_registry;

COMP_NAME                                VERSION                        STATUS
---------------------------------------- ------------------------------ -----------

OWB                                      11.1.0.6.0                     VALID
Oracle Application Express               3.0.1.00.12                    VALID
Oracle Enterprise Manager                11.1.0.7.0                     VALID
Oracle Ultra Search                      11.1.0.7.0                     VALID
OLAP Catalog                             11.1.0.7.0                     VALID
Spatial                                  11.1.0.7.0                     VALID
Oracle Multimedia                        11.1.0.7.0                     VALID
Oracle XML Database                      11.1.0.7.0                     VALID
Oracle Text                              11.1.0.7.0                     VALID
Oracle Expression Filter                 11.1.0.7.0                     VALID
Oracle Rules Manager                     11.1.0.7.0                     VALID
Oracle Workspace Manager                 11.1.0.7.0                     VALID
Oracle Database Catalog Views            11.1.0.7.0                     VALID
Oracle Database Packages and Types       11.1.0.7.0                     VALID
JServer JAVA Virtual Machine             11.1.0.7.0                     VALID
Oracle XDK                               11.1.0.7.0                     VALID
Oracle Database Java Packages            11.1.0.7.0                     VALID
OLAP Analytic Workspace                  11.1.0.7.0                     VALID
Oracle OLAP API                          11.1.0.7.0                     VALID




2 comments:

  1. Šta ispravlja ovaj patch, odnosno koja je razlika između 11.1.0.7 verzije i prethodnog releasa?

    ReplyDelete
    Replies
    1. Patche 11.1.0.7.0 predstavlja PatchSet 1 za osnovnu Oracle 11gR1 (11.1.0.6.0) bazu podataka. Lista ispravki u odnosu na prethodnu verziju je dosta velika,
      može se pogledati na Metalinku (nota-601739.1): https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=976920764014943&id=601739.1&_afrWindowMode=0&_adf.ctrl-state=rmsezb934_162
      Meni je upgrade bio potreban zbog potrebe da podatke iz baze koja je instalirana sa CHARACTERSET-om EE8MSWIN1250 migriram na bazu sa
      CHARACTERSET-om UTF8.

      Delete