在iSQL plus中选择数据库详细信息和表名 [英] Select Database details and table names in iSQL plus

查看:78
本文介绍了在iSQL plus中选择数据库详细信息和表名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用了找到的问题的答案此处,使用此命令select ora_database_name from dual;获取数据库名称.下面是结果的屏幕截图.但是,如何获取屏幕快照及其表列表中找到的该数据库的详细信息?

I used the answer of the question found here to get the database name using this command select ora_database_name from dual;. and below is a screen shot of the result. But how to get the details of this database found in the screenshot and its list of tables?

推荐答案

您可以使用对元数据表或USERENV变量的查询来找到数据库和客户端的大多数详细信息.

You can find most details of the database and the client using the queries against metadata tables or USERENV variables.

例如:

select * from global_name; -- will give you the name

select * from v$version; -- will give you the oracle version and other details. 

Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
"CORE   11.2.0.2.0  Production"
TNS for Linux: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production

有关对象的详细信息,可以查询oracle的数据字典表.如果需要表列表,则可以使用user_tables(当前用户拥有的表),all_tables(当前用户可访问的表)或dba_tables(数据库中的所有表).

For details about the objects, you can query oracle's data dictionary tables. If you need list of tables, you could use user_tables (tables owned by current user), all_tables (tables that are accessible to the current user) or dba_tables (all tables in the database).

select * from dba_tables where owner = 'SYS';

SYS TMP_F_FREQ_BKP  SYSTEM
SYS OLAP_CUBE_BUILD_PROCESSES$  SYSTEM
SYS TRUSTED_LIST$   SYSTEM
SYS WRH$_PERSISTENT_QMN_CACHE   SYSAUX
.....

http://docs.oracle.com/cd/B28359_01/server.111/b28310/tables014.htm#ADMIN01508

这篇关于在iSQL plus中选择数据库详细信息和表名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