[20201103]set newname for datafile.txt
[20201103]set newname for datafile.txt
--//在rman克隆或者不完全恢復時,經常需要執行如上類似命令:
SELECT 'set newname for datafile '
|| file#
|| ' to ''&1'
|| SUBSTR (name, INSTR (name, '/', -1) + 1)
|| ''';'
c120
FROM v$dbfile
ORDER BY FILE#;
--//生成的指令碼在加入頭尾就ok了:
run
{
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
set until time '2020-11-02 05:30:00';
....
restore database;
switch datafile all;
recover database;
release channel c1;
release channel c2;
release channel c3;
}
--//注意環境變數,設定如下,不然可能日期格式不對。
$ env | grep -i nls
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
NLS_TIME_TZ_FORMATx=HH24.MI.SSXFF TZH:TZM
NLS_TIMESTAMP_TZ_FORMAT=YYYY-MM-DD HH24:MI:SS.FF TZH:TZM
NLS_TIMESTAMP_FORMAT=YYYY-MM-DD HH24:MI:SS.FF
NLS_DATE_FORMAT=YYYY-MM-DD HH24:MI:SS
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2731771/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [20201103]Martian Packets.txt
- [20201103]lsof顯示link=0的檔案.txt
- set /?
- Set
- lombok get/set 與 JavaBean get/setLombokJavaBean
- [Javascript] Perform Set Operations using JavaScript Set MethodsJavaScriptORM
- Jet Set
- set -o
- set -e
- Vue.set與vue.$set的使用Vue
- 訓練集(train set),驗證集(validation set)和測試集(test set)AI
- alter system set event和set events的區別
- Set 和Map
- dict和set
- Set delete() 方法delete
- URLSearchParams set() 方法
- JavaScript Set物件JavaScript物件
- 2020.11.21 Set介面
- set excel formatExcelORM
- Redis之setRedis
- Set介面_network
- Python set(集合)Python
- STL使用篇__set
- Java™ 教程(Set介面)Java
- Set size 屬性
- HashMap類,Set介面。HashMap
- Set-matrix-zeroes
- python:get和setPython
- 7.91 FEATURE_SET
- 7.50 CLUSTER_SET
- vue的set apiVueAPI
- 淺說 get set
- set_time_limitMIT
- JavaScript Set與WeakSetJavaScript
- Reflect.set() 方法
- C# Get SetC#
- 六、redis之setRedis
- Set<String>和JTextField