SQL语句列出当前所有数据库属性

发布于 2024-12-12 06:33:19 字数 429 浏览 0 评论 0原文

我尝试了几种不同的方法来列出数据库属性,但效果不佳。

SQL> SHOW DATABASE VERBOSE emp;
SP2-0158: unknown SHOW option "DATABASE"
SP2-0158: unknown SHOW option "VERBOSE"
SP2-0158: unknown SHOW option "emp"

这是另一个我不明白为什么它不起作用

 SQL> show database;
 SP2-0158: unknown SHOW option "database"


SQL> DGMGRL
SP2-0042: unknown command "DGMGRL" - rest of line ignored.

有没有人知道我缺少什么的想法。

I have tried a few different ways to list the db properties and have come up short.

SQL> SHOW DATABASE VERBOSE emp;
SP2-0158: unknown SHOW option "DATABASE"
SP2-0158: unknown SHOW option "VERBOSE"
SP2-0158: unknown SHOW option "emp"

Heres another that I dont understand why its not working

 SQL> show database;
 SP2-0158: unknown SHOW option "database"


SQL> DGMGRL
SP2-0042: unknown command "DGMGRL" - rest of line ignored.

Does anyone have ideas as to what I am missing.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

傾旎 2024-12-19 06:33:19

有一个名为 database_properties 的表 - 您应该查询该表,

select property_name, property_value, description from database_properties

如果这不是您要查找的内容,则应该更具体

There's a table called database_properties - you should query that

select property_name, property_value, description from database_properties

If this isn't what you're looking for, you should be more specific

凤舞天涯 2024-12-19 06:33:19

如果您想要数据库的完整版本信息,那么:

SELECT *
  FROM v$version;

如果您想要数据库参数,那么:

SELECT *
  FROM v$parameter;

如果您想要有关数据库实例的更多信息,那么:

SELECT *
  FROM v$database;

如果您想要数据库属性,那么:

SELECT *
  FROM database_properties;

如果您想要数据库的“大小”,那么这将为您提供足够接近的计算:

SELECT SUM(bytes / (1024*1024)) "DB Size in MB" 
  FROM dba_data_files;

您将需要 DBA 级别的权限才能查看这些视图,或者您可以向 DBA 请求数据,他(可能)会答应。

希望它有帮助...

If you wan the full version information for your DB then:

SELECT *
  FROM v$version;

If you want your DB parameters then:

SELECT *
  FROM v$parameter;

If you want more information about your DB instance then:

SELECT *
  FROM v$database;

If you want the database properties then:

SELECT *
  FROM database_properties;

If you want the "size" of your database then this will give you a close enough calculation:

SELECT SUM(bytes / (1024*1024)) "DB Size in MB" 
  FROM dba_data_files;

You will need DBA level permissions to see these views or you could request the data from your DBA and he will (probably) oblige.

Hope it helps...

咽泪装欢 2024-12-19 06:33:19

SHOW DATABASE 不是有效的 SQL*Plus 命令。

正确的语法是 SHOW option 其中选项是以下之一:

system_variable ALL BTI[TLE]ERR[ORS] [ { FUNCTION | PROCEDURE | PACKAGE | 
PACKAGE BODY | TRIGGER | VIEW | TYPE | TYPE BODY | DIMENSION | JAVA CLASS } 
[schema.]name] LNO PARAMETERS [parameter_name] PNO RECYC[LEBIN] [original_name] 
REL[EASE] REPF[OOTER] REPH[EADER] SGA SPOO[L] SPPARAMETERS [parameter_name 
SQLCODE TTI[TLE] USER XQUERY

SHOW DATABASE is not a valid SQL*Plus command.

The correct syntax is SHOW option where option is one of:

system_variable ALL BTI[TLE]ERR[ORS] [ { FUNCTION | PROCEDURE | PACKAGE | 
PACKAGE BODY | TRIGGER | VIEW | TYPE | TYPE BODY | DIMENSION | JAVA CLASS } 
[schema.]name] LNO PARAMETERS [parameter_name] PNO RECYC[LEBIN] [original_name] 
REL[EASE] REPF[OOTER] REPH[EADER] SGA SPOO[L] SPPARAMETERS [parameter_name 
SQLCODE TTI[TLE] USER XQUERY
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文