Oracle DBA Intro CheatSheet

Oracle DBA Intro CheatSheet

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. ??

  1. Connecting to Oracle Database:


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:


CREATE USER <username> IDENTIFIED BY <password>;         

  • Grant Privileges:


GRANT <privilege> TO <username>;         

  • Revoke Privileges:


REVOKE <privilege> FROM <username>;         

  • Drop User:


DROP USER <username> CASCADE;         


Expect more by subscribing to this post / following / Connecting with me on LinkedIN!

要查看或添加评论,请登录

Anil Mahadev的更多文章

社区洞察

其他会员也浏览了