Xoá Oralce database với deinstall script (Deinstall Oracle database) Oracle Database 19c

Hướng dẫn Xoá Database Oracle với Deinstall script.

Vào thư mục Home:

cd $ORACLE_HOME

cd deinstall

pwd

/u01/app/oracle/product/19.3.0/dbhome_1/deinstall

./deinstall

[oracle@srv1 ~]$ cd $ORACLE_HOME

[oracle@srv1 dbhome_1]$ cd deinstall

[oracle@srv1 deinstall]$ pwd

/u01/app/oracle/product/19.3.0/dbhome_1/deinstall

[oracle@srv1 deinstall]$ ./deinstall

Checking for required files and bootstrapping …

Please wait …

Location of logs /tmp/deinstall2024-05-11_03-53-35PM/logs/

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

######################### DECONFIG CHECK OPERATION START #########################

## [START] Install check configuration ##

Checking for existence of the Oracle home location /u01/app/oracle/product/19.3.0/dbhome_1

Oracle Home type selected for deinstall is: Oracle Single Instance Database

Oracle Base selected for deinstall is: /u01/app/oracle

Checking for existence of central inventory location /u01/app/oraInventory

## [END] Install check configuration ##

Network Configuration check config START

Network de-configuration trace file location: /tmp/deinstall2024-05-11_03-53-35PM/logs/netdc_check2024-05-11_03-53-52PM.log

Network Configuration check config END

Database Check Configuration START

Database de-configuration trace file location: /tmp/deinstall2024-05-11_03-53-35PM/logs/databasedc_check2024-05-11_03-53-52PM.log

Use comma as separator when specifying list of values as input

Specify the list of database names that are configured in this Oracle home [duodb,datalinks,duong]: duong

At least one database from the discovered database list ‘duodb,datalinks,duong’ is missing in the specified database list ‘duong’. The oracle home will be cleaned up so all databases will not be available after deinstall. If you want to remove a specific database, please use dbca instead. Do you want to continue? [n]:

Use comma as separator when specifying list of values as input

Specify the list of database names that are configured in this Oracle home [duodb,datalinks,duong]: duong

At least one database from the discovered database list ‘duodb,datalinks,duong’ is missing in the specified database list ‘duong’. The oracle home will be cleaned up so all databases will not be available after deinstall. If you want to remove a specific database, please use dbca instead. Do you want to continue? [n]: y

###### For Database ‘duong’ ######

Single Instance Database

The diagnostic destination location of the database: /u01/app/oracle/diag/rdbms/duong

Storage type used by the Database: FS

Database file location: /u01/app/oracle/oradata/DUONG,/u01/app/oracle/fast_recovery_area/DUONG

Fast recovery area location: /u01/app/oracle/fast_recovery_area/DUONG

Archive Log mode is Enabled, archive logs will be removed.

database spfile location: /u01/app/oracle/product/19.3.0/dbhome_1/dbs/spfileduong.ora

The details of database(s) duong have been discovered automatically. Do you still want to modify the details of duong database(s)? [n]:

Database Check Configuration END

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

####################### DECONFIG CHECK OPERATION SUMMARY #######################

Oracle Home selected for deinstall is: /u01/app/oracle/product/19.3.0/dbhome_1

Inventory Location where the Oracle home registered is: /u01/app/oraInventory

The following databases were selected for de-configuration. The databases will be deleted and will not be useful upon de-configuration : duong

Database unique name : duong

Storage used : FS

Do you want to continue (y – yes, n – no)? [n]: y

A log of this session will be written to: ‘/tmp/deinstall2024-05-11_03-53-35PM/logs/deinstall_deconfig2024-05-11_03-53-50-PM.out’

Any error messages from this session will be written to: ‘/tmp/deinstall2024-05-11_03-53-35PM/logs/deinstall_deconfig2024-05-11_03-53-50-PM.err’

######################## DECONFIG CLEAN OPERATION START ########################

Database de-configuration trace file location: /tmp/deinstall2024-05-11_03-53-35PM/logs/databasedc_clean2024-05-11_03-53-52PM.log

Database Clean Configuration START duong

This operation may take few minutes.

Database Clean Configuration END duong

Network Configuration clean config START

Network de-configuration trace file location: /tmp/deinstall2024-05-11_03-53-35PM/logs/netdc_clean2024-05-11_03-53-52PM.log

De-configuring backup files…

Backup files de-configured successfully.

The network configuration has been cleaned up successfully.

Network Configuration clean config END

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

####################### DECONFIG CLEAN OPERATION SUMMARY #######################

Successfully de-configured the following database instances : duong

#######################################################################

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

Using properties file /tmp/deinstall2024-05-11_03-53-35PM/response/deinstall_2024-05-11_03-53-50-PM.rsp

Location of logs /tmp/deinstall2024-05-11_03-53-35PM/logs/

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

####################### DEINSTALL CHECK OPERATION SUMMARY #######################

A log of this session will be written to: ‘/tmp/deinstall2024-05-11_03-53-35PM/logs/deinstall_deconfig2024-05-11_03-53-50-PM.out’

Any error messages from this session will be written to: ‘/tmp/deinstall2024-05-11_03-53-35PM/logs/deinstall_deconfig2024-05-11_03-53-50-PM.err’

######################## DEINSTALL CLEAN OPERATION START ########################

## [START] Preparing for Deinstall ##

Setting LOCAL_NODE to srv1

Setting CRS_HOME to false

Setting oracle.installer.invPtrLoc to /tmp/deinstall2024-05-11_03-53-35PM/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 ‘/u01/app/oracle/product/19.3.0/dbhome_1’ from the central inventory on the local node : Done

Delete directory ‘/u01/app/oracle/product/19.3.0/dbhome_1’ on the local node : Done

Delete directory ‘/u01/app/oraInventory’ on the local node : Done

Failed to delete the directory ‘/u01/app/oracle/diag/rdbms’. Either user has no permission to delete or it is in use.

Failed to delete the directory ‘/u01/app/oracle/diag’. The directory is not empty.

The Oracle Base directory ‘/u01/app/oracle’ will not be removed on local node. The directory is not empty. User needs to manually cleanup this directory.

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 ‘/u01/app/oracle/product/19.3.0/dbhome_1’ from the central inventory on the local node.

Successfully deleted directory ‘/u01/app/oracle/product/19.3.0/dbhome_1’ on the local node.

Successfully deleted directory ‘/u01/app/oraInventory’ on the local node.

Oracle Universal Installer cleanup was successful.

Run ‘rm -r /etc/oraInst.loc’ as root on node(s) ‘srv1’ at the end of the session.

Run ‘rm -r /opt/ORCLfmap’ as root on node(s) ‘srv1’ at the end of the session.

Run ‘rm -r /etc/oratab’ as root on node(s) ‘srv1’ at the end of the session.

Review the permissions and contents of ‘/u01/app/oracle’ on nodes(s) ‘srv1’.

If there are no Oracle home(s) associated with ‘/u01/app/oracle’, manually delete ‘/u01/app/oracle’ and its contents.

Oracle deinstall tool successfully cleaned up temporary directories.

#######################################################################

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

[oracle@srv1 deinstall]$

word image 1549 1

=> Xoá database thành công.

 

Datalinks.vn

Hello các bạn, tôi là Dương Nguyễn (DuoDBA - https://www.youtube.com/@DuoDBA) tác giả của blog này. Mong muốn được chia sẻ kiến thức và kinh nghiệm về cơ sở dữ liệu với những người đam mê và quan tâm đến lĩnh vực này. Tôi có tổ chức các khoá Coaching về #OracleDatabase và luyện thi #OCP thường xuyên, các bạn muốn có người đồng hành thì alo tôi nhé. Call/Zalo: 0765 871 888. Thanks you !.....
0 0 đánh giá
Đánh giá bài viết
Theo dõi
Thông báo của
guest

0 Góp ý
Phản hồi nội tuyến
Xem tất cả bình luận