Heim > Datenbank > MySQL-Tutorial > Oracle体系结构及备份(十八)bg-database

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

WBOY
Freigeben: 2016-06-07 15:08:25
Original
904 Leute haben es durchsucht

一 操作示例 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
Nach dem Login kopieren


二 总结

 

库名的查找

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>
Nach dem Login kopieren


Oracle体系结构及备份(十八)bg-database Oracle体系结构及备份(十八)bg-database Oracle体系结构及备份(十八)bg-database
@Wentasy
Verwandte Etiketten:
Quelle:php.cn
Erklärung dieser Website
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage