How to check the table space in an Oracle database?

To query Oracle database tablespaces, you can use one of the following methods:

  1. Utilize the SQL*Plus command line interface:
  2. Open the SQL*Plus command line interface.
  3. Use the following command to connect to your Oracle database: sqlplus username/password@database_instance.
  4. Run the following query to get information about the tablespace: SELECT tablespace_name, file_name, bytes/1024/1024 AS size_mb FROM dba_data_files;
  5. To retrieve information on tablespace usage, run the following query: SELECT tablespace_name, SUM(bytes)/1024/1024 AS used_mb, SUM(maxbytes)/1024/1024 AS max_mb FROM dba_data_files GROUP BY tablespace_name;
  6. Use Oracle SQL development tools such as SQL Developer.
  7. Open the Oracle SQL development tool.
  8. Connect to your Oracle database.
  9. Expand the “Tablespaces” option in the object browser.
  10. Right-click on the tablespace and select “Properties” or “View Tablespace” to obtain information about the tablespace.

Whichever method you choose, you will be able to access table space information for Oracle databases.

bannerAds