How to list all Database names in Oracle

List all DB names along with basic details: SQL> select DBID, NAME, OPEN_MODE from v$database;       DBID NAME      OPEN_MODE ———- ——— ———- 2337018765 PRODDB01      READ WRITE SQL>   List all DB names along with all details: SQL> select * from v$database;       DBID NAME      CREATED   RESETLOGS_CHANGE# RESETLOGS ———- ——— ——— —————– ——— PRIOR_RESETLOGS_CHANGE# PRIOR_RES LOG_MODE     CHECKPOINT_CHANGE# ———————– ——— ———— —————— ARCHIVE_CHANGE# CONTROL CONTROLFI CONTROLFILE_SEQUENCE# CONTROLFILE_CHANGE# ————— ——- ——— ——————— ——————- CONTROLFI OPEN_RESETL VERSION_T OPEN_MODE ——— ———– ——— ———- 2337018765 PRODDB01      11-AUG-06                 1 11-AUG-06                       0           NOARCHIVELOG            5362658         5321718 CURRENT 11-AUG-06                 33359             5362658 11-APR-14 NOT ALLOWED 11-AUG-06 READ WRITE SQL> […]

Read more

Detaching existing/running Database and Attaching different database in active Oracle instance

Existing Instance and Database status: Environment Variables: [root@dev ~]# env | grep ORA ORACLE_OEM_JAVARUNTIME=/opt/java/jre ORACLE_OWNER=oracle ORACLE_SID=ins02 ORACLE_BASE=/opt/oracle ORACLE_TERM=xterm ORACLE_HOME=/opt/oracle/product/8.1.6 [root@dev ~]#   Oracle Initialization Files: [root@dev /]#  ls -l $ORACLE_HOME/dbs total 32 lrwxrwxrwx 1 oracle dba   40 Dec  5  2008 configins02.ora -> /opt/dbfiles/admin/ins02/pfile/configins02.ora -rw-r–r– 1 oracle dba 9219 Oct 22  1999 initdw.ora -rw-r–r– 1 oracle dba 8385 Oct 22  1999 init.ora lrwxrwxrwx 1 oracle dba   38 Dec  5  2008 initins02.ora -> /opt/dbfiles/admin/ins02/pfile/initins02.ora -rw-rw—- 1 oracle dba   24 Apr  9 14:32 lkins02 -rwSr—– 1 oracle dba 2560 Dec  5  2008 orapwins02 [root@dev /]#   Instance Name and Status: SQL> select instance_name, […]

Read more