Wednesday 17 May 2017

Drop Oracle Database

SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL> startup restrict;
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
ORACLE instance started.

Total System Global Area 3557658624 bytes
Fixed Size                  2251448 bytes
Variable Size            1795163464 bytes
Database Buffers         1744830464 bytes
Redo Buffers               15413248 bytes
Database mounted.
Database opened.
SQL>
SQL>
SQL> select name, open_mode, database_role from v$database;

NAME      OPEN_MODE            DATABASE_ROLE
--------- -------------------- ----------------
QAS       READ WRITE           PRIMARY

SQL> drop database;
drop database
*
ERROR at line 1:
ORA-01586: database must be mounted EXCLUSIVE and not open for this operation


SQL> shut immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> start mount restrict
SP2-0310: unable to open file "mount.sql"
SQL>
SQL>
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
eccqas:oraqas 111>
eccqas:oraqas 111>
eccqas:oraqas 111>
eccqas:oraqas 111> sqlplus "/as sysdba"

SQL*Plus: Release 11.2.0.4.0 Production on Wed May 17 15:02:03 2017

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup mount restrict
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
ORACLE instance started.

Total System Global Area 3557658624 bytes
Fixed Size                  2251448 bytes
Variable Size            1795163464 bytes
Database Buffers         1744830464 bytes
Redo Buffers               15413248 bytes
Database mounted.
SQL>  select name, open_mode, database_role from v$database;

NAME      OPEN_MODE            DATABASE_ROLE
--------- -------------------- ----------------
QAS       MOUNTED              PRIMARY

SQL> drop database;

Database dropped.

How to put newly created Oracle database in archivelog mode?

SQL> ARCHIVE LOG LIST SQL> alter system set log_archive_dest_1='LOCATION=/oracle/archive/ORADB' scope=both; SQL> ALTER SYST...