乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      Oracle pfile 參數(shù)文件

       LuciferLiu 2021-12-10

      目錄

      ?? 前言

      Oracle數(shù)據(jù)庫(kù)啟動(dòng)時(shí),第一步開(kāi)啟到nomount狀態(tài),需要使用到參數(shù)文件。

      pfile 就是參數(shù)文件的一種,全稱:初始化參數(shù)文件(Initialization Parameters Files)!

      ?? pfile 介紹

      我們常說(shuō)的 pfile 參數(shù)文件也就是 initSID.ora 文件,initSID.ora 是文本文件。

      在 Oracle 9i 以前,Oracle 使用 pfile 存儲(chǔ)初始化參數(shù)設(shè)置,參數(shù)文件的修改需要手工進(jìn)行,這些參數(shù)在實(shí)例啟動(dòng)時(shí)被讀取,通過(guò)pfile的修改需要重啟實(shí)例才能生效。

      以下為 Linux 下單機(jī)數(shù)據(jù)庫(kù)的示例:

      可以通過(guò) strings 命令查看文件內(nèi)容:

      [oracle@orcl:/u01/app/oracle/product/12.2.0/db/dbs]$ strings initorcl.ora
      orcl.__data_transfer_cache_size=0orcl.__db_cache_size=457179136orcl.__inmemory_ext_roarea=0orcl.__inmemory_ext_rwarea=0orcl.__java_pool_size=4194304orcl.__large_pool_size=8388608orcl.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environmentorcl.__pga_aggregate_target=180355072orcl.__sga_target=713031680orcl.__shared_io_pool_size=25165824orcl.__shared_pool_size=201326592orcl.__streams_pool_size=0*._optimizer_cartesian_enabled=FALSE
      *.audit_file_dest='/u01/app/oracle/admin/orcl/adump'*.audit_trail='NONE'*.compatible='12.2.0'*.control_files='/oradata/orcl/control01.ctl','/oradata/orcl/control02.ctl'*.db_block_size=8192*.db_create_file_dest='/oradata'*.db_name='orcl'*.deferred_segment_creation=FALSE
      *.diagnostic_dest='/u01/app/oracle'*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'*.event='10949 trace name context forever:28401 trace name context forever,level 1:10849 trace name context forever, level 1:19823 trace name context forever, level 90'*.local_listener='LISTENER_ORCL'*.log_archive_dest_1='LOCATION=/archivelog'*.log_archive_format='%t_%s_%r.dbf'*.nls_language='AMERICAN'*.nls_territory='AMERICA'*.open_cursors=300*.pga_aggregate_target=170m
      *.processes=200*.remote_login_passwordfile='EXCLUSIVE'*.result_cache_max_size=0*.sga_target=679m
      *.undo_tablespace='UNDOTBS1'

      其內(nèi)容主要為數(shù)據(jù)庫(kù)的 db_name、數(shù)據(jù)庫(kù)的版本、控制文件的位置、內(nèi)存的分配、一些系統(tǒng)文件的路徑、字符集、session的數(shù)量等等,一些數(shù)據(jù)庫(kù)最基本的信息。

      如果需要修改 pfile 文件,因?yàn)槭俏谋疚募灾苯哟蜷_(kāi)文件修改即可。

      initSID.ora 文件通常用于數(shù)據(jù)庫(kù) rman 備份恢復(fù)。

      ?? 注意: 使用 pfile 啟動(dòng)的數(shù)據(jù)庫(kù),使用 alter system 和 alter session 在線修改參數(shù)后,只會(huì)保存到內(nèi)存中,重啟后即失效。如果需要重啟依然生效,應(yīng)該手動(dòng)修改 pfile 參數(shù)文件。

      ?? 參數(shù)文件位置

      pfile 參數(shù)文件通常存在于以下目錄下:

      • Windows: $ORACLE_HOME/database

      • Linux: $ORACLE_HOME/dbs

      • pfile 文件格式為:initSID.ora

      ?? 實(shí)例講解

      ① 使用 pfile 啟動(dòng)數(shù)據(jù)庫(kù)后修改參數(shù),數(shù)據(jù)庫(kù)重啟后參數(shù)失效

      如果使用 pfile 文件啟動(dòng)數(shù)據(jù)庫(kù)后,通過(guò) alter system 修改參數(shù)后,數(shù)據(jù)庫(kù)重啟之后參數(shù)還會(huì)生效嗎?

      下面依然做個(gè)實(shí)驗(yàn)吧:

      1、確認(rèn)當(dāng)時(shí)數(shù)據(jù)庫(kù)環(huán)境是 pfile 文件啟動(dòng):

      sqlplus / as sysdba
      show parameter spfile

      2、在線修改參數(shù):

      sqlplus / as sysdba
      alter system set undo_retention=1000;show parameter undo_retention

      3、重啟數(shù)據(jù)庫(kù),查看參數(shù)是否生效:

      sqlplus / as sysdbashutdown immediate
      startup
      show parameter undo_rentention


      通過(guò)上述演示,發(fā)現(xiàn) pfile 啟動(dòng)的數(shù)據(jù)庫(kù),在線修改動(dòng)態(tài)參數(shù)只會(huì)在內(nèi)存中生效,一但重啟即失效。

      4、可以通過(guò)手動(dòng)修改 initSID.ora 文件:

      cd $ORACLE_HOME/dbsvi initorcl.ora

      如上圖所示,在最后一行添加需要修改的參數(shù)即可。

      5、重啟數(shù)據(jù)庫(kù)生效:

      sqlplus / as sysdbashutdown immediate
      startup


      通過(guò) pfile 參數(shù)啟動(dòng)數(shù)據(jù)庫(kù),每次修改參數(shù)都需要重啟數(shù)據(jù)庫(kù)才會(huì)永久生效,因此極為麻煩,所以不建議使用,除非特殊情況。


      本次分享到此結(jié)束啦~

      如果覺(jué)得文章對(duì)你有幫助,點(diǎn)贊、收藏、關(guān)注、評(píng)論,一鍵四連支持,你的支持就是我創(chuàng)作最大的動(dòng)力。

        轉(zhuǎn)藏 分享 獻(xiàn)花(0

        0條評(píng)論

        發(fā)表

        請(qǐng)遵守用戶 評(píng)論公約

        類似文章 更多