Oracle体系结构及备份(十八)——bg-database

一 操作示例

SQL> show parameter db_name;

NAME				     TYPE	 VALUE
------------------------------------ ----------- ------------------------------
db_name 			     string	 orcl
SQL> select name from v$database;

NAME
---------
ORCL

SQL> select instance_name from v$instance;

INSTANCE_NAME
----------------
orcl

SQL> show parameter instance_name;

NAME				     TYPE	 VALUE
------------------------------------ ----------- ------------------------------
instance_name			     string	 orcl
SQL> select name from v$datafile;

NAME
--------------------------------------------------------------------------------
/oracle/oracle/product/10.2.0/oradata/orcl/system01.dbf
/oracle/oracle/product/10.2.0/oradata/orcl/undotbs01.dbf
/oracle/oracle/product/10.2.0/oradata/orcl/sysaux01.dbf
/oracle/oracle/product/10.2.0/oradata/orcl/users01.dbf
/oracle/oracle/product/10.2.0/oradata/orcl/example01.dbf

SQL> select name from v$controlfile;

NAME
--------------------------------------------------------------------------------
/oracle/oracle/product/10.2.0/oradata/orcl/control01.ctl
/oracle/oracle/product/10.2.0/oradata/orcl/control02.ctl
/oracle/oracle/product/10.2.0/oradata/orcl/control03.ctl

SQL> select member from v$logfile;

MEMBER
--------------------------------------------------------------------------------
/oracle/oracle/product/10.2.0/oradata/orcl/redo03.log
/oracle/oracle/product/10.2.0/oradata/orcl/redo02.log
/oracle/oracle/product/10.2.0/oradata/orcl/redo01.log

SQL> desc v$archived_log;
 Name					   Null?    Type
 ----------------------------------------- -------- ----------------------------
 RECID						    NUMBER
 STAMP						    NUMBER
 NAME						    VARCHAR2(513)
 DEST_ID					    NUMBER
 THREAD#					    NUMBER
 SEQUENCE#					    NUMBER
 RESETLOGS_CHANGE#				    NUMBER
 RESETLOGS_TIME 				    DATE
 RESETLOGS_ID					    NUMBER
 FIRST_CHANGE#					    NUMBER
 FIRST_TIME					    DATE
 NEXT_CHANGE#					    NUMBER
 NEXT_TIME					    DATE
 BLOCKS 					    NUMBER
 BLOCK_SIZE					    NUMBER
 CREATOR					    VARCHAR2(7)
 REGISTRAR					    VARCHAR2(7)
 STANDBY_DEST					    VARCHAR2(3)
 ARCHIVED					    VARCHAR2(3)
 APPLIED					    VARCHAR2(3)
 DELETED					    VARCHAR2(3)
 STATUS 					    VARCHAR2(1)
 COMPLETION_TIME				    DATE
 DICTIONARY_BEGIN				    VARCHAR2(3)
 DICTIONARY_END 				    VARCHAR2(3)
 END_OF_REDO					    VARCHAR2(3)
 BACKUP_COUNT					    NUMBER
 ARCHIVAL_THREAD#				    NUMBER
 ACTIVATION#					    NUMBER
 IS_RECOVERY_DEST_FILE				    VARCHAR2(3)
 COMPRESSED					    VARCHAR2(3)
 FAL						    VARCHAR2(3)
 END_OF_REDO_TYPE				    VARCHAR2(10)


SQL> select name from v$archived_log;

NAME
--------------------------------------------------------------------------------
/oracle/oracle/product/10.2.0/db_1/flash_recovery_area/ORCL/archivelog/2013_06_0
6/o1_mf_1_19_8v0083nd_.arc


SQL> select value from v$spparamerer where name='spfile';
select value from v$spparamerer where name='spfile'
                  *
ERROR at line 1:
ORA-00942: table or view does not exist

ls /oracle/oracle//product/10.2.0/db_1/dbs/orapworcl/$ORACLE_SID

ls $ORACLE_BASE/admin/$ORACLE_SID/bdump/alert_$ORACLE_SID.log

ls $ORACLE_BASE/admin/ora10g


二 总结

 

库名的查找

show parameter db_name;

select name from v$database;

 

实例名

select instance_name from v$instance;

show parameter instance_name;

 

Oracle服务器:库名+访问名

 

数据文件

select name from v$datafile;

 

控制文件

select name from v$controlfile;

 

日志文件

select member from v$logfile;

 

归档日志

desc v$archived_log;

select name from v$archived_log;

 

参数文件

select value from v$spparamerer where name=’spfile’;

select value from v$paramerer where name=’spfile’;

 

密码文件

ho ls $ORACLE_HOME/dbs/orapw$ORACLE_SID

 

告警日志

ho ls$ORACLE_BASE/admin/$ORACLE_SID/bdump/alert_$ORACLE_SID.log

ho ls $ORACLE_BASE/admin/ora10g



  我的邮箱[email protected]   新浪微博@Wentasy27         
  微信公众平台:JustOracle(微信号:justoracle)
  数据库技术交流群:336882565(加群时验证 From CSDN XXX)
  Oracle交流讨论组:https://groups.google.com/d/forum/justoracle
  By Larry Wen


Oracle体系结构及备份(十八)——bg-database_第1张图片 Oracle体系结构及备份(十八)——bg-database_第2张图片 Oracle体系结构及备份(十八)——bg-database_第3张图片
@Wentasy 博文仅供参考,欢迎大家来访。如有错误之处,希望批评指正。原创博文如需转载请注明出处,谢谢 :) [CSDN博客]

你可能感兴趣的:(十八,Oracle体系结构及备份,bg-database)