Commonly use oracle queries and commands

To View all databases 

SQL> SELECT NAME FROM v$database

Shutdown database
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
Start the instance
SQL> startup;
ORACLE instance started.

Total System Global Area 4966053832 bytes
Fixed Size                  8906696 bytes
Variable Size             922746880 bytes
Database Buffers         4026531840 bytes
Redo Buffers                7868416 bytes
Database mounted
Open the database
SQL> alter database open;
SQL> select instance_name, status from v$instance;
INSTANCE_NAME    STATUS
---------------- ------------
orcl MOUNTED

SQL> alter database open;
Database altered.

SQL> select instance_name, status from v$instance;
INSTANCE_NAME    STATUS
---------------- ------------
orcl            OPEN


Comments

Popular posts from this blog

Getting Started with MariaDB

PowerShell to find HyperLink Text in PowerPoint

Drop Database in Oracle