How to get a list of all tables in Oracle database?

Three ways to get a list of all tables in Oracle Database with code examples
10 August 2017   1448

We have made a research and found out how to display the names of all tables in Oracle Database. There are 3 ways to do it.

1. If you have access to the DBA_TABLES data dictionary view.

SELECT owner, table_name
  FROM dba_tables

If you do not have those privileges but need them, you can request that the DBA explicitly grants you privileges on that table or that the DBA grants you the SELECT ANY DICTIONARY privilege or the SELECT_CATALOG_ROLE role (either of which would allow you to query any data dictionary table). Of course, you may want to exclude certain schemas like SYS and SYSTEM which have large numbers of Oracle tables that you probably don't care about.

2. Alternatively, if you do not have access to DBA_TABLES, you can see all the tables that your account has access to through the ALL_TABLES view

SELECT owner, table_name
  FROM all_tables

Although that may be a subset of the tables available in the database (ALL_TABLES shows you the information for all the tables that your user has been granted access to).

3. If you are only concerned with the tables that you own, not those that you have access to, you could use USER_TABLES

SELECT table_name FROM user_tables

Since USER_TABLES only has information about the tables that you own, it does not have an OWNER column-- the owner, by definition, is you.

Oracle also has a number of legacy data dictionary views-- TABDICTTABS, and CAT for example-- that could be used. In general, I would not suggest using these legacy views unless you absolutely need to backport your scripts to Oracle 6. Oracle has not changed these views in a long time so they often have problems with newer types of objects. For example, the TAB and CAT views both show information about tables that are in the user's recycle bin while the [DBA|ALL|USER]_TABLES views all filter those out. CAT also shows information about materialized view logs with a TABLE_TYPE of "TABLE" which is unlikely to be what you really want. DICT combines tables and synonyms and doesn't tell you who owns the object.

Hackers made $226K in Monero breaking into Oracle WebLogic

The attacks started in December of 2017 as a group hackers installed Monero miners on Oracle WebLogic Servers, which led to hackers' profit of a quarter million dollars
12 January 2018   813

Oracle WebLogic Server is a Java EE application server currently developed by Oracle Corporation. The experts at the SANS Technology Institute and Morphus Labs reported that a group of hackers was attacking Oracle weblogic Servers from December 2017, using the exploit code for the CVE-2017-10271 vulnerability in Oracle WebLogic servers, patched by Oracle in October 2017 and leaked to the web.

The hackers reportedly chose that vulnerability as it was not difficult to use it through Internet to put the malicious code on the Weblogic server, and the exploit included IP scanner that searched for vulnerable hosts, which eventually let hackers make $226.000 worth 611 Monero coins installing a cryptocurrency miner.

The attackers had access to all the information in PeopleSoft that is touching WebLogic servers, but rather than sell this information on the black market, which takes more work than writing a simple script to exploit the system and drop crypto mining software on it, they probably thought they could get more money by crypto mining.
 

Johannes Ullrich

Dean of research, SANS Technology Institute

Despite the fact that hackers were able to steal significant corporate data or install ransomware, they only installed a cryptocurrency miner to mine Monero hoping that high CPU use of the server stayes unnoticed.

At the moment of press, these are main market parameters of Monero:

  • Average price: $370,66
  • Marketcap: $5 779 654 391
  • 24h volume: $150 136 000