I want to write a select statement to display the index_name, table_name, table_owner and uniqueness that exist in the data dictionary for the table user indexes. Any help would be great. My problem is I havent been able to find how to display an index_name, and table owner.
SELECT owner, table_name FROM dba_tables;
This gives most of it.
SELECT owner, table_name FROM dba_tables; This gives most of it.
Look for the file named "oratab", usually found in either /etc or /var/opt/oracle. In there you will find for each database the name of the home directory for that database. The owner of that directory should be the owner of the installation and of all databases running from the home.
According to the docs, you can just do:
select INDEX_NAME, TABLE_OWNER, TABLE_NAME, UNIQUENESS from USER_INDEXES
or
select INDEX_NAME, TABLE_OWNER, TABLE_NAME, UNIQUENESS from ALL_INDEXES
if you want all indexes...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With