Common SQL commands on Oracle DB

select instance_name, con_id, version from v$instance;
select name, con_id, db_unique_name from v$database;
select dbid, con_id, name from v$pdbs;
alter session set container = CDB$ROOT; //You cannot run this command on ATP/ADW shared on Exadata (ADB is a pluggable database)
show parameter db_name;

Author: Labanish

I am a Principal Account Cloud Engineer at Oracle. Am interested in Cloud Automation, Cloud Native Applications dev and Emerging Tech. I have over 6 years work experience handling different tech roles in East Africa, Romania & now in United Kingdom. All views are mine.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: