Clone Oracle_home

Při instalaci nového OH jsem špatně označil adresář /opt/oracle/app/12102 a přitom se jedná o SEO a ta je ve verzi 12101, proto potřebuji OH přejmenovat.
[oracle@ORACLE app]$ ps -fu oracle
UID        PID  PPID  C STIME TTY          TIME CMD
oracle   29809 24868  0 13:01 pts/0    00:00:00 ps -fu oracle

[oracle@ORACLE 12102]$ /opt/oracle/app/12102/OPatch/opatch lsinv -all
Oracle Interim Patch Installer version 12.1.0.1.9
Copyright (c) 2015, Oracle Corporation.  All rights reserved.

Oracle Home       : /opt/oracle/app/12102
Central Inventory : /opt/oracle/oraInventory
from           : /opt/oracle/app/12102/oraInst.loc
OPatch version    : 12.1.0.1.9
OUI version       : 12.1.0.1.0
Log file location : /opt/oracle/app/12102/cfgtoollogs/opatch/opatch2015-10-22_13-03-12odp._1.log

Lsinventory Output file location : /opt/oracle/app/12102/cfgtoollogs/opatch/lsinv/lsinventory2015-10-22_13-03-12odp..txt

——————————————————————————–
Local Machine Information::
Hostname: ORACLE
ARU platform id: 226
ARU platform description:: Linux x86-64

List of Oracle Homes:
Name          Location
OraDb11g_home1       /opt/oracle/app/11g
OraDB12Home2         /opt/oracle/app/12102  <– špatně pojmenovaný adresář

Installed Top-level Products (1):

Oracle Database 12c                                                  12.1.0.1.0
There are 1 products installed in this Oracle Home.

Interim patches (1) :

Patch  21352619     : applied on Thu Oct 22 12:56:08 CEST 2015
Unique Patch ID:  19194200
Patch description:  „Database Patch Set Update : 12.1.0.1.9 (21352619)“
Created on 3 Aug 2015, 01:34:38 hrs PST8PDT
Sub-patch  20831107; „Database Patch Set Update : 12.1.0.1.8 (20831107)“
Sub-patch  20299016; „Database Patch Set Update : 12.1.0.1.7 (20299016)“
Sub-patch  19769486; „Database Patch Set Update : 12.1.0.1.6 (19769486)“
Bugs fixed:

Překopírování ORACLE_HOME

[oracle@ORACLE app]$ pwd
/opt/oracle/app
[oracle@ORACLE app]$ mv 12102 12101

Klonování Oracle_home

[oracle@ORACLE app]$ /opt/oracle/app/12101/oui/bin/runInstaller \
> -clone \
> -silent \
> -defaultHomeName ORACLE_HOME=/opt/oracle/app/12101 \
> ORACLE_BASE=/opt/oracle/app \
> -waitForCompletion
Starting Oracle Universal Installer…

Checking swap space: must be greater than 500 MB.   Actual 21288 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2015-10-22_01-14-55PM. Please wait …Oracle Universal Installer, Version 12.1.0.1.0 Production
Copyright (C) 1999, 2013, Oracle. All rights reserved.

You can find the log of this install session at:
/opt/oracle/oraInventory/logs/cloneActions2015-10-22_01-14-55PM.log
………………………………………………………………………………………. 100% Done.

Installation in progress (Čtvrtek, 22. říjen 2015 13:15:14 CEST)
………………………………………………………………………. 82% Done.
Install successful

Linking in progress (Čtvrtek, 22. říjen 2015 13:15:21 CEST)
Link successful

Setup in progress (Čtvrtek, 22. říjen 2015 13:16:33 CEST)
………..                                                     100% Done.
Setup successful

Saving inventory (Čtvrtek, 22. říjen 2015 13:16:34 CEST)
Saving inventory complete

Configuration in progress (Čtvrtek, 22. říjen 2015 13:16:56 CEST)
Configuration complete

End of install phases.(Čtvrtek, 22. říjen 2015 13:16:56 CEST)
WARNING:
The following configuration scripts need to be executed as the „root“ user.
/opt/oracle/app/12101/root.sh
To execute the configuration scripts:
1. Open a terminal window
2. Log in as „root“
3. Run the scripts

The cloning of OraHome1 was successful.
Please check ‚/opt/oracle/oraInventory/logs/cloneActions2015-10-22_01-14-55PM.log‘ for more details.

Pod ROOTem

