9i RAC轉換為SINGLE例項
客戶有個RAC,覺得太難管,不想弄,想做成雙機
今天在LINUX上測試了下下,ORACLE方面的
SQL> create pfile='/tmp/init.ora' from spfile;
File created.
[oracle@westzq1 ~]$ srvctl stop database -d rac9i
*********************************************************************************
[oracle@westzq1 ~]$ cat /tmp/init.ora
#*.background_dump_dest='/oracle/ora9/admin/rac9i/bdump'
*.background_dump_dest='/oracle/ora9/admin/single/bdump'
#*.cluster_database_instances=2
#*.cluster_database=true
#rac9i1.cluster_database=TRUE
*.compatible='9.2.0.0.0'
*.control_files='/dev/raw/raw3','/dev/raw/raw2'
#*.core_dump_dest='/oracle/ora9/admin/rac9i/cdump'
*.core_dump_dest='/oracle/ora9/admin/single/cdump'
*.db_block_size=8192
*.db_cache_size=25165824
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_name='rac9i'
*.fast_start_mttr_target=300
*.hash_join_enabled=TRUE
#rac9i1.instance_name='rac9i1'
#rac9i2.instance_name='rac9i2'
#rac9i2.instance_number=2
#rac9i1.instance_number=1
*.instance_name='single'
*.java_pool_size=0
*.large_pool_size=8388608
#rac9i2.local_listener='(address=(protocol=tcp)(host=westzq2)(port=1521))'
#rac9i1.local_listener='(address=(protocol=tcp)(host=westzq1)(port=1521))'
*.log_archive_dest_1='LOCATION=/oracle/ora9/arch MANDATORY REOPEN'
*.log_archive_format='%t_%s'
*.log_archive_start=TRUE
*.open_cursors=300
*.parallel_max_servers=50
*.pga_aggregate_target=25165824
*.processes=150
*.query_rewrite_enabled='FALSE'
#*.remote_listener='LISTENERS_RAC9I'
#rac9i2.remote_listener='(address=(protocol=tcp)(host=westzq1)(port=1521))'
#rac9i1.remote_listener='(address=(protocol=tcp)(host=westzq2)(port=1521))'
*.remote_login_passwordfile='exclusive'
*.shared_pool_size=83886080
*.sort_area_size=524288
*.star_transformation_enabled='TRUE'
#rac9i1.thread=1
#rac9i2.thread=2
*.timed_statistics=TRUE
*.undo_management='AUTO'
*.undo_retention=10800
#rac9i1.undo_tablespace='UNDOTBS1'
#rac9i2.undo_tablespace='UNDOTBS2'
*.undo_tablespace='UNDOTBS1'
##*.user_dump_dest='/oracle/ora9/admin/rac9i/udump'
*.user_dump_dest='/oracle/ora9/admin/single/udump'
*********************************************************************************
export ORACLE_SID=single
*********************************************************************************
[oracle@westzq1 admin]$ ls -l
total 8
drwxr-xr-x 8 oracle dba 4096 Dec 2 2008 rac9i
[oracle@westzq1 admin]$ mv rac9i single
[oracle@westzq1 admin]$ ls -l
total 8
drwxr-xr-x 8 oracle dba 4096 Dec 2 2008 single
[oracle@westzq1 dbs]$ orapwd file=/oracle/ora9/product/9.2/dbs/orapwsingle password=sys
*********************************************************************************
啟動例項一
SQL> startup pfile='/tmp/init.ora';
ORACLE instance started.
Total System Global Area 135336712 bytes
Fixed Size 451336 bytes
Variable Size 109051904 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.
SQL> show parameter cluster
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
cluster_database boolean FALSE
cluster_database_instances integer 1
cluster_interconnects string
SQL> show parameter instance
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
active_instance_count integer
cluster_database_instances integer 1
instance_groups string
instance_name string single
instance_number integer 0
open_links_per_instance integer 4
parallel_instance_group string
parallel_server_instances integer 1
*********************************************************************************
SQL> alter database disable thread 2;
Database altered.
*********************************************************************************
[oracle@westzq1 bin]$ cd $ORACLE_HOME/rdbms/lib
[oracle@westzq1 lib]$ make -f ins_rdbms.mk rac_off
rm -f /oracle/ora9/product/9.2/lib/libskgxp9.so
cp /oracle/ora9/product/9.2/lib//libskgxpd.so /oracle/ora9/product/9.2/lib/libskgxp9.so
rm -f /oracle/ora9/product/9.2/lib/libskgxn9.so
cp /oracle/ora9/product/9.2/lib//libskgxns.so /oracle/ora9/product/9.2/lib/libskgxn9.so
/usr/bin/ar d /oracle/ora9/product/9.2/rdbms/lib/libknlopt.a kcsm.o
/usr/bin/ar cr /oracle/ora9/product/9.2/rdbms/lib/libknlopt.a /oracle/ora9/product/9.2/rdbms/lib/ksnkcs.o
[oracle@westzq1 lib]$ make -f ins_rdbms.mk ioracle
- Linking Oracle
rm -f /oracle/ora9/product/9.2/rdbms/lib/oracle
gcc -o /oracle/ora9/product/9.2/rdbms/lib/oracle -L/oracle/ora9/product/9.2/rdbms/lib/ -L/oracle/ora9/product/9.2/lib/ -L/oracle/ora9/product/9.2/lib/stubs/ -Wl,-E `test -f /oracle/ora9/product/9.2/rdbms/lib/skgaioi.o && echo /oracle/ora9/product/9.2/rdbms/lib/skgaioi.o` /oracle/ora9/product/9.2/rdbms/lib/opimai.o /oracle/ora9/product/9.2/rdbms/lib/ssoraed.o /oracle/ora9/product/9.2/rdbms/lib/ttcsoi.o /oracle/ora9/product/9.2/lib/nautab.o /oracle/ora9/product/9.2/lib/naeet.o /oracle/ora9/product/9.2/lib/naect.o /oracle/ora9/product/9.2/lib/naedhs.o /oracle/ora9/product/9.2/rdbms/lib/config.o -lserver9 -lodm9 -lskgxp9 -lskgxn9 -lclient9 -lvsn9 -lwtcserver9 -lcommon9 -lgeneric9 /oracle/ora9/product/9.2/rdbms/lib/defopt.o -lknlopt `if /usr/bin/ar tv /oracle/ora9/product/9.2/rdbms/lib/libknlopt.a | grep xsyeolap.o > /dev/null 2>&1 ; then echo "-loraolap9" ; fi` -lslax9 -lpls9 -lplp9 -lserver9 -lclient9 -lvsn9 -lwtcserver9 -lcommon9 -lgeneric9 -lknlopt -lslax9 -lpls9 -lplp9 -ljox9 -lserver9 -locijdbcst9 -lwwg9 `cat /oracle/ora9/product/9.2/lib/ldflags` -lnsslb9 -lncrypt9 -lnsgr9 -lnzjs9 -ln9 -lnl9 -lnro9 `cat /oracle/ora9/product/9.2/lib/ldflags` -lnsslb9 -lncrypt9 -lnsgr9 -lnzjs9 -ln9 -lnl9 -lmm -lnls9 -lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9 `cat /oracle/ora9/product/9.2/lib/ldflags` -lnsslb9 -lncrypt9 -lnsgr9 -lnzjs9 -ln9 -lnl9 -lnro9 `cat /oracle/ora9/product/9.2/lib/ldflags` -lnsslb9 -lncrypt9 -lnsgr9 -lnzjs9 -ln9 -lnl9 -ltrace9 -lnls9 -lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9 `if /usr/bin/ar tv /oracle/ora9/product/9.2/rdbms/lib/libknlopt.a | grep "kxmnsd.o" > /dev/null 2>&1 ; then echo " " ; else echo "-lordsdo9"; fi` -lctxc9 -lctx9 -lzx9 -lgx9 -lctx9 -lzx9 -lgx9 -lordimt9 -lnls9 -lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9 -lsnls9 -lunls9 -lxsd9 -lnls9 -lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9 `cat /oracle/ora9/product/9.2/lib/sysliblist` -Wl,-rpath,/oracle/ora9/product/9.2/lib:/lib/i686:/lib:/usr/lib -lm `cat /oracle/ora9/product/9.2/lib/sysliblist` -ldl -lm `test -f /oracle/ora9/product/9.2/rdbms/lib/skgaioi.o && echo -laio`
mv -f /oracle/ora9/product/9.2/bin/oracle /oracle/ora9/product/9.2/bin/oracleO
mv /oracle/ora9/product/9.2/rdbms/lib/oracle /oracle/ora9/product/9.2/bin/oracle
chmod 6751 /oracle/ora9/product/9.2/bin/oracle
*********************************************************************************
[oracle@westzq1 lib]$ /oracle/ora9/product/9.2/bin/gsdctl stop
Successfully stopped GSD on local node
[oracle@westzq1 lib]$ ps -ef|grep oracm
oracle 5398 1 0 00:05 pts/1 00:00:00 oracm
oracle 5399 5398 0 00:05 pts/1 00:00:00 oracm
oracle 5401 5399 0 00:05 pts/1 00:00:00 oracm
oracle 5402 5399 0 00:05 pts/1 00:00:00 oracm
oracle 5403 5399 0 00:05 pts/1 00:00:00 oracm
oracle 5404 5399 0 00:05 pts/1 00:00:00 oracm
oracle 5405 5399 0 00:05 pts/1 00:00:00 oracm
oracle 5406 5399 0 00:05 pts/1 00:00:02 oracm
oracle 5407 5399 0 00:05 pts/1 00:00:00 oracm
oracle 5423 5399 0 00:05 pts/1 00:00:00 oracm
oracle 8846 6806 0 00:35 pts/1 00:00:00 grep oracm
[oracle@westzq1 lib]$ kill -9 5398
*********************************************************************************
SQL> startup pfile='/tmp/init.ora';
ORACLE instance started.
Total System Global Area 135336712 bytes
Fixed Size 451336 bytes
Variable Size 109051904 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.
SQL> create spfile from pfile='/tmp/init.ora';
File created.
*********************************************************************************
SQL> select * from v$thread;
THREAD# STATUS ENABLED GROUPS INSTANCE OPEN_TIME CURRENT_GROUP# SEQUENCE# CHECKPOINT_CHANGE# CHECKPOIN
---------- ------ -------- ---------- ---------------- --------- -------------- ---------- ------------------ ---------
ENABLE_CHANGE# ENABLE_TI DISABLE_CHANGE# DISABLE_T
-------------- --------- --------------- ---------
1 OPEN PUBLIC 2 single 30-AUG-09 1 51 2185600 30-AUG-09
1 02-DEC-08 0
2 CLOSED DISABLED 2 rac9i2 29-SEP-09 0 15 2185307 29-SEP-09
62222 02-DEC-08 2185416 30-AUG-09
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
1 1 51 26214400 1 NO CURRENT 2185600 30-AUG-09
2 1 50 26214400 1 YES INACTIVE 2185583 30-AUG-09
3 2 15 26214400 1 YES INACTIVE 2185254 29-SEP-09
4 2 14 26214400 1 YES INACTIVE 2185247 29-SEP-09
SQL> alter database drop logfile group 3;
Database altered.
SQL> alter database drop logfile group 4;
Database altered.
SQL> select * from v$thread;
THREAD# STATUS ENABLED GROUPS INSTANCE OPEN_TIME CURRENT_GROUP# SEQUENCE# CHECKPOINT_CHANGE# CHECKPOIN
---------- ------ -------- ---------- ---------------- --------- -------------- ---------- ------------------ ---------
ENABLE_CHANGE# ENABLE_TI DISABLE_CHANGE# DISABLE_T
-------------- --------- --------------- ---------
1 OPEN PUBLIC 2 single 30-AUG-09 1 51 2185600 30-AUG-09
1 02-DEC-08 0
*********************************************************************************
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 135336712 bytes
Fixed Size 451336 bytes
Variable Size 109051904 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.
SQL>
*********************************************************************************
需要注意的:
初始化引數修改
執行緒的DISABLE和日誌組的DROP
ORACLE RAC選項的關閉,不關閉單例項下啟動還是需要叢集件的支援
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8242091/viewspace-613556/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 將RAC軟體轉換為單例項軟體單例
- oracle單例項轉RACOracle單例
- oracle 9i single instance convert to rac databaseOracleDatabase
- Oracle 9i RAC向單例項遷移手記Oracle單例
- RAC+單例項DG的切換單例
- js將物件轉換為字串程式碼例項JS物件字串
- 從單例項資料庫轉換到RAC環境——RAC的建立和配置單例資料庫
- 數字轉換為中文大寫例項程式碼
- js將字串轉換為xml物件程式碼例項JS字串XML物件
- javascript將字串轉換為陣列程式碼例項JavaScript字串陣列
- js將字串轉換為數字程式碼例項JS字串
- javascript將字串轉換為整數程式碼例項JavaScript字串
- javascript將物件轉換為數字程式碼例項JavaScript物件
- 在 RHEL3 上將單一例項資料庫轉換為 Oracle RAC 10g (轉載)資料庫Oracle
- 將時間戳轉換為時間例項程式碼時間戳
- js將字串轉換為編碼序列程式碼例項JS字串
- js將漢字轉換為拼音程式碼例項JS
- js將小數轉換為整數程式碼例項JS
- js將陣列元素轉換為字串程式碼例項JS陣列字串
- javascript將字串轉換為十六進位制程式碼例項JavaScript字串
- 將時間戳轉換為時間日期程式碼例項時間戳
- js 將xml轉換為table表格簡單程式碼例項JSXML
- javascript將類陣列轉換為陣列程式碼例項JavaScript陣列
- 數字轉換為漢字大寫形式程式碼例項
- 9204RAC到單例項的SWITCHOVER切換單例
- 如何將獨立例項轉換成叢集例項EU
- (轉)Oracle rac環境下清除asm例項OracleASM
- zt_real application cluster恢復為單例項single instanceAPP單例
- Linux的nat埠轉換例項Linux
- Python的時間轉換 【例項】Python
- 將json格式物件轉換為查詢字串程式碼例項JSON物件字串
- js將小數轉換為整數簡單程式碼例項JS
- javascript將數字轉換為十六進位制程式碼例項JavaScript
- 十六進位制顏色轉換為RGB程式碼例項
- 將表單元素轉換為json格式物件例項程式碼JSON物件
- CSS將英文字元轉換為小寫例項程式碼CSS字元
- 【RAC】將單例項備份集恢復為rac資料庫單例資料庫
- 【RAC】將RAC備份集恢復為單例項資料庫單例資料庫