標籤:oracle 文字檔 檔案管理
二、Oracle的參數檔案管理
1.參數檔案的介紹
兩種參數檔案:
(1)spfile參數檔案(二進位檔案)
(2)pfile參數檔案(文字檔)
參數檔案儲存體的路徑:$ORACLE_HOME/dbs
[[email protected] dbs]$ ll
總計 56
-rw-r----- 1 oracle oinstall 1544 06-05 15:47 hc_LAW.dat
-rw-rw---- 1 oracle oinstall 1544 06-09 10:52 hc_ORCL.dat
-rw-r--r-- 1 oracle oinstall 12920 2001-05-03 initdw.ora
-rw-r----- 1 oracle oinstall 8385 1998-09-11 init.ora
-rw-r--r-- 1 oracle oinstall 987 06-09 09:28 initORCL.ora
-rw-r----- 1 oracle oinstall 24 06-04 16:20 lkORCL
-rw-r----- 1 oracle oinstall 1536 06-09 10:57 orapwORCL
-rw-r----- 1 oracle oinstall 2560 06-09 10:52 spfileORCL.ora
-rw-r----- 1 oracle oinstall 2584 06-09 09:38 sqlnet.log
spfileORCL.ora:ORCL執行個體的spfile檔案
initORCL.ora:ORCL執行個體的pfile檔案
注意:
10gR2這個版本預設啟動讀取的是spfile檔案,pfile檔案在啟動資料庫的時候是不用的。
反解spfile檔案:
SQL> create pfile from spfile;
File created.
強制使用pfile檔案啟動資料庫
SQL> startup pfile=‘/u01/oracle/product/10.2.0/db_1/dbs/initORCL.ora‘;
ORACLE instance started.
Total System Global Area 608174080 bytes
Fixed Size 1268920 bytes
Variable Size 230687560 bytes
Database Buffers 373293056 bytes
Redo Buffers 2924544 bytes
Database mounted.
Database opened.
驗證是使用pfile檔案啟動資料庫
SQL> select value from v$parameter where name=‘spfile‘;
VALUE
--------------------------------------------------------------------------------
value值是空的,那麼說明是使用pfile檔案啟動資料庫
如果是使用spfile檔案啟動資料庫,那麼value值就是spfile檔案的絕對路徑
SQL> startup
ORACLE instance started.
Total System Global Area 608174080 bytes
Fixed Size 1268920 bytes
Variable Size 230687560 bytes
Database Buffers 373293056 bytes
Redo Buffers 2924544 bytes
Database mounted.
Database opened.
SQL> select value from v$parameter where name=‘spfile‘;
VALUE
--------------------------------------------------------------------------------
/u01/oracle/product/10.2.0/db_1/dbs/spfileORCL.ora
參數檔案命名的格式:
spfile[ORACLE_SID].ora --spfile檔案的命名
init[ORACLE_SID].ora --pfile檔案的命名
oracle的參數:
ORCL.__db_cache_size=373293056
ORCL.__java_pool_size=33554432
ORCL.__large_pool_size=4194304
ORCL.__shared_pool_size=192937984
ORCL.__streams_pool_size=0
*.audit_file_dest=‘/u01/oracle/admin/ORCL/adump‘
*.background_dump_dest=‘/u01/oracle/admin/ORCL/bdump‘
*.compatible=‘10.2.0.1.0‘
*.control_files=‘/u01/oracle/oradata/ORCL/control01.ctl‘,‘/u01/oracle/oradata/ORCL/control02.ctl‘,‘/u01/oracle/oradata/ORCL/control03.ctl‘
*.core_dump_dest=‘/u01/oracle/admin/ORCL/cdump‘
*.db_block_size=8192
*.db_domain=‘‘
*.db_file_multiblock_read_count=16
*.db_name=‘ORCL‘
*.db_recovery_file_dest=‘/u01/oracle/flash_recovery_area‘
*.db_recovery_file_dest_size=2147483648
*.dispatchers=‘(PROTOCOL=TCP) (SERVICE=ORCLXDB)‘
*.job_queue_processes=10
*.local_listener=‘ORCL‘
*.open_cursors=300
*.pga_aggregate_target=201326592
*.processes=150
*.remote_login_passwordfile=‘EXCLUSIVE‘
*.sga_target=605028352
*.undo_management=‘AUTO‘
*.undo_tablespace=‘UNDOTBS1‘
*.user_dump_dest=‘/u01/oracle/admin/ORCL/udump‘
oracle的啟動與關閉原理-spfile和pfile的參數原理