Manually delete database instances in Linux

Source: Internet
Author: User

 

In Linux, manually delete the database instance and directly Delete the corresponding directory ....

1. $ ORACLE_HOME/dbs/
[Oracle9 @ Frogger DBS] $ pwd
/U01/APP/Oracle/product/9.2.0.1/dbs
[Oracle9 @ Frogger DBS] $ RM inittest02.ora
[Oracle9 @ Frogger DBS] $ RM orapwdtest02

2. $ oracle_base/oradata/Sid
[Oracle9 @ Frogger oradata] $ ls
Default_demo01.dbf default_demo99.dbf devdb02 duke1 test01 test01_bak test02 testdk testqa
[Oracle9 @ Frogger oradata] $ PS-Ef | grep SMON
Oracle9 7162 1 0 2008? 00:04:30 ora_smon_duke
Oracle9 3313 1 0 2008? 00:02:30 ora_smon_testdk
Oracle9 4386 1 0 Apr05? 00:00:07 ora_smon_test01
Oracle9 4620 1 0 Apr05? 00:00:05 ora_smon_dvdsame
Oracle9 12307 4426 0 00:00:00 pts/3 grep SMON
[Oracle9 @ Frogger oradata] $ Rm-RF test02
[Oracle9 @ Frogger oradata] $ DF-H
Filesystem size used avail use % mounted on
/Dev/mapper/VolGroup00-LogVol00
455G 381G 51g 89%/
/Dev/sda1 99 m 15 m 80 m 16%/boot
None 1004 M 0 1004 M 0%/dev/SHM
Nfs-vip.certificatesnow.com:/u07
455G 230g 202G 54%/u07
[Oracle9 @ Frogger oradata] $ ls
Default_demo01.dbf default_demo99.dbf devdb02 duke1 test01 test01_bak testdk testqa

3. Delete log files
[Oracle9 @ Frogger admin] $ ls
Devdb02 duke1 test01 test02 testdk testqa
[Oracle9 @ Frogger admin] $ pwd
/U01/APP/Oracle/admin
[Oracle9 @ Frogger admin] $ CD test02
[Oracle9 @ Frogger test02] $ ls
Bdump cdump create pfile udump
[Oracle9 @ Frogger test02] $ CD ..
[Oracle9 @ Frogger admin] $ ls
Devdb02 duke1 test01 test02 testdk testqa
[Oracle9 @ Frogger admin] $ Rm-RF test02
[Oracle9 @ Frogger admin] $ ls
Devdb02 duke1 test01 testdk testqa
[Oracle9 @ Frogger admin] $

4. If you create an instance using dbca, You need to delete the instance information in the/etc/oratab file, just one line. The deletion is OK.
/Etc/oratab is generated when you run root. Sh. Each row represents an oracle instance and cannot have the same name. If the database already exists, the system prompts whether to upgrade the database.
When installing and creating a database, the system checks whether the file exists and the content in the file. When running dbstart, the system checks the file. If it is Y, it starts, Which is n
It does not matter.
[Oracle9 @ Frogger admin] $ CD/etc
[Oracle9 @ Frogger etc] $ more oratab
#
# This file is used by Oracle utilities. It is created by root. Sh
# And updated by the database configuration assistant when creating
# A database.
# A colon, ':', is used as the field Terminator. A new line terminates
# The entry. Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
# $ Oracle_sid: $ ORACLE_HOME: <n | Y>:
#
# The first and second fields are the system identifier and home
# Directory of the database respectively. The third filed indicates
# To the dbstart utility that the database shocould, "Y", or shocould not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ oracle_sid are not allowed.
#
#
# *:/U01/APP/Oracle/product/9.2.0.1: N
*:/U01/APP/Oracle/product/9.2.0.1: N
Duke:/u01/APP/Oracle/product/9.2.0.1: N
Test02:/u01/APP/Oracle/product/9.2.0.1: N
[Oracle9 @ Frogger etc] $

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.