oracle ORA-19602: 无法在 NOARCHIVELOG 模式下备份或复制活动文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/35866942/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode
提问by Neelam Sharma
We are working with Oracle 11g
database on Windows 8 and 10 OS environments. We need to dump (backup) database and then restore that dumped file into another oracle database, so we are trying Recovery Manager (RMAN)
for it. We issues following commands :
我们正在Oracle 11g
Windows 8 和 10 操作系统环境中使用数据库。我们需要转储(备份)数据库,然后将该转储的文件还原到另一个 oracle 数据库中,因此我们正在尝试Recovery Manager (RMAN)
这样做。我们发出以下命令:
C:\Users\Admin>rman Recovery Manager: Release 11.2.0.1.0 - Production on Tue Mar 8 17:24:43 2016 Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved. RMAN> connect target / connected to target database: MYEMP (DBID=42934358) RMAN> backup database; Starting backup at 08-MAR-16 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=133 device type=DISK channel ORA_DISK_1: starting full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup set RMAN-03009: failure of backup command on ORA_DISK_1 channel at 03/08/2016 17:25:00 ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode continuing other job steps, job failed will not be re-run channel ORA_DISK_1: starting full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup set including current control file in backup set including current SPFILE in backup set channel ORA_DISK_1: starting piece 1 at 08-MAR-16 RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03009: failure of backup command on ORA_DISK_1 channel at 03/08/2016 17:25:02 ORA-19504: failed to create file "C:\USERS\ADMIN\DESKTOPTEST\DATABASEBACKUP" ORA-27038: created file already exists OSD-04010: <create> option specified, file already exists
C:\Users\Admin>rman Recovery Manager: Release 11.2.0.1.0 - Production on Tue Mar 8 17:24:43 2016 Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved. RMAN> connect target / connected to target database: MYEMP (DBID=42934358) RMAN> backup database; Starting backup at 08-MAR-16 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=133 device type=DISK channel ORA_DISK_1: starting full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup set RMAN-03009: failure of backup command on ORA_DISK_1 channel at 03/08/2016 17:25:00 ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode continuing other job steps, job failed will not be re-run channel ORA_DISK_1: starting full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup set including current control file in backup set including current SPFILE in backup set channel ORA_DISK_1: starting piece 1 at 08-MAR-16 RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03009: failure of backup command on ORA_DISK_1 channel at 03/08/2016 17:25:02 ORA-19504: failed to create file "C:\USERS\ADMIN\DESKTOPTEST\DATABASEBACKUP" ORA-27038: created file already exists OSD-04010: <create> option specified, file already exists
I have tried these to resolve the issue :
我已经尝试过这些来解决这个问题:
RMAN> run {
shutdown immediate;
startup mount;
backup database;
alter database open;
}
But nothing happen, we are getting error. How can I backup Oracle database using RMAN ? OR anything (script) that can help me to generate big database on my oracle server ?
但是什么也没发生,我们收到了错误。如何使用 RMAN 备份 Oracle 数据库?或者任何可以帮助我在我的 oracle 服务器上生成大数据库的东西(脚本)?
回答by John-Rock Bilodeau
I know that this is an older post, but i came across it today as i had the same issue, and found that the provided answers failed to provide a resolution for one thing that the original post attempted to do which is to set the state of the database to open once the backup completes.
我知道这是一篇较旧的帖子,但我今天遇到了它,因为我遇到了同样的问题,并发现所提供的答案未能为原始帖子尝试做的一件事提供解决方案,即设置状态备份完成后要打开的数据库。
According to Oracle
根据甲骨文
To change the state of a target database that is in NOMOUNT or MOUNT state, you must either use SQL*Plus or use the RMAN SQL command to issue a SQL statement, as shown in these examples:
要更改处于 NOMOUNT 或 MOUNT 状态的目标数据库的状态,您必须使用 SQL*Plus 或使用 RMAN SQL 命令来发出 SQL 语句,如以下示例所示:
RMAN> SQL 'ALTER DATABASE OPEN';
https://docs.oracle.com/cd/B19306_01/backup.102/b14192/setup002.htm
https://docs.oracle.com/cd/B19306_01/backup.102/b14192/setup002.htm
So you should be able to do something like
所以你应该能够做类似的事情
RMAN> run
2> {
3> shutdown immediate
4> startup mount
5> backup database;
6> SQL 'ALTER DATABASE OPEN';
7>}
回答by Md Haidar Ali Khan
I would like to say that as one of the error is like that
我想说,因为其中一个错误是这样的
ORA-19602: cannot backup or copy active file in `NOARCHIVELOG` mode
Mostly this error comes when we shall to create a cold backup of the database running in noarchivelog mode using RMAN
, the database should be mounted but not opened. If the database is backed up in the open state, the following error will appear:
大多数情况下,当我们使用 来创建在 noarchivelog 模式下运行的数据库的冷备份时,会出现此错误RMAN
,该数据库应安装但未打开。如果数据库在打开状态下备份,会出现如下错误:
RMAN> backup database;
<....... output trimmed .......>
<....... output trimmed .......>
RMAN-00571: ===========================================================
RMAN-00569: =============== error message stack follows ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at
08/03/2017 11:01:14
The following script shuts down the database and start it in mount mode, and then creates a backup of the database:
以下脚本关闭数据库并以挂载模式启动它,然后创建数据库的备份:
RMAN> run
2> {
3> shutdown immediate
4> startup mount
5> backup database;
6> }
For your further ref Here
供您进一步参考这里
回答by Sabiha
Please try issuing the RMAN commands separately rather than in a single run block. Thanks Sabiha
请尝试单独发出 RMAN 命令,而不是在单个运行块中发出。谢谢萨比哈
回答by Pavel
The command you're trying to utilize for backup seem to be correct, though the log messages state that a file already exists:
您尝试用于备份的命令似乎是正确的,但日志消息表明文件已存在:
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 03/08/2016 17:25:02 ORA-19504: failed to create file "C:\USERS\ADMIN\DESKTOPTEST\DATABASEBACKUP" ORA-27038: created file already exists
RMAN-03009:ORA_DISK_1 通道上的备份命令失败 03/08/2016 17:25:02 ORA-19504:无法创建文件“C:\USERS\ADMIN\DESKTOPTEST\DATABASEBACKUP” ORA-27038:创建的文件已经存在
In order to proceed, it should be fixed. Try to clean up the target backup directory, and try again, running the following command in rman:
为了继续,它应该被修复。尝试清理目标备份目录,然后再试一次,在 rman 中运行以下命令:
run {
shutdown immediate;
startup mount;
backup database;
}
Once the backup process is finished you might want to startup the database.
备份过程完成后,您可能需要启动数据库。
Exit rman and establish a connection to your database via sqlplus, the command would look like the following one:
退出 rman 并通过 sqlplus 建立与数据库的连接,命令如下所示:
sqlplus / as sysdba
and start it:
并启动它:
startup;
回答by yaxe
I had shutdown using shutdown abort
since this cause instance failure so we have to shutdown immediate and then mount the database.
I also tried to enable archiving but that failed too because the instance was failed due to the shutdown abort.
shutdown abort
由于这会导致实例失败,因此我已关闭使用,因此我们必须立即关闭然后挂载数据库。我还尝试启用存档,但也失败了,因为实例因关闭中止而失败。
回答by Raul
What error code you get ?
你得到什么错误代码?
in noarchivelog mode , you cannot take hot database backups, only cold.
在 noarchivelog 模式下,您不能进行热数据库备份,只能进行冷备份。
When you activate archivelog mode ( in mount state), you can track old transaction during the backup time, and can forward the database to time in point recovery.
当您激活归档日志模式(处于挂载状态)时,您可以在备份期间跟踪旧事务,并且可以在点恢复中将数据库转发到时间。