ºìÁªLinuxÃÅ»§
Linux°ïÖú

ÔÚORACLEÖÐÒƶ¯Êý¾Ý¿âÎļþ

·¢²¼Ê±¼ä:2006-02-20 00:42:10À´Ô´:ºìÁª×÷Õß:yy123
---- ORACLEÊý¾Ý¿âÓÉÊý¾ÝÎļþ£¬¿ØÖÆÎļþºÍÁª»úÈÕÖ¾ÎļþÈýÖÖÎļþ×é³É¡£ÓÉÓÚ´ÅÅÌ¿Õ¼äµÄ±ä»¯£¬»òÕß»ùÓÚÊý¾Ý¿â´ÅÅÌI/OÐÔÄܵĵ÷ÕûµÈ£¬Êý¾Ý¿â¹ÜÀíÔ±¿ÉÄܻῼÂÇÒƶ¯Êý¾Ý¿âÎļþ¡£ÏÂÃæÒÔUNIXƽ̨ΪÀý£¬·Ö±ðÌÖÂÛÈýÖÖÊý¾Ý¿âÎļþµÄÒƶ¯·½·¨¡£

---- Ò».Òƶ¯Êý¾ÝÎļþ£º

---- ¿ÉÒÔÓÃALTER DATABASE£¬ALTER TABLESPACEÁ½ÖÖ·½·¨Òƶ¯Êý¾ÝÎļþ¡£

---- 1. ALTER DATABASE·½·¨£»

---- Óô˷½·¨£¬¿ÉÒÔÒƶ¯Èκαí¿Õ¼äµÄÊý¾ÝÎļþ¡£

---- STEP 1. ÏÂÊý¾Ý¿â£º

$ svrmgrl
SVRMGR > CONNECT INTERNAL;
SVRMGR > SHUTDOWN;
SVRMGR > EXIT;

---- STEP 2.ÓòÙ×÷ϵͳÃüÁîÒƶ¯Êý¾ÝÎļþ£º
---- ½«Êý¾ÝÎļþ 'app1_data.ora' ´Ó/ora/oracle7/data1Ŀ¼Òƶ¯µ½/ora/oracle7/data2Ŀ¼Ï£º
---- $ mv /ora/oracle7/data1/app1_data.ora /ora/oracle7/data2

---- STEP 3. MountÊý¾Ý¿â£¬ÓÃALTER DATABASEÃüÁÊý¾ÝÎļþ¸ÄÃû£º

---- $ svrmgrl

SVRMGR > CONNECT INTERNAL;
SVRMGR > STARTUP MOUNT;
SVRMGR > ALTER DATABASE RENAME FILE
2 > '/ora/oracle7/data1/app1_data.ora ' TO
3 > '/ora/oracle7/data2/app1_data.ora;

STEP 4. ´ò¿ªÊý¾Ý¿â£º.
SVRMGR > ALTER DATABASE OPEN;
SVRMGR >SELECT NAME,STATUS FROM V$DATAFILE£»

---- 2. ALTER TABLESPACE·½·¨£º
---- Óô˷½·¨£¬ÒªÇó´ËÊý¾ÝÎļþ¼È²»ÊôÓÚSYSTEM±í¿Õ¼ä£¬Ò²²»ÊôÓÚº¬ÓÐACTIVE»Ø¹ö¶Î»òÁÙʱ¶ÎµÄ±í¿Õ¼ä¡£

---- STEP1. ½«´ËÊý¾ÝÎļþËùÔڵıí¿Õ¼äOFFLINE£º

$ svrmgrl
SVRMGR > CONNECT INTERNAL;
SVRMGR > ALTER TABLESPACE app1_data OFFLINE;
SVRMGR > EXIT;

STEP2. ÓòÙ×÷ϵͳÃüÁîÒƶ¯Êý¾ÝÎļþ£º
½«Êý¾ÝÎļþ 'app1_data.ora' ´Ó/ora/oracle7/
data1Ŀ¼Òƶ¯µ½/ora/oracle7/data2Ŀ¼Ï£º
$ mv /ora/oracle7/data1/app1_data.ora /ora/oracle7/data2

STEP3. ÓÃALTER TABLESPACEÃüÁî¸ÄÊý¾ÝÎļþÃû£º
$ svrmgrl
SVRMGR > CONNECT INTERNAL;
SVRMGR > ALTER TABLESPACE app1_data RENAME DATAFILE
2 > '/ora/oracle7/data 1/app1_data.ora' TO
3 > '/ora/oracle7/data2/app1_data.ora;

STEP4. ½«´ËÊý¾ÝÎļþËùÔڵıí¿Õ¼äONLINE£º
SVRMGR > ALTER TABLESPACE app1_data ONLINE;
SVRMGR > SELECT NAME,STATUS FROM V$DATAFILE£»

---- ¶þ. Òƶ¯¿ØÖÆÎļþ£º

---- ¿ØÖÆÎļþ ÔÚ INIT.ORAÎļþÖÐÖ¸¶¨¡£Òƶ¯¿ØÖÆÎļþÏà¶Ô±È½Ï¼òµ¥£¬ÏÂÊý¾Ý¿â£¬±à¼­INIT.ORA£¬Òƶ¯¿ØÖÆÎļþ£¬ÖØÆô¶¯Êý¾Ý¿â¡£

STEP 1. ÏÂÊý¾Ý¿â£º
$ svrmgrl
SVRMGR > CONNECT INTERNAL;
SVRMGR > SHUTDOWN;
SVRMGR > EXIT;

STEP 2.ÓòÙ×÷ϵͳÃüÁî Òƶ¯¿ØÖÆÎļþ£º
½«¿ØÖÆÎļþ'ctl3orcl.ora' ´Ó/ora/oracle7
/data1Ŀ¼Òƶ¯µ½/ora/oracle7/data2Ŀ¼Ï£º
$ mv /ora/oracle7/data 1/ctrl3orcl.ora
/ora/oracle7/data2

STEP 3. ±à¼­INIT.ORAÎļþ£º
INIT.ORAÎļþµÄÔÚ$ORACLE_HOME/dbsĿ¼Ï£¬
Ð޸IJÎÊý "control_files"£¬ÆäÖÐÖ¸¶¨Òƶ¯ºóµÄ¿ØÖÆÎļþ£º
control_files = (/ora/oracle7/data 1/ctrl1orcl.ora,
/ora/oracle7/data1/ctrl2orcl.ora,
/ora/oracle7/data2/ctrl3orcl.ora)

STEP 4. ÖØÆô¶¯Êý¾Ý¿â£º
$ svrmgrl
SVRMGR > CONNECT INTERNAL;
SVRMGR > STARTUP;
SVRMGR >SELECT name FROM V$CONTROLFILE;
SVRMGR > EXIT;


---- Èý. Òƶ¯Áª»úÈÕÖ¾Îļþ£º
STEP 1. Í£Êý¾Ý¿â£º
$ svrmgrl
SVRMGR > CONNECT INTERNAL;
SVRMGR > SHUTDOWN;
SVRMGR > EXIT;

STEP 2. ÓòÙ×÷ϵͳÃüÁîÒƶ¯Áª»úÈÕÖ¾Îļþ£º
½«Áª»úÈÕÖ¾Îļþ'redolog1.ora' ´Ó/ora/oracle7
/data1Ŀ¼Òƶ¯µ½/ora/oracle7/data2Ŀ¼Ï£º
$ mv /ora/oracle7/data 1/redolog1.ora
/ora/oracle7/data2

STEP 3. MountÊý¾Ý¿â£¬ÓÃALTER DATABASE
ÃüÁî¸ÄÁª»úÈÕÖ¾ÎļþÃû£º.
$ svrmgrl
SVRMGR > CONNECT INTERNAL;
SVRMGR > STARTUP MOUNT CC1;
SVRMGR > ALTER DATABASE RENAME FILE
2 > '/ora/oracle7/data 1/redolog1.ora' TO
3 > '/ora/oracle7/data 2/redolog1.ora';

STEP 4.ÖØÆô¶¯Êý¾Ý¿â£º .
SVRMGR > ALTER DATABASE OPEN;
SVRMGR >SELECT MEMBER FROM V$LOGFILE
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 2 ÌõÆÀÂÛ

  1. davemac ÓÚ 2012-01-19 15:17:40·¢±í:

    ѧϰÏÂ

  2. dongyichen ÓÚ 2011-08-05 08:52:45·¢±í:

    ²»´í~ÆÚ´ý»Ö¸´±¸·ÝµÄÎÄÕÂ~