0%

卸载Oracle Database 12c

与繁琐复杂的安装过程正相反,Oracle Database 12c的卸载过程非常简单,只需要执行一个shell脚本,就可以完成卸载过程。

1
2
3
4
5
6
7
# 首先以oracle用户登陆到服务器上

# 进入卸载脚本所在目录
$ cd $ORACLE_HOME/deinstall

# 执行卸载脚本
$ ./deinstall

接下来按照脚本提示进行卸载过程

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
Checking for required files and bootstrapping ...
Please wait ...
Location of logs /opt/oracle/app/oraInventory/logs/

############ ORACLE DECONFIG TOOL START ############


######################### DECONFIG CHECK OPERATION START #########################
## [START] Install check configuration ##


Checking for existence of the Oracle home location /opt/oracle/app/oracle/product/12.2.0_2/dbhome_1
Oracle Home type selected for deinstall is: Oracle Single Instance Database
Oracle Base selected for deinstall is: /opt/oracle/app/oracle
Checking for existence of central inventory location /opt/oracle/app/oraInventory

## [END] Install check configuration ##


Network Configuration check config START

Network de-configuration trace file location: /opt/oracle/app/oraInventory/logs/netdc_check2018-08-22_04-12-12-PM.log

# 输入要卸载的监听器名
Specify all Single Instance listeners that are to be de-configured. Enter .(dot) to deselect all. [LISTENER]: <回车>

Network Configuration check config END

Database Check Configuration START

Database de-configuration trace file location: /opt/oracle/app/oraInventory/logs/databasedc_check2018-08-22_04-16-17-PM.log

Use comma as separator when specifying list of values as input

# 输入在当前Oracle home下配置的数据库名
Specify the list of database names that are configured in this Oracle home [orcldb]: <回车>

###### For Database 'orcldb' ######

# 自动检测到的这个数据库的信息
Single Instance Database
The diagnostic destination location of the database: /opt/oracle/app/oracle/diag/rdbms/orcldb
Storage type used by the Database: FS
Database file location: /opt/oracle/app/oracle/oradata/orcldb
Fast recovery area location: Does not exist
database spfile location: /opt/oracle/app/oracle/product/12.2.0_2/dbhome_1/dbs/spfileorcldb.ora

# 询问是否要修改以上信息
The details of database(s) orcldb have been discovered automatically. Do you still want to modify the details of orcldb database(s)? [n]:

Database Check Configuration END
Oracle Configuration Manager check START
OCM check log file location : /opt/oracle/app/oraInventory/logs//ocm_check2396.log
Oracle Configuration Manager check END

######################### DECONFIG CHECK OPERATION END #########################


####################### DECONFIG CHECK OPERATION SUMMARY #######################
Oracle Home selected for deinstall is: /opt/oracle/app/oracle/product/12.2.0_2/dbhome_1
Inventory Location where the Oracle home registered is: /opt/oracle/app/oraInventory
Following Single Instance listener(s) will be de-configured: LISTENER
The following databases were selected for de-configuration : orcldb
Database unique name : orcldb
Storage used : FS
Checking the config status for CCR
Oracle Home exists with CCR directory, but CCR is not configured
CCR check is finished

# 输入"y"继续
Do you want to continue (y - yes, n - no)? [n]: y
A log of this session will be written to: '/opt/oracle/app/oraInventory/logs/deinstall_deconfig2018-08-22_04-12-09-PM.out'
Any error messages from this session will be written to: '/opt/oracle/app/oraInventory/logs/deinstall_deconfig2018-08-22_04-12-09-PM.err'

######################## DECONFIG CLEAN OPERATION START ########################
Database de-configuration trace file location: /opt/oracle/app/oraInventory/logs/databasedc_clean2018-08-22_04-22-04-PM.log
Database Clean Configuration START orcldb
This operation may take few minutes.
Database Clean Configuration END orcldb

Network Configuration clean config START

Network de-configuration trace file location: /opt/oracle/app/oraInventory/logs/netdc_clean2018-08-22_04-26-53-PM.log

