Home  >  Article  >  Database  >  How to query the creation date of table space in oracle database

How to query the creation date of table space in oracle database

下次还敢
下次还敢Original
2024-04-18 20:33:12627browse

To query the creation date of a table space in an Oracle database, you can use the DBA_TABLESPACES view to obtain the table space name and creation date by querying the TABLESPACE_NAME and CREATED columns.

How to query the creation date of table space in oracle database

Query the creation date of table space in Oracle database

To query the creation date of table space in Oracle database, you can Use the following method:

DBA_TABLESPACES view

<code class="sql">SELECT
  TABLESPACE_NAME,   -- 表空间名称
  CREATED           -- 创建日期
FROM
  DBA_TABLESPACES;</code>

Example output:

<code class="text">TABLESPACE_NAME  CREATED
------------------ ---------------------
SYSTEM           2022-02-21 03:44:22
USERS            2022-02-21 03:44:35</code>

Note:

  • DBA_TABLESPACES The view can only be queried by the DBA or a user with appropriate permissions.
  • CREATED Columns are displayed as dates and timestamps in the database time zone.

The above is the detailed content of How to query the creation date of table space in oracle database. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn