Oracle set newname for database %b的作用

点击查看代码
例如原数据库的目录是/data/aaa/user.dbf ,%b参数会读取到user.dbf而不读取/data/aaa/目录,
使用set newname for database可以指定新目录进行恢复。

run{
allocate channel c1 device type disk;
set newname for database to '/oradata/aaa/%b';
restore database;
switch datafile all;
switch tempfile all;
release channel c1;
}
posted @ 2025-10-29 16:41  夜说  阅读(7)  评论(0)    收藏  举报