With the continuous development and increase of the technical environment, the O & M department is facing two trends: large-scale and complex. One or two O & M personnel can manage hundreds of servers in the company in the future. At this time, the centralized monitoring and automatic O & M platform is the best solution to the problem. This article describes a small problem that occurs when you switch to the centralized backup environment.
-------------------------------------- Split line --------------------------------------
Recommended reading:
RMAN: Configure an archive log deletion policy
Basic Oracle tutorial-copying a database through RMAN
Reference for RMAN backup policy formulation
RMAN backup learning notes
Oracle Database Backup encryption RMAN Encryption
-------------------------------------- Split line --------------------------------------
1. Problem Description
An Oracle server that was originally running in a Windows environment was backed up using a script written on the server. The execution script is called and executed through scheduled tasks in windows, so there is no problem for a long time.
One day, my colleague in charge of the server suddenly contacted us and said that the backup process failed for several days. The log clearly shows the failure.
In general, the various configurations in the production environment are relatively stable and there will be no special changes. I want to view the error log.
Recovery MANAGER: Release 10.2.0.1.0-Production on Saturday January 4 22:13:05 2014
Copyright (c) 1982,200 5, Oracle. All rights reserved.
RMAN> connect target *
2> run {
3> backup database plus archivelog delete input;
4> crosscheck archivelog all;
5> delete noprompt expired backupset;
6> delete noprompt obsolete;
7>}
8>
RMAN-00571: ========================================================== ==============================
RMAN-00569: ==================== error message stack follows ==========================
RMAN-00571: ========================================================== ==============================
ORA-01031: insufficient privileges
The recovery manager is complete.
If the error message does not contain a statement command, the execution permission is incorrect. The previous logs show that the same backup has never been executed and the script has not been modified.
2. Problem Analysis
The call script contains two files: BAT files for Windows and txt files for RMAN. Rman_bk.bat is the main execution object. The script is as follows:
Rman nocatalog @backup_command.txt Log = rman_log1.log append
The Command Script backup_command.txt is as follows:
Connect target/
Run {
Backup database plus archivelog delete input;
Crosscheck archivelog all;
Delete noprompt expired backupset;
Delete noprompt obsolete;
}
An error is reported when an operating system user logs on anonymously. In this case, you can test whether the user of the operating system can log on with sqlplus.
The default logon mechanism is not modified. Manually execute the bat file. The experiment results are as follows:
The execution process seems to be normal. The backup log information is as follows:
Recovery MANAGER: Release 10.2.0.1.0-Production on Wednesday January 8 17:12:47 2014
Copyright (c) 1982,200 5, Oracle. All rights reserved.
RMAN> connect target *
2> run {
3> backup database plus archivelog delete input;
4> crosscheck archivelog all;
5> delete noprompt expired backupset;
6> delete noprompt obsolete;
7>}
8>
Connect to the target database: OTSTEST (DBID = 2884314031)
Use the target database control file to replace the recovery directory
Start backup in month-14
The current log is archived.
Allocated channel: ORA_DISK_1
Channel ORA_DISK_1: sid = 132 devtype = DISK
Channel ORA_DISK_1: archiving log backup set is being started
(Space reasons, omitted ......)
Input archiving log thread = 1 sequence = 4151 Record ID = 1144 timestamp = 835178418
There is no problem with manually executing the script. Seemingly strange problem ~
For more details, please continue to read the highlights on the next page: