首頁 >資料庫 >mysql教程 >Oracle体系结构及备份(十八)bg-database

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

WBOY
WBOY原創
2016-06-07 15:08:25901瀏覽

一 操作示例 SQL show parameter db_name;NAME TYPE VALUE------------------------------------ ----------- ------------------------------db_name string orclSQL select name from v$database;NAME---------ORCLSQL select instance_name from v$instan

一 操作示例

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



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


Oracle体系结构及备份(十八)bg-database Oracle体系结构及备份(十八)bg-database Oracle体系结构及备份(十八)bg-database
@Wentasy
陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn