ORACLE DBA 常用命令
- 查询实例状态: select status from v$instance;
- 查询数据库名称、角色、日志模式、保护模式、保护级别:select name,database_role role,log_mode, protection_mode,protection_level from v$database;
- 查询数据库switchover状态:select switchover_status from v$database;
- 查询 归档日志状态: SELECT SEQUENCE#,APPLIED FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;
- 查询数据文件名称:SELECT NAME FROM V$DATAFILE;
- 数据库会话:select * from v$session ;
- 删除会话:alter system kill session 'sid, serial#';