[20201221]spfile設定問題.txt
[20201221]spfile設定問題.txt
--//上個星期維護dg遇到的問題,做一個測試模擬生產系統的情況。
1.環境:
SYS@book> @ ver1
PORT_STRING VERSION BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
SYS@book> show parameter log_archive_dest_1
NAME TYPE VALUE
------------------ ------ ----------------------------------------------------------------------------------------------------
log_archive_dest_1 string LOCATION=/u01/app/oracle/archivelog/book/ MANDATORY VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=book
SYS@book> show spparameter log_archive_dest_1
SID NAME TYPE VALUE
-------- ------------------ ------ ----------------------------------------------------------------------------------------------------
* log_archive_dest_1 string LOCATION=/u01/app/oracle/archivelog/book/ MANDATORY VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=book
SYS@book> alter system set log_archive_dest_1='LOCATION=/tmp/book MANDATORY VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=book' sid='book';
System altered.
SYS@book> alter system reset log_archive_dest_1 sid='*';
System altered.
SYS@book> show spparameter log_archive_dest_1
SID NAME TYPE VALUE
-------- ------------------ ------ ----------------------------------------------------------------------------------------------------
book log_archive_dest_1 string LOCATION=/tmp/book MANDATORY VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=book
--//繞了一大圈,設定引數log_archive_dest_1,但是注意sid=book.
2.測試:
SYS@book> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@book> startup
ORACLE instance started.
Total System Global Area 643084288 bytes
Fixed Size 2255872 bytes
Variable Size 205521920 bytes
Database Buffers 427819008 bytes
Redo Buffers 7487488 bytes
Database mounted.
Database opened.
SYS@book> show parameter log_archive_dest_1
NAME TYPE VALUE
------------------ ------ ----------------------------------------------------------------------------------------------------
log_archive_dest_1 string LOCATION=/tmp/book MANDATORY VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=book
SYS@book> alter system set log_archive_dest_1='LOCATION=/u01/app/oracle/archivelog/book/ MANDATORY VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=book' ;
System altered.
SYS@book> show parameter log_archive_dest_1
NAME TYPE VALUE
------------------ ------ ----------------------------------------------------------------------------------------------------
log_archive_dest_1 string LOCATION=/u01/app/oracle/archivelog/book/ MANDATORY VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=book
SYS@book> show spparameter log_archive_dest_1
SID NAME TYPE VALUE
-------- ------------------ ------ ----------------------------------------------------------------------------------------------------
book log_archive_dest_1 string LOCATION=/tmp/book MANDATORY VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=book
* log_archive_dest_1 string LOCATION=/u01/app/oracle/archivelog/book/ MANDATORY VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=book
--//實際上現在在sid=book,*上都設定了這個引數。實際生效的是sid='*'的情況。
--//如果重啟呢?
3.繼續:
SYS@book> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@book> startup
ORACLE instance started.
Total System Global Area 643084288 bytes
Fixed Size 2255872 bytes
Variable Size 205521920 bytes
Database Buffers 427819008 bytes
Redo Buffers 7487488 bytes
Database mounted.
Database opened.
SYS@book> show parameter log_archive_dest_1
NAME TYPE VALUE
------------------ ------ -----------------------------------------------------------------------------------
log_archive_dest_1 string LOCATION=/tmp/book MANDATORY VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=book
--//這樣重啟後sid='book'設定的引數生效,導致生產系統對應的磁碟撐爆。在做系統維護時要注意。
SYS@book> show spparameter log_archive_dest_1
SID NAME TYPE VALUE
-------- ------------------ ------ ----------------------------------------------------------------------------------------------------
book log_archive_dest_1 string LOCATION=/tmp/book MANDATORY VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=book
* log_archive_dest_1 string LOCATION=/u01/app/oracle/archivelog/book/ MANDATORY VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=book
--//也就是在維護中注意,我們的問題出現在dg上。許多人在dg上建立dg時,保留了前面的sid部分,或者有一些dba喜歡設定引數加入sid引數,
--//我個人不喜歡這樣設定。也就是在設定引數時,注意使用 show spparameter檢查設定的具體情況。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2744072/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [20221125]設定hugepages遇到的問題.txt
- [20221111]bash eval設定變數問題.txt變數
- [20241118]NLS_LANG設定問題2.txt
- [20240804]關於kitty設定與linux LANG環境設定問題.txtLinux
- [20201221]KTFB Bitmapped File Space Header的恢復.txtAPPHeader
- [20221214]limits.conf裡面關於memlock設定問題.txtMIT
- 【ASM】ASM啟動無法找到spfile問題原因ASM
- [20190103]設定pre_page_sga=true啟動緩慢的問題.txt
- [20191204]sqlplus特殊定義導致的問題.txtSQL
- [20200219]log_archive_dest_1定義問題.txtHive
- STM32埠IO方向設定問題的IO方向設定問題
- [20240814]oracle 21c NLS_DATE_FORMAT設定問題(整理版本1).txtOracleORM
- zotero的同步設定問題
- 設定flex後子元素設定寬度失效問題Flex
- Django的時區設定問題Django
- [20190930]關於資料結構設計問題.txt資料結構
- [20201109]11.2.0.4增加欄位與預設值問題.txt
- [20190221]sql patch 問題.txtSQL
- [20181217]strace使用問題.txt
- [20181204]bbed修改問題.txt
- [20190313]備份問題.txt
- [20180619]bbed verify問題.txt
- [20210812]windows xcopy問題.txtWindows
- scrapy 一些設定和問題
- [20230224]bbed設定偏移技巧.txt
- [20190116]rman的老問題.txt
- [20181206]toad 12小問題.txt
- [20180509]函式索引問題.txt函式索引
- [20190522]rman備份問題.txt
- [20181227]bbed的使用問題.txt
- [20220329]windows xcopy命令問題.txtWindows
- [20221203]sqlplus set trimspool 問題.txtSQL
- [20221107]除錯crontab問題.txt除錯
- [20221202]sqlplus set trimout 問題.txtSQL
- [20220623]linux 口令expire問題.txtLinux
- [20210303]bbed使用小問題.txt
- 設定spacevim字型顯示亂碼問題
- 【Angular】設定代理解決跨域問題Angular跨域