[root@ORACLE ~]# /opt/oracle/app/12101/root.sh
Check /opt/oracle/app/12101/install/root_ORACLE_2015-10-22_13-17-38.log for the output of root script

[root@ORACLE ~]# cat /opt/oracle/app/12101/install/root_ORACLE_2015-10-22_13-17-38.log
Performing root user operation for Oracle 12c

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME=  /opt/oracle/app/12101
Copying dbhome to /usr/local/bin …
Copying oraenv to /usr/local/bin …
Copying coraenv to /usr/local/bin …

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.

Úprava /etc/oratab

Já nedělal, protože se jednao o prázdný OH s posledním PSU patchem. Zatím bez databáze.

Kontrola Oracle_home

[oracle@ORACLE app]$ export ORACLE_HOME=/opt/oracle/app/12101
[oracle@ORACLE app]$ $ORACLE_HOME/OPatch/opatch lsinv -all
Oracle Interim Patch Installer version 12.1.0.1.9
Copyright (c) 2015, Oracle Corporation.  All rights reserved.

Oracle Home       : /opt/oracle/app/12101
Central Inventory : /opt/oracle/oraInventory
from           : /opt/oracle/app/12101/oraInst.loc
OPatch version    : 12.1.0.1.9
OUI version       : 12.1.0.1.0
Log file location : /opt/oracle/app/12101/cfgtoollogs/opatch/opatch2015-10-22_13-20-27odp._1.log

Lsinventory Output file location : /opt/oracle/app/12101/cfgtoollogs/opatch/lsinv/lsinventory2015-10-22_13-20-27odp..txt

——————————————————————————–
Local Machine Information::
Hostname: ORACLE
ARU platform id: 226
ARU platform description:: Linux x86-64

List of Oracle Homes:
Name          Location
OraDb11g_home1         /opt/oracle/app/11g
OraDB12Home2         /opt/oracle/app/12102
OraHome1         /opt/oracle/app/12101   <– zaregistrován nový, správný

Installed Top-level Products (1):

Oracle Database 12c                                                  12.1.0.1.0
There are 1 products installed in this Oracle Home.

Interim patches (1) :

Patch  21352619     : applied on Thu Oct 22 12:56:08 CEST 2015
Unique Patch ID:  19194200
Patch description:  „Database Patch Set Update : 12.1.0.1.9 (21352619)“
Created on 3 Aug 2015, 01:34:38 hrs PST8PDT
Sub-patch  20831107; „Database Patch Set Update : 12.1.0.1.8 (20831107)“
Sub-patch  20299016; „Database Patch Set Update : 12.1.0.1.7 (20299016)“
Sub-patch  19769486; „Database Patch Set Update : 12.1.0.1.6 (19769486)“

Odstranění starého Oracle_home

[oracle@ORACLE app]$ $ORACLE_HOME/oui/bin/runInstaller \
> -silent \
> -detachHome \
> ORACLE_HOME=/opt/oracle/app/12102 \
> -waitForCompletion
Starting Oracle Universal Installer…

Checking swap space: must be greater than 500 MB.   Actual 21288 MB    Passed
The inventory pointer is located at /etc/oraInst.loc
‚DetachHome‘ was successful.
[oracle@ORACLE app]$ $ORACLE_HOME/OPatch/opatch lsinv -all
Oracle Interim Patch Installer version 12.1.0.1.9
Copyright (c) 2015, Oracle Corporation.  All rights reserved.

Oracle Home       : /opt/oracle/app/12101
Central Inventory : /opt/oracle/oraInventory
from           : /opt/oracle/app/12101/oraInst.loc
OPatch version    : 12.1.0.1.9
OUI version       : 12.1.0.1.0
Log file location : /opt/oracle/app/12101/cfgtoollogs/opatch/opatch2015-10-22_13-23-09odp._1.log

Lsinventory Output file location : /opt/oracle/app/12101/cfgtoollogs/opatch/lsinv/lsinventory2015-10-22_13-23-09odp..txt

——————————————————————————–
Local Machine Information::
Hostname: ORACLE
ARU platform id: 226
ARU platform description:: Linux x86-64

List of Oracle Homes:
Name          Location
OraDb11g_home1         /opt/oracle/app/11g   <– na serveru běží ještě stará databáze, kterou budu upgredovat
OraHome1         /opt/oracle/app/12101     <– správný nový

Installed Top-level Products (1):

Oracle Database 12c                                                  12.1.0.1.0
There are 1 products installed in this Oracle Home.



Komentáře