Let say you are a DBA, and you wanted to check that how many tables were created by HR Schema or User. You can check this by following two ways.
1- You can connect with HR Schema by providing HR User and password in our case
Conn HR/HR OR Conn HR/HR@listener
b. Then query the TAB table using following statement.Although you can only extracts your own tables by using given sql query. If you want to get any table from any schema of oracle database then you can go to example number 2.
Select * from tab;
2- You can connect to “Sys” user using Sysdba privileges.
Conn sys/password as sysdba, Or Conn sys/password@listener as sysdba
b. Then you can run following query
Select * from dba_tables where owner='HR';
Using above mentioned method, you can list down the tables of HR Schema. You can use this query to extract any schema and their tables.
Examples:
—LIST TABLES OF HR USER/SCHEMA
SELECT * FROM DBA_TABLES X WHERE X.OWNER='SH'; SELECT * FROM DBA_TABLES X WHERE X.OWNER='SCOTT';
What is the Main Cause of a Heart Attack? What is its Solution? A heart attack is the blockage of… Read More
In the vast economic arena, one term that often takes center stage, inciting extensive debates and discussions, is the "debt… Read More
De-Dollarization: The Changing Face of Global Finance The financial landscape is in a state of flux, with an intriguing economic… Read More
The curtains closed on a dramatic Bundesliga season with Bayern Munich standing tall once again, clinching their 11th straight title.… Read More
The Unfolding Story of Celine Dion's Health In recent news that has left fans across the globe stunned, iconic singer… Read More
As the echoes of the recent NBA season start to fade, the attention of enthusiasts is firmly glued to one… Read More
View Comments
Can you share the same thing for SQL as well?
Sure, Sooner I will create an article on how to list down all the databases in Microsoft Sql Server Using SQL DMV. In SQL this is pretty simple, Since all you have to do is to use SSMS best GUI so far for Microsoft. But anyways will share this later.
@Rameez I am surprised that a category for Oracle has been created while there could be other programmes too. Any reason why?