Migration Oracle 7.3.3 nach 7.3.4 |
|
---|---|
Die Datenbankfiles müssen erhalten bleiben, das Data Dictionary wird migriert. Grundsätzlich sollte der Release 7.3.4 in einem neuen ORACLE_HOME installiert werden damit man im Notfall wieder zurückmigrieren kann. Migration auf Oracle 7.3.4 Altes ORACLE_HOME: /oracle/v733 1). Neues ORACLE_HOME definieren -------------------------------- - Als user oracle einloggen - File .profile ändern, so dass ORACLE_HOME an einem anderen Ort ist. - cp .profile_v733 .profile_v734 - ORACLE_HOME=/oracle/v734; export ORACLE_HOME - TNS_ADMIN=/export/home/oracle/config/v734; export TNS_ADMIN - cd /oracle - mkdir v734 - cd $HOME/config - mkdir v734 - cd v733 - cp * ../v734 2). Backup der alten Datenbank Files ------------------------------------ 3). Alte DB stoppen ------------------- svrmgrl connect internal shutdown immediate 4). Neuen Release 7.3.4 an neues ORACLE_HOME einlesen ----------------------------------------------------- - Ausloggen - Einloogen, neues ORACLE_HOME aktivieren (Kontrolle !) - cd /cdrom/oracle734/orainst - ./orainst - Custom Install - Install, Upgrade, or De-Install Software - Add/Upgrade Software - Advanced Network Option nicht installieren Would you like to regenerate shared version of the Oracle library for Pro*C, OCI and XA clients? If yes, please shutdown all applications using Oracle shared library and select (Yes). Shared library can also be generated by executing make -f clntsh.mk libclntsh in /oracle/v734/rdbms/lib. - Antwort: Yes 5). Parameter Files anpassen ---------------------------- - cd $ORACLE_HOME/dbs - ln -s /export/home/oracle/config/v734/initSOL2.ora initSOL2.ora - Editieren von initSOL2.ora * control_files zeigen weiterhin an ALTEN Ort ! control_files = /oracle/v733/oradata/con/SOL2_con01.con, /oracle/v733/oradata/con/SOL2_con02.con compatible = 7.3.4.0 * Alle anderen Files zeigen an neuen Ort ! log_archive_dest = /oracle/v734/oradata/arc/SOL2 audit_file_dest = /oracle/v734/oradata/adm/admp user_dump_dest = /oracle/v734/oradata/adm/bdmp background_dump_dest = /oracle/v734/oradata/adm/cdmp core_dump_dest = /oracle/v734/oradata/adm/udmp utl_file_dir = /oracle/v734/oradata/adm/utl - Neue Directories kreieren cd /oracle/v734 mkdir oradata cd oradata mkdir arc adm cd adm mkdir admp bdmp cdmp udmp utl 6). Upgrade der Datenbank Objekte --------------------------------- - cd $ORACLE_HOME/orainst (am neuen Ort 7.3.4 !) - ./orainst (o) Custom Install (o) Create/Upgrade Database Objects (o) Upgrade Database Objects - Neues ORACLE_HOME angeben: /oracle/v734 - ORACLE_SID angeben: SOL2 (o) Upgrade Existing Product DB Objects - 733 (Which Database to migrate) Der Vorgang dauert recht lange ! - Kontrolle der LOG-Files in $ORACLE_HOME/orainst ! 7). Relocate der Datenbankfiles ------------------------------- - Liste der bisherigen DB-Files erstellen svrmgrl connect internal spool file.list select * from v$dbfile; select * from v$logfile; spool off; shutdown immediate; - Controlfiles an neuen Ort kopieren cd /oracle/v733/oradata/con cp * /oracle/v734/oradata/con - Parameterfile $ORACLE_HOME/dbs/initSOL2.ora editieren Controlfiles umhängen an neuen Ort control_files = /oracle/v734/oradata/con/SOL2_con01.con, /oracle/v734/oradata/con/SOL2_con02.con - Datenbank starten (nur Controlfiles öffnen !) svrmgrl connect internal startup mount - Datenbankfiles physisch umkopieren und im DD umbenennen $ cd /oracle/v733/oradata/cdr $ cp SOL2_cdr1.dbf /oracle/v734/oradata/cdr SVRMGR> alter database 2> rename file '/oracle/v733/oradata/cdr/SOL2_cdr1.dbf' 3> to '/oracle/v734/oradata/cdr/SOL2_cdr1.dbf'; Anweisung verarbeitet $ cd .. $ rm -r cdr $ cd /oracle/v733/oradata/cre $ cp cp SOL2_cre1.dbf /oracle/v734/oradata/cre SVRMGR> alter database 2> rename file '/oracle/v733/oradata/cre/SOL2_cre1.dbf' 3> to '/oracle/v734/oradata/cre/SOL2_cre1.dbf'; Anweisung verarbeitet $ cd .. $ rm -r cre $ cd /oracle/v733/oradata/idx $ cp SOL2_idx1.dbf /oracle/v734/oradata/idx SVRMGR> alter database 2> rename file '/oracle/v733/oradata/idx/SOL2_idx1.dbf' 3> to '/oracle/v734/oradata/idx/SOL2_idx1.dbf'; Anweisung verarbeitet $ cd .. $ rm -r idx $ cd /oracle/v733/oradata/rbs $ cp SOL2_rbs1.dbf /oracle/v734/oradata/rbs SVRMGR> alter database 2> rename file '/oracle/v733/oradata/rbs/SOL2_rbs1.dbf' 3> to '/oracle/v734/oradata/rbs/SOL2_rbs1.dbf'; Anweisung verarbeitet $ cd .. $ rm -r rbs $ cd /oracle/v733/oradata/rdo $ cp * /oracle/v734/oradata/rdo SVRMGR> alter database 2> rename file '/oracle/v733/oradata/rdo/SOL2_log1A.rdo' 3> to '/oracle/v734/oradata/rdo/SOL2_log1A.rdo'; Anweisung verarbeitet SVRMGR> alter database 2> rename file '/oracle/v733/oradata/rdo/SOL2_log1B.rdo' 3> to '/oracle/v734/oradata/rdo/SOL2_log1B.rdo'; Anweisung verarbeitet SVRMGR> alter database 2> rename file '/oracle/v733/oradata/rdo/SOL2_log2A.rdo' 3> to '/oracle/v734/oradata/rdo/SOL2_log2A.rdo'; Anweisung verarbeitet SVRMGR> alter database 2> rename file '/oracle/v733/oradata/rdo/SOL2_log2B.rdo' 3> to '/oracle/v734/oradata/rdo/SOL2_log2B.rdo'; Anweisung verarbeitet $ cd .. $ rm -r rdo $ cd /oracle/v733/oradata/sys $ cp SOL2_sys1.dbf /oracle/v734/oradata/sys SVRMGR> alter database 2> rename file '/oracle/v733/oradata/sys/SOL2_sys1.dbf' 3> to '/oracle/v734/oradata/sys/SOL2_sys1.dbf'; Anweisung verarbeitet $ cd .. $ rm -r sys $ cd /oracle/v733/oradata/tab $ cp SOL2_tab1.dbf /oracle/v734/oradata/tab SVRMGR> alter database 2> rename file '/oracle/v733/oradata/tab/SOL2_tab1.dbf' 3> to '/oracle/v734/oradata/tab/SOL2_tab1.dbf'; Anweisung verarbeitet $ cd .. $ rm -r sys $ cd /oracle/v733/oradata/tmp $ cp SOL2_tmp1.dbf /oracle/v734/oradata/tmp SVRMGR> alter database 2> rename file '/oracle/v733/oradata/tmp/SOL2_temp1.dbf' 3> to '/oracle/v734/oradata/tmp/SOL2_temp1.dbf'; Anweisung verarbeitet $ cd .. $ rm -r tmp $ cd /oracle/v733/oradata/usr $ cp SOL2_users1.dbf /oracle/v734/oradata/usr SVRMGR> alter database 2> rename file '/oracle/v733/oradata/usr/SOL2_users1.dbf' 3> to '/oracle/v734/oradata/usr/SOL2_users1.dbf'; Anweisung verarbeitet $ cd .. $ rm -r usr SVRMGR> alter database open; Anweisung verarbeitet 7). root.sh ausführen --------------------- cd $ORACLE_HOME/orainst su ./root.sh 8). oratab file anpassen ------------------------ SOL1:/oracle/v805:Y SOL2:/oracle/v734:Y 9). Startupscripts anpassen --------------------------- su - cd /etc/init.d vi lsnrora v733 --> v734 ersetzen 10). Listener anpassen ---------------------- - Alten Listener stoppen - cd $HOME/config/v734 vi listener.ora v733 --> v734 ersetzen |