涓€銆佸叧搴撲慨鏀规枃浠朵綅缃?/h2>
1.杩炴帴鍒版暟鎹簱
[oracle@linux]$ ./sqlplus /nolog
SQL> conn / as sysdba
2. 鏌ョ湅鏁版嵁鏂囦欢浣嶇疆
SQL> select name from v$datafile;
FILE_NAME
------------------------------------------------------------------------
/oradata/PMPTGDB/users01.dbf
/oradata/PMPTGDB/undotbs01.dbf
/oradata/PMPTGDB/sysaux01.dbf
/oradata/PMPTGDB/system01.dbf
/oradata/PMPTGDB/work.dbf
3. 鍏抽棴鏁版嵁搴?/p>
SQL> shutdown immediate;
4. 绉诲姩鏂囦欢鍒版柊鐨勪綅缃?姣斿鏂扮殑浣嶇疆涓?media/hdd1/oradata/PMPTGDB )
cd /oradata/PMPTGDB/
mv users01.dbf undotbs01.dbf sysaux01.dbf system01.dbf work.dbf /media/hdd1/oradata/PMPTGDB
5. 浠ount妯″紡鍚姩鏁版嵁搴?/p>
SQL> startup mount;
SQL> alter database rename file 鈥?oradata/PMPTGDB/users01.dbf鈥? to 鈥?media/hdd1/oradata/PMPTGDB/users01.dbf 鈥?
瀵规瘡涓€涓绉诲姩鐨勬枃浠堕噸澶嶆墽琛屼笂闈㈢殑alter database rename file ... to ...
6. 鎵撳紑鏁版嵁搴?/p>
SQL> alter database open;
鍐嶆鏌ョ湅鏂囦欢浣嶇疆锛屽彂鐜板凡缁忔洿璇ャ€?/p>
浜屻€佸湪绾夸慨鏀?/h2>
鏂规硶1:琛ㄧ┖闂磑ffline
涓昏姝ラ锛?/p>
1銆乷ffline琛ㄧ┖闂达細alter tablespace tablespace_name offline;
2銆佸鍒舵暟鎹枃浠跺埌鏂扮殑鐩綍锛?/p>
3銆乺ename淇敼琛ㄧ┖闂达紝骞朵慨鏀规帶鍒舵枃浠讹紱
4銆乷nline琛ㄧ┖闂达紱
1
2
3
4
5
|
select file_name,tablespace_name,online_status from dba_data_files; alter tablespace TS_MCC offline; host mv /oracle/app/orcldata/orcl/ts_mcc_1 .dat /data/ts_mcc_1 .dat alter database rename file 鈥?oracle/app/orcldata/orcl/ts_mcc_1.dat鈥?/code> alter tablespace TS_MCC online; |