(Linux) Data, 일반, Temp 파일

Oracle/Oracle_Admin1 2016. 6. 8. 21:43

Data file
1) system File (운영중에 꼭 필요하다.)
 - system01.dbf : 운영에 필요한 DB정보
 - susaux01.dbf : 10g이후에 한 시간에 한번씩 찍음) aw등의 성능 정보
 - untbs01.dbf : rollback등을 위한 이전 이미지
2) 일반 파일
 - users01.dbf : 유저가 생성한 데이터
3) Temp 파일
 - temp01.dbf : 정렬공간 : PGA에서 정렬하다가 공간이 부족할 경우에 사용하는 DISK 공간
                           임시 테이블 생성 시 데이터가 임시로 저장되는 공간

 

SQL> show parameter control_files

NAME         TYPE  VALUE
------------------------------------ ----------- ------------------------------
control_files        string  /u01/oradata/ORCL/control01.ct
       l, /u01/oradata/ORCL/control02
       .ctl
SQL> v$controlfile
SP2-0734: unknown command beginning "v$controlf..." - rest of line ignored.
SQL> desc v$controlfile
 Name                                          Null?    Type
 ----------------------------------------- -------- ----------------------------
 STATUS                                                  VARCHAR2(7)
 NAME                                                    VARCHAR2(513)
 IS_RECOVERY_DEST_FILE                             VARCHAR2(3)
 BLOCK_SIZE                                             NUMBER
 FILE_SIZE_BLKS                                         NUMBER

 

 

SQL> select name from v$controlfile;

NAME
--------------------------------------------------------------------------------
/u01/oradata/ORCL/control01.ctl
/u01/oradata/ORCL/control02.ctl

 


SQL> select file_name from dba_data_files;

FILE_NAME
--------------------------------------------------------------------------------
/u01/oradata/ORCL/users01.dbf
/u01/oradata/ORCL/undotbs01.dbf
/u01/oradata/ORCL/sysaux01.dbf
/u01/oradata/ORCL/system01.dbf
/u01/oradata/ORCL/example01.dbf

SQL> desc dba_data_files;
 Name                                         Null?    Type
 ----------------------------------------- -------- ----------------------------
 FILE_NAME                                             VARCHAR2(513)
 FILE_ID                                                   NUMBER
 TABLESPACE_NAME                                  VARCHAR2(30)
 BYTES                                                    NUMBER
 BLOCKS                                                  NUMBER
 STATUS                                                  VARCHAR2(9)
 RELATIVE_FNO                                         NUMBER
 AUTOEXTENSIBLE                                     VARCHAR2(3)
 MAXBYTES                                              NUMBER
 MAXBLOCKS                                            NUMBER
 INCREMENT_BY                                        NUMBER
 USER_BYTES                                             NUMBER
 USER_BLOCKS                                          NUMBER
 ONLINE_STATUS                                       VARCHAR2(7)

 

SQL> select file_name from dba_temp_files;

FILE_NAME
--------------------------------------------------------------------------------
/u01/oradata/ORCL/temp01.dbf

SQL> select name from v$datafile;

NAME
--------------------------------------------------------------------------------
/u01/oradata/ORCL/system01.dbf
/u01/oradata/ORCL/sysaux01.dbf
/u01/oradata/ORCL/undotbs01.dbf
/u01/oradata/ORCL/users01.dbf
/u01/oradata/ORCL/example01.dbf


SQL> select name from v$tempfile;

NAME
--------------------------------------------------------------------------------
/u01/oradata/ORCL/temp01.dbf

 

SQL> select member from v$logfile;

MEMBER
--------------------------------------------------------------------------------
/u01/oradata/ORCL/redo03.log
/u01/oradata/ORCL/redo02.log
/u01/oradata/ORCL/redo01.log
--> 그룹으로 지정되어 있다.

 

SQL> desc v$log;
 Name        Null?    Type
 ----------------------------------------- -------- ----------------------------
 GROUP#                  NUMBER
 THREAD#                 NUMBER
 SEQUENCE#             NUMBER
 BYTES                     NUMBER
 BLOCKSIZE               NUMBER
 MEMBERS                NUMBER
 ARCHIVED                VARCHAR2(3)
 STATUS                   VARCHAR2(16)
 FIRST_CHANGE#        NUMBER
 FIRST_TIME               DATE
 NEXT_CHANGE#        NUMBER
 NEXT_TIME               DATE

 

SQL> select group#, members
  2  from v$log;

 

GROUP#    MEMBERS
----------   ----------
  1             1
  2             1
  3             1

 

 

Server에서의 Listener

$ORACLE_HOME/network/admin/listener.ora- 

Listener의 IP, PORT, PROTOCOL, DB 이름

 

Client에서 경로

$ORACLE_HOME/network/admin/tnsname.ora-

자신의 IP, PORT, PROTOCOL, DB이름

admin