1、查看报警日志
/u01/app/oracle/diag/rdbms/orcl/orcl/trace/alert_orcl.log
实时日志:tail -f /u01/app/oracle/diag/rdbms/orcl/orcl/trace/alert_orcl.log
跟踪文件 ADR
2、动态性能视图(v$) 保存在内存中
用来访问 实例 内存结构的不断变化的状态的信息(控制文件+实例)
session data
wait events
memory allocations
Running sql
undo usage
open cursors
redo log usage
....
不同的时刻可以看不一样的动态性能视图:
startup nomount阶段:
select status from v$instance;
select paddr,port from v$session;
startup mount阶段:
select open_mode from v$database;
select name from v$datafile;
select member from v$logfile;
select addr from v$lock;
select paddr,port from v$session;
select * from v$sga;
select count(*) from v$sql;
startup 阶段:
select * from v$pga;
select count(*) from v$fixed_table where name like 'V$%';//查看动态性能视图有多少个表
3、数据字典 存在表中
table indexes views users schemals procedures ...
DBA_ :访问一切对象
ALL_ :用户有权查看的一切对象
USER_ : 用户拥有的对象
select count(*) from dba_tables;
select count(*) from all_tables;
例子:::
alter user scott account unlock identified by tiger;
sql> conn scott/tiger;
Connected.
sql> select * from tab;
TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
BONUS TABLE
DEPT TABLE
EMP TABLE
SALGRADE TABLE
查看scott用户可以查看哪些表,总共多少张表
sql> select count(*) from all_tables;
COUNT(*)
----------
103
sql> select count(*) from user_tables;
COUNT(*)
----------
4
查看scott用户拥有哪些表:
sql> select table_name from user_tables;
TABLE_NAME
------------------------------
DEPT
EMP
BONUS
SALGRADE
########
查看所有用户
select username,account_status from dba_users;
查看有哪些数据字典表
select table_name from dictionary;
原文链接:https://www.f2er.com/oracle/209237.html