De-configuring Single Instance listener(s): LISTENER

De-configuring listener: LISTENER
Stopping listener: LISTENER
Warning: Failed to stop listener. Listener may not be running.
Deleting listener: LISTENER
Listener deleted successfully.
Listener de-configured successfully.

De-configuring Naming Methods configuration file...
Naming Methods configuration file de-configured successfully.

De-configuring Local Net Service Names configuration file...
Local Net Service Names configuration file de-configured successfully.

De-configuring backup files...
Backup files de-configured successfully.

The network configuration has been cleaned up successfully.

Network Configuration clean config END

Oracle Configuration Manager clean START
OCM clean log file location : /opt/oracle/app/oraInventory/logs//ocm_clean2396.log
Oracle Configuration Manager clean END

######################### DECONFIG CLEAN OPERATION END #########################


####################### DECONFIG CLEAN OPERATION SUMMARY #######################
Successfully de-configured the following database instances : orcldb
Following Single Instance listener(s) were de-configured successfully: LISTENER
Cleaning the config for CCR
As CCR is not configured, so skipping the cleaning of CCR configuration
CCR clean is finished
#######################################################################


############# ORACLE DECONFIG TOOL END #############

Using properties file /tmp/deinstall2018-08-22_04-10-49PM/response/deinstall_2018-08-22_04-12-09-PM.rsp
Location of logs /opt/oracle/app/oraInventory/logs/

############ ORACLE DEINSTALL TOOL START ############





####################### DEINSTALL CHECK OPERATION SUMMARY #######################
A log of this session will be written to: '/opt/oracle/app/oraInventory/logs/deinstall_deconfig2018-08-22_04-12-09-PM.out'
Any error messages from this session will be written to: '/opt/oracle/app/oraInventory/logs/deinstall_deconfig2018-08-22_04-12-09-PM.err'

######################## DEINSTALL CLEAN OPERATION START ########################
## [START] Preparing for Deinstall ##
Setting LOCAL_NODE to boris-x200
Setting CRS_HOME to false
Setting oracle.installer.invPtrLoc to /tmp/deinstall2018-08-22_04-10-49PM/oraInst.loc
Setting oracle.installer.local to false

## [END] Preparing for Deinstall ##

Setting the force flag to false
Setting the force flag to cleanup the Oracle Base
Oracle Universal Installer clean START

Detach Oracle home '/opt/oracle/app/oracle/product/12.2.0_2/dbhome_1' from the central inventory on the local node : Done

Delete directory '/opt/oracle/app/oracle/product/12.2.0_2/dbhome_1' on the local node : Done

The Oracle Base directory '/opt/oracle/app/oracle' will not be removed on local node. The directory is in use by Oracle Home '/opt/oracle/app/oracle/product/12.2.0/dbhome_1'.

Oracle Universal Installer cleanup was successful.

Oracle Universal Installer clean END


## [START] Oracle install clean ##


## [END] Oracle install clean ##


######################### DEINSTALL CLEAN OPERATION END #########################


####################### DEINSTALL CLEAN OPERATION SUMMARY #######################
Successfully detached Oracle home '/opt/oracle/app/oracle/product/12.2.0_2/dbhome_1' from the central inventory on the local node.
Successfully deleted directory '/opt/oracle/app/oracle/product/12.2.0_2/dbhome_1' on the local node.
Oracle Universal Installer cleanup was successful.

Review the permissions and contents of '/opt/oracle/app/oracle' on nodes(s) 'boris-x200'.
If there are no Oracle home(s) associated with '/opt/oracle/app/oracle', manually delete '/opt/oracle/app/oracle' and its contents.
Oracle deinstall tool successfully cleaned up temporary directories.
#######################################################################


############# ORACLE DEINSTALL TOOL END #############

最后根据上面DEINSTALL CLEAN OPERATION SUMMARY段的提示,删除相关目录。

至此Oracle Database 12c的卸载过程完成。