Il processo MRP (Managed Recovery Process) di un database standby si è interrotto con ORA-01111. Nel file di alert compariva questo dettaglio:
File #8 added to control file as 'UNNAMED00008' because the parameter STANDBY_FILE_MANAGEMENT is set to MANUAL The file should be manually created to continue. MRP0: Background Media Recovery terminated with error 1111 Thu Jan 08 11:02:35 2016 Errors in file /u01/oracle/product/11.2.0/diag/rdbms/TEST/test/trace/TEST_mrp0_6436.trc: ORA-01111: name for data file 129 is unknown - rename to correct file ORA-01111: name for data file 129 is unknown - rename to correct file ORA-01110: data file 129: '/u01/oracle/product/11.2.0/dms/UNNAMED00008'
Perché si verifica l'ORA-01111
L'errore nasce quando sul primary viene aggiunto un datafile o un tablespace che non può essere creato automaticamente sullo standby, per motivi come:
standby_file_managementè impostato aMANUAL;- primary e physical standby hanno strutture di directory diverse e
DB_FILE_NAME_CONVERTnon è configurato in modo coerente; - spazio insufficiente o permessi errati sullo standby per creare il file.
Il redo prodotto dal primary contiene le informazioni sul nuovo tablespace, ma con STANDBY_FILE_MANAGEMENT=MANUAL — oppure quando la cartella di destinazione non è individuabile per una conversione nome mancante o errata — il file non viene creato. La voce viene registrata nel controlfile dello standby come UNNAMED0000n nella directory /dbs o /database (a seconda del sistema operativo) e MRP termina.
Soluzione all'ORA-01111
Tutti i passaggi vanno eseguiti sul database standby.
Passo 1 — Verificare che standby_file_management sia MANUAL
SQL> show parameter standby_file_management
NOTA: se si utilizza db_file_name_convert con Data Guard Broker attivo, i parametri vanno modificati tramite il Broker (con il Broker, StandbyFileManagement è per default AUTO):
DGMGRL> edit database '<standby>' set property DbFileNameConvert='/u01','+DATA'; DGMGRL> edit database '<standby>' set property StandbyFileManagement=manual;
Passo 2 — Individuare il file UNNAMED
SQL> select name from v$datafile; NAME --------------------------------------- +DATA/TEST/datafiles/SYSTEM.DBF +DATA/TEST/datafiles/UNDO.DBF +DATA/TEST/datafiles/SYSAUX.DBF +DATA/TEST/datafiles/index1.DBF /u01/oracle/product/11.2.0/dms/UNNAMED00008
Passo 3 — Creare il datafile con il nome corretto
SQL> alter database create datafile '/u01/oracle/product/11.2.0/dms/UNNAMED00008' 2 as '+DATA/TEST/datafiles/appstex.dbf'; -- oppure, per lasciare che sia Oracle a determinare il nome: SQL> alter database create datafile '/u01/oracle/product/11.2.0/dms/UNNAMED00008' as new;
Passo 4 — Verificare il nome del file
SQL> select name from v$datafile; NAME ------------------------------------------------- +DATA/TEST/datafiles/SYSTEM.DBF +DATA/TEST/datafiles/UNDO.DBF +DATA/TEST/datafiles/SYSAUX.DBF +DATA/TEST/datafiles/index1.DBF +DATA/TEST/datafiles/appstex.dbf
Passo 5 — Riportare STANDBY_FILE_MANAGEMENT ad AUTO
SQL> ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT=AUTO scope=both;
Passo 6 — Riavviare MRP (nell'esempio con Real Time Apply)
SQL> alter database recover managed standby database using current logfile disconnect; Database altered.
Passo 7 — Verificare che MRP sia attivo
SQL> select process, status, sequence# from v$managed_standby; PROCESS STATUS SEQUENCE# --------- ------------ ---------- ARCH CLOSING 1014 ARCH CLOSING 1013 MRP0 APPLYING_LOG 1001 RFS IDLE 0 RFS IDLE 0 RFS IDLE 1015
Passo 8 — Correggere la causa all'origine. Verificare che STANDBY_FILE_MANAGEMENT e DB_FILE_NAME_CONVERT siano impostati correttamente e che lo spazio e i permessi siano adeguati, altrimenti l'errore si ripresenterà al prossimo tablespace aggiunto.
Letture correlate
ORA-03113: end-of-file on communication channel
ORA-00257: archiver error. Connect internal only, until freed.
physical standby database
https://support.oracle.com/knowledge/Oracle%20Database%20Products/1416554_1.html