扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
查看oracle 10g 视图
1、 查看数据库的名字和归档状态
SQL> select name,log_mode from v$database;
NAME LOG_MODE
--------- ------------
HB130000 ARCHIVELOG
2、 查看数据库的instance名字和状态
SQL> select instance_name,status from v$instance;
INSTANCE_NAME STATUS
---------------- ------------
hb130000 OPEN
3、查看表空间名称、状态和管理方式
SQL> select tablespace_name,status,extent_management from dba_tablespaces;
TABLESPACE_NAME STATUS EXTENT_MAN
------------------------------ --------- ----------
SYSTEM ONLINE LOCAL
UNDOTBS1 ONLINE LOCAL
SYSAUX ONLINE LOCAL
TEMP ONLINE LOCAL
USERS ONLINE LOCAL
GFB ONLINE LOCAL
YSZX130000002004 ONLINE LOCAL
RMAN ONLINE LOCAL
8 rows selected.
4、查看控制文件的位置和名字
SQL> select name from v$controlfile;
NAME
/oracle/app/oracle/OraHome/dbs/hb130000/control01.ctl
/oradata/hb130000/control02.ctl
/oradata/hb130000/control03.ctl
5、查看日志文件的组名、成员数量、状态和大小
SQL> select group#,members,bytes,status from v$log;
GROUP# MEMBERS BYTES STATUS
---------- ---------- ---------- ----------------
1 2 52428800 INACTIVE
2 2 52428800 INACTIVE
3 2 52428800 CURRENT
6、查看日志文件的位置
SQL> select group#,member from v$logfile;
GROUP#
----------
MEMBER
3
/oradata/hb130000/redo03.log
3
/oracle/app/oracle/OraHome/dbs/hb130000/redo03.rdo
2
/oradata/hb130000/redo02.log
GROUP#
----------
MEMBER
2
/oracle/app/oracle/OraHome/dbs/hb130000/redo02.rdo
1
/oradata/hb130000/redo01.log
1
/oracle/app/oracle/OraHome/dbs/hb130000/redo01.rdo
6 rows selected.
7、查看数据文件的位置和大小
SQL> select name,bytes from v$datafile;
NAME
BYTES
----------
/oradata/hb130000/system01.dbf
492830720
/oradata/hb130000/undotbs01.dbf
41943040
/oradata/hb130000/sysaux01.dbf
346030080
NAME
BYTES
----------
/oradata/hb130000/users01.dbf
5242880
/oradata/hb130000/GFB.DBF
20971520
/oradata/hb130000/YSZX130000002004.DBF
176160768
NAME
BYTES
----------
/oradata/hb130000/rman.dbf
104857600
7 rows selected.
8、查看用户拥有的对象和类型
SQL> select object_name,object_type from dba_objects where owner='SCOTT';
OBJECT_NAME
OBJECT_TYPE
--------------------------------------------------------------------------------
------------------------------------------------ -------------------
DEPT
TABLE
PK_DEPT
INDEX
EMP
TABLE
PK_EMP
INDEX
BONUS
TABLE
SALGRADE
TABLE
6 rows selected.
9、查看临时文件的信息
SQL> select name,bytes from v$tempfile;
NAME
BYTES
----------
/oradata/hb130000/temp01.dbf
20971520
10、查看归档日志信息
SQL> select name, FIRST_CHANGE#,next_change# from v$archived_log;
NAME
--------------------------------------------------------------------------------
FIRST_CHANGE# NEXT_CHANGE#
------------- ------------
/oracle/app/oracle/OraHome/dbs/archive/hb130000_1_53_532853380.dbf
1669178 1707392
/oracle/app/oracle/OraHome/dbs/archive/hb130000_1_54_532853380.dbf
1707392 1734524
/oracle/app/oracle/OraHome/dbs/archive/hb130000_1_55_532853380.dbf
1734524 1772848
NAME
--------------------------------------------------------------------------------
FIRST_CHANGE# NEXT_CHANGE#
------------- ------------
/oracle/app/oracle/OraHome/dbs/archive/hb130000_1_56_532853380.dbf
1772848 1798092
/oracle/app/oracle/OraHome/dbs/archive/hb130000_1_57_532853380.dbf
1798092 1831478
/oracle/app/oracle/OraHome/dbs/archive/hb130000_1_58_532853380.dbf
1831478 1865033
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者