Oracle基礎 07 參數檔案 pfile/spfile

來源:互聯網
上載者:User

標籤:tcp   manage   ash   media   man   tor   sse   mem   min   

--查看資料庫運行模式(spfile還是pfile)
select decode(count(*),1,‘spfile‘,‘pfile‘) 
from v$spparameter
where rownum=1 and isspecified=‘TRUE‘;


--以pfile啟動資料庫
create pfile=‘/u01/app/oracle/product/11.2.0/db_1/dbs/initdbtest.ora‘ from spfile;
shutdown immediate;
startup pfile=‘/u01/app/oracle/product/11.2.0/db_1/dbs/initdbtest.ora‘;


--以spfile啟動資料庫
create spfile from pfile=‘/u01/app/oracle/product/11.2.0/db_1/dbs/initdbtest.ora‘;
shutdown immediate;
startup;


--從記憶體建立spfile或pfile
create spfile from memory
create pfile from memory

此命令在丟失當前參數檔案時很方便。在RAC環境中,此命令將捕捉系統中每個執行個體正在使用的參數值。

 


--pfile重建
adump :審計資訊
bdump :後台進程trace 和alert log ,就是說 alert_sid.log也存在這個目錄中
cdump :core trace,一般是用來日誌應用程式的 除非資料庫出了問題 否則基本上不會有什麼資訊 
dpdump :是存放一些登入資訊的
udump :前台手動trace的 比如sql trace之後session的trace檔案


--10g pfile模板 /u01/app/oracle/admin/test10g/bdump alert_test10.log檔案
processes                = 150
sga_target               = 205520896
control_files            = /u01/app/oracle/oradata/test10g/control01.ctl, /u01
/app/oracle/oradata/test10g/control02.ctl, /u01/app/oracle/oradata/test10g/contr
ol03.ctl
db_block_size            = 8192
compatible               = 10.2.0.1.0
log_archive_format       = %t_%s_%r.dbf
db_file_multiblock_read_count= 16
db_recovery_file_dest    = /u01/app/oracle/flash_recovery_area
db_recovery_file_dest_size= 2147483648
undo_management          = AUTO
undo_tablespace          = UNDOTBS1
remote_login_passwordfile= EXCLUSIVE
db_domain                = 
dispatchers              = (PROTOCOL=TCP) (SERVICE=test10gXDB)
job_queue_processes      = 10
background_dump_dest     = /u01/app/oracle/admin/test10g/bdump
user_dump_dest           = /u01/app/oracle/admin/test10g/udump
core_dump_dest           = /u01/app/oracle/admin/test10g/cdump
audit_file_dest          = /u01/app/oracle/admin/test10g/adump
db_name                  = test10g
open_cursors             = 300
pga_aggregate_target     = 68157440


--11g pfile模板 /u01/app/oracle/diag/rdbms/test11g/test11g/trace alert_test11g.log檔案
processes                = 150
nls_language             = "AMERICAN"
nls_territory            = "AMERICA"
sga_target               = 400M
control_files            = "/u01/app/oracle/oradata/test11g/control01.ctl"
control_files            = "/u01/app/oracle/oradata/test11g/control02.ctl"
control_files            = "/u01/app/oracle/oradata/test11g/control03.ctl"
db_block_size            = 8192
compatible               = "11.2.0"
db_recovery_file_dest    = "$ORACLE_BASE/flash_recovery_area"
db_recovery_file_dest_size= 2G
undo_management          = "AUTO"
undo_tablespace          = "UNDOTBS1"
undo_retention           = 7200
remote_login_passwordfile= "EXCLUSIVE"
db_domain                = ""
dispatchers              = "(PROTOCOL=TCP) (SERVICE=ORCLXDB)"
audit_file_dest          = "/u01/app/oracle/admin/test11g/adump"
audit_trail              = "NONE"
db_name                  = "TEST11G"
open_cursors             = 300
pga_aggregate_target     = 300M
statistics_level         = "typical"
diagnostic_dest          = "/u01/app/oracle"

Oracle基礎 07 參數檔案 pfile/spfile

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.