重建Oracle Inventory

重建Oracle Inventory

𝓓𝓸𝓷 Lv6

由于对系统文件的暴力删除,导致Oracle Inventory缺失,需要重新创建Oracle Central Inventory
参照文档: Steps To Recreate Central Inventory(oraInventory) In RDBMS Homes ( Doc ID 556834.1 )。

img – Search – Note: This is INTERNAL ONLY research. No action should be taken by the customer on this information. This is research only, and may NOT be applicable to your specific situation. Searched on:orainventory Steps To Recreate Central Inventory(oraInventory) In RDBMS Homes ( Doc ID 556834.1 )
一、现象
1
2
3
4
5
6
7
8
9
10
11
[root@centos6 ~]# ll /etc/oraInst.loc
ls: cannot access /etc/oraInst.loc: No such file or directory

[root@centos6 ~]# more /opt/oracle/product/11.2.0/db_1/oraInst.loc
inventory_loc=/opt/oraInventory
inst_group=oinstall

[oracle@centos6 db_1]$ ll /opt/oraInventory
ls: cannot access /opt/oraInventory: No such file or directory

oraInventory目录不存在
二、创建oraInventory
1.创建oraInst.loc
1
2
3
4
5
cat > /etc/oraInst.loc <<EOF
inventory_loc=/opt/oraInventory
inst_group=oinstall

EOF
2.授权oraInst.loc
1
2
3
4
5
6
7
8

[root@centos6 ~]# ll /etc/oraInst.loc
-rw-r--r-- 1 root root 53 Dec 15 15:55 /etc/oraInst.loc

[root@centos6 ~]# chmod 755 /etc/oraInst.loc

[root@centos6 ~]# ll /etc/oraInst.loc
-rwxr-xr-x 1 root root 53 Dec 15 15:55 /etc/oraInst.loc
3.创建oraInventory
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[root@centos6 ~]# su - oracle
[oracle@centos6 bin]$ echo $ORACLE_HOME
/opt/oracle/product/11.2.0/db_1

[root@centos6 ~]# mkdir /opt/oraInventory
[root@centos6 ~]# chown oracle.oinstall /opt/oraInventory

[oracle@centos6 ~]$ cd $ORACLE_HOME/oui/bin

[oracle@centos6 bin]$ ./runInstaller -silent -ignoreSysPrereqs -attachHome ORACLE_HOME="/opt/oracle/product/11.2.0/db_1" ORACLE_HOME_NAME="OraDb11g_home1"
Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB. Actual 15999 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2023-12-15_04-05-34PM. Please wait ...[oracle@centos6 bin]$ The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /opt/oraInventory
'AttachHome' was successful.

  • Title: 重建Oracle Inventory
  • Author: 𝓓𝓸𝓷
  • Created at : 2024-07-12 10:30:26
  • Updated at : 2024-07-20 05:15:41
  • Link: https://www.zhangdong.me/recreate-oraInventory.html
  • License: This work is licensed under CC BY-NC-SA 4.0.
评论