Shutdown, StartUp, Drop Database and De-Install Oracle Database Software.

Scope and Application:

1. How to shutdown Database.
2. How to startup Database.
3. How to Drop a Database.
4. How to De-Install Oracle Database Software.

Applies to:
Oracle Server - Enterprise Edition - Version: 10.1.0.1 to 11.2.0.2 - Release: 10.1 to 11.2
Information in this document applies to UNIX platform.

How to shutdown Database:


1. Connect to you system using putty using Oracle user and export instance_name for the database.

[oracle@test]$ export ORACLE_SID={Instance Name}

2. Log in to the database using sys user


[oracle@test]$ sqlplus sys as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Mon May 16 14:35:56 2011


Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.


Enter password:


Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>

3.  When log in will complete SQL prompt will appear execute following command.


SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

How to startup Database:  To startup database use 1 & 2 step as in "How to shutdown Database". Next step is as follows.

3.  When log in will complete SQL prompt will appear execute following command.


SQL> startup

Database open.

How to Drop a Database: To drop a database three steps are required.
  • Shutdown database.
  • mount database.
  • drop database.
1. To shutdown the database follow above commands "How to shutdown Database".

2. To mount the database in restrict mode use command 

SQL> startup mount restrict

ORACLE instance started.



Total System Global Area  536870912 bytes

Fixed Size                  1268484 bytes

Variable Size             150996220 bytes

Database Buffers          377487360 bytes

Redo Buffers                7118848 bytes

Database mounted.

SQL>

3. To drop database use 
SQL> drop database;

How to De-Install Oracle Database Software: 

In Oracle De-Installation there are two flavors.  
  • Drop all databases and remove Oracle s/w.
  • Only remove Oracle s/w.
Here we will discuss "Drop all databases and remove Oracle s/w"

1. Log in to system using oracle user and go to $ORACLE_HOME/deinstall folder.

[oracle@test ~]$ cd $ORACLE_HOME/deinstall 

[oracle@localhost deinstall]$ ls

deinstall  deinstall.xml  jlib  response  sshUserSetup.sh

2. Execute deinstall:

[oracle@localhost deinstall]$ ./deinstall
Checking for required files and bootstrapping ...

Please wait ...

Location of logs /tmp/deinstall2011-05-16_01-33-52-PM/logs/



############ ORACLE DEINSTALL & DECONFIG TOOL START ############




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

Install check configuration START



Checking for existence of the Oracle home location /u01/app/oracle/product/11.2.

0/dbhome_1

Oracle Home type selected for de-install is: SIDB

Oracle Base selected for de-install is: /u01/app/oracle

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



Install check configuration END




Network Configuration check config START



Network de-configuration trace file location: /tmp/deinstall2011-05-16_01-33-52-

PM/logs/netdc_check7153767413263148709.log

3. Provide Listener Details: After checking operation will ask for name of the listeners.

Specify all Single Instance listeners that are to be de-configured [LISTENER]:LISTENER 

Network Configuration check config END



Database Check Configuration START



Database de-configuration trace file location: /tmp/deinstall2011-05-16_01-33-52-PM/logs/databasedc_check5093411164357804743.log


4.  Database Names to Drop: Here prompt will ask for name of the databases need to drop before Oracle s/w De-install. More than one database name can be given by comma separator.


Use comma as separator when specifying list of values as input



Specify the list of database names that are configured in this Oracle home []: test01

###### For Database 'test01' ######



Single Instance Database

The diagnostic destination location of the database: /u01/app/oracle/product/11.2.0/dbhome_1/log/diag/rdbms/test01

Storage type used by the Database: FS

Database file location: /u01/app/oracle/test01/dbs

Flash recovery area location: /u01/app/oracle/test01/flash_recovery_area/TEST01

database spfile location: /u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfiletest01.ora

5. Crosscheck Details collected: crosscheck the details collected by De-Install process and input accordingly.

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

6. Final collection detail: Here you will see a summary of details collected and prompt for continue or not.

Database Check Configuration END



Enterprise Manager Configuration Assistant START



EMCA de-configuration trace file location: /tmp/deinstall2011-05-16_01-33-52-PM/logs/emcadc_check.log



Checking configuration for database test01

Enterprise Manager Configuration Assistant END

Oracle Configuration Manager check START

OCM check log file location : /tmp/deinstall2011-05-16_01-33-52-PM/logs//ocm_check3390.log

Oracle Configuration Manager check END



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




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

Oracle Home selected for de-install is: /u01/app/oracle/product/11.2.0/dbhome_1

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

Following Single Instance listener(s) will be de-configured: LISTENER

The following databases were selected for de-configuration : test01

Database unique name : test01

Storage used : FS

No Enterprise Manager configuration to be updated for any database(s)

No Enterprise Manager ASM targets to update

No Enterprise Manager listener targets to migrate

Checking the config status for CCR

Oracle Home exists with CCR directory, but CCR is not configured

CCR check is finished

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

7. Oracle database and s/w clean up start:

A log of this session will be written to: '/tmp/deinstall2011-05-16_01-33-52-PM/logs/deinstall_deconfig2011-05-16_01-34-26-PM.out'

Any error messages from this session will be written to: '/tmp/deinstall2011-05-16_01-33-52-PM/logs/deinstall_deconfig2011-05-16_01-34-26-PM.err'



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



Enterprise Manager Configuration Assistant START



EMCA de-configuration trace file location: /tmp/deinstall2011-05-16_01-33-52-PM/logs/emcadc_clean.log



Updating Enterprise Manager ASM targets (if any)

Updating Enterprise Manager listener targets (if any)

Enterprise Manager Configuration Assistant END

Database de-configuration trace file location: /tmp/deinstall2011-05-16_01-33-52-PM/logs/databasedc_clean5097176502073540370.log

Database Clean Configuration START test01

This operation may take few minutes.



Database Clean Configuration END test01



Network Configuration clean config START



Network de-configuration trace file location: /tmp/deinstall2011-05-16_01-33-52-PM/logs/netdc_clean1871208686025496201.log



De-configuring Single Instance listener(s): LISTENER



De-configuring listener: LISTENER

    Stopping listener: LISTENER

    Listener stopped successfully.

    Deleting listener: LISTENER

    Listener deleted successfully.

Listener de-configured successfully.



De-configuring Listener configuration file...

Listener configuration file 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 : /tmp/deinstall2011-05-16_01-33-52-PM/logs//ocm_clean3390.log

Oracle Configuration Manager clean END

Oracle Universal Installer clean START



Detach Oracle home '/u01/app/oracle/product/11.2.0/dbhome_1' from the central inventory on the local node : Done



Delete directory '/u01/app/oracle/product/11.2.0/dbhome_1' on the local node : Done



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



The Oracle Base directory '/u01/app/oracle' will not be removed on local node. The directory is not empty.



Oracle Universal Installer cleanup was successful.



Oracle Universal Installer clean END




Oracle install clean START



Clean install operation removing temporary directory '/tmp/install' on node test'



Oracle install clean END




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




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

Successfully de-configured the following database instances : test01

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

Successfully detached Oracle home '/u01/app/oracle/product/11.2.0/dbhome_1' from the central inventory on the local node.

Successfully deleted directory '/u01/app/oracle/product/11.2.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 -rf /etc/oraInst.loc' as root on node(s) 'test' at the end of the session.



Oracle install successfully cleaned up the temporary directories.

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




############# ORACLE DEINSTALL & DECONFIG TOOL END #############

Here you have a clean system with no database and no Oracle S/W. 

No comments:

Post a Comment