Oracle DBA Intro CheatSheet
Anil Mahadev
Oracle ACE PRO ? | Principal Cloud Architect (MS Azure and OCI) @ IDERA Software | Innovating Database & Multi-Cloud Solutions | Expert in OCI & Data-Driven Strategies | Bridging Technology with Business Impact
Hello #LinkedIn community!
I wanted to share this quick cheat sheet for basic Oracle DBA commands that can be helpful for both newcomers and experienced professionals.
Keep these commands at your fingertips to simplify your daily database administration tasks. ??
sqlplus <username>/<password>@<db_name>
Checking Oracle Database Status:
SELECT status FROM v$instance;
Viewing Tablespace Usage:
SELECT tablespace_name, round(sum(bytes)/1024/1024/1024,2) as "Size (GB)" FROM dba_data_files GROUP BY tablespace_name;
Viewing Database Locks:
SELECT l.session_id, s.serial#, l.lock_type, l.mode_held, l.mode_requested, l.lock_id1, l.lock_id2 FROM dba_locks l, v$session s WHERE l.session_id = s.sid;
Managing User Accounts:
CREATE USER <username> IDENTIFIED BY <password>;
GRANT <privilege> TO <username>;
REVOKE <privilege> FROM <username>;
DROP USER <username> CASCADE;
Expect more by subscribing to this post / following / Connecting with me on LinkedIN!