您好,登錄后才能下訂單哦!
小編給大家分享一下oracle11g如何修改數(shù)據(jù)文件路徑,相信大部分人都還不怎么了解,因此分享這篇文章給大家參考一下,希望大家閱讀完這篇文章后大有收獲,下面讓我們一起去了解一下吧!
有時候我們想把數(shù)據(jù)文件移動到其他的目錄下,可以按照如下操作:
查看數(shù)據(jù)文件位置
SQL> select file_name from sys.dba_data_files; FILE_NAME -------------------------------------------------------------------------------- /home/app/oracle/oradata/orahq/users01.dbf /home/app/oracle/oradata/orahq/undotbs01.dbf /home/app/oracle/oradata/orahq/sysaux01.dbf /home/app/oracle/oradata/orahq/system01.dbf
2.關(guān)機(jī)并啟動到mount狀態(tài)
SQL> shutdown immediate; Database closed. Database dismounted. ORACLE instance shut down. SQL> startup mount; ORACLE instance started. Total System Global Area 2.1379E+10 bytes Fixed Size 2262656 bytes Variable Size 1677724032 bytes Database Buffers 1.9663E+10 bytes Redo Buffers 36073472 bytes Database mounted. 3.執(zhí)行修改 SQL> alter database rename file '/home/app/oracle/oradata/orahq/users01.dbf' to '/alidata1/oradata/orahq/users01.dbf'; Database altered. SQL> alter database rename file '/home/app/oracle/oradata/orahq/undotbs01.dbf' to '/alidata1/oradata/orahq/undotbs01.dbf'; Database altered. SQL> alter database rename file '/home/app/oracle/oradata/orahq/sysaux01.dbf' to '/alidata1/oradata/orahq/sysaux01.dbf'; Database altered. SQL> alter database rename file '/home/app/oracle/oradata/orahq/system01.dbf' to '/alidata1/oradata/orahq/system01.dbf'; Database altered.
4.啟動數(shù)據(jù)庫
SQL> alter database open; Database altered.
以上是“oracle11g如何修改數(shù)據(jù)文件路徑”這篇文章的所有內(nèi)容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內(nèi)容對大家有所幫助,如果還想學(xué)習(xí)更多知識,歡迎關(guān)注億速云行業(yè)資訊頻道!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。