简体   繁体   English

RMAN日志实时更新

[英]RMAN log update in real time

I am using below code in a script and running them in automated fashion 我在脚本中使用以下代码,并以自动化方式运行它们

#!/bin/bash
rman "user"/"xxx"d@rman target=/ | tee run1.restore.log

run {
allocate channel ch1;
restore database;
switch datafile all;
recover database;
}

Now the problem is my log file is getting update only once complete restore/recover is done. 现在的问题是,只有完成完整的还原/恢复后,我的日志文件才会更新。 I want to get the log file updated in real time so i can keep track the restore progress. 我想实时更新日志文件,以便我可以跟踪还原进度。 I tried RMAN logfile feature as well but no luck. 我也尝试了RMAN日志文件功能,但是没有运气。

Try the log parameter of rman like this: 试试这样的rman的log参数:

rman target=user/pwd@dbname log='logpath.log'

Or you can spool the log within RMAN prompt like this: 或者您可以在RMAN提示符下假脱机记录,如下所示:

RMAN> SPOOL LOG to 'logpath.log'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM