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;
}

浙公网安备 33010602011771号