AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • Início
  • system&network
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • Início
  • system&network
    • Recentes
    • Highest score
    • tags
  • Ubuntu
    • Recentes
    • Highest score
    • tags
  • Unix
    • Recentes
    • tags
  • DBA
    • Recentes
    • tags
  • Computer
    • Recentes
    • tags
  • Coding
    • Recentes
    • tags
Início / dba / Perguntas / 42643
Accepted
bbigras
bbigras
Asked: 2013-05-21 12:05:48 +0800 CST2013-05-21 12:05:48 +0800 CST 2013-05-21 12:05:48 +0800 CST

É possível usar 'restaurar ATÉ SCN' com rman e Oracle 9i no modo NOCATALOG?

  • 772

Estou tentando fazer um hot backup com rman que posso copiar para uma unidade USB para recuperá-lo em um novo servidor.

O backup foi feito há dois dias e o restore databasecomando estava funcionando no mesmo dia, então acho que preciso usar UNTIL SCNcom o último SCN, mas receboRMAN-20208: UNTIL CHANGE is before RESETLOGS change

Vi na internet que deveria usar RESET DATABASEmas entendi RMAN-06002: command not allowed when not connected to a recovery cataloge acho que esse procedimento só pode funcionar com Oracle 10 e posterior (estou usando Oracle 9i).

Alguma ideia?

backup em rman

CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'c:/brubru/auto/%F';

run
{
CROSSCHECK BACKUP;
CROSSCHECK COPY;
CROSSCHECK BACKUPSET;
CROSSCHECK COPY OF DATABASE;
CROSSCHECK archivelog all;

allocate channel d1 device type disk format 'c:/brubru/%U.bkp';
BACKUP CHECK LOGICAL DATABASE format ‘c:/brubru/data_%d_%s_%T.bak’ PLUS ARCHIVELOG DELETE INPUT;
release channel d1;
}

Restaurar (em um segundo servidor)

> oradim -new -sid PEM -intpwd sys

> set ORACLE_SID=PEM
> rman target /

Recovery Manager: Release 9.2.0.1.0 - Production

Copyright (c) 1995, 2002, Oracle Corporation.  All rights reserved.

connected to target database (not started)

RMAN> startup nomount
startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file 'C:\ORACLE\ORA92\DATABASE\INITPEM.ORA'

trying to start the Oracle instance without parameter files ...
Oracle instance started

Total System Global Area      97589952 bytes

Fixed Size                      453312 bytes
Variable Size                 46137344 bytes
Database Buffers              50331648 bytes
Redo Buffers                    667648 bytes

RMAN> set dbid 2176828955

executing command: SET DBID

RMAN> RUN {
2>     SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'C:\brubru\auto
\%F';
3>     RESTORE SPFILE FROM AUTOBACKUP;
4> }

executing command: SET CONTROLFILE AUTOBACKUP FORMAT
using target database controlfile instead of recovery catalog

Starting restore at 13-05-20

allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=9 devtype=DISK
channel ORA_DISK_1: looking for autobackup on day: 20130520
channel ORA_DISK_1: looking for autobackup on day: 20130519
channel ORA_DISK_1: looking for autobackup on day: 20130518
channel ORA_DISK_1: autobackup found: C:\brubru\auto\c-2176828955-20130518-00
channel ORA_DISK_1: SPFILE restore from autobackup complete
Finished restore at 13-05-20

RMAN> shutdown immediate

Oracle instance shut down

RMAN> startup nomount

connected to target database (not started)
Oracle instance started

Total System Global Area     135338868 bytes

Fixed Size                      453492 bytes
Variable Size                109051904 bytes
Database Buffers              25165824 bytes
Redo Buffers                    667648 bytes

RMAN> set dbid=2176828955

executing command: SET DBID

RMAN> RUN {
2>     SET CONTROLFILE AUTOBACKUP FORMAT
3>           FOR DEVICE TYPE DISK TO 'C:\brubru\auto\%F';
4>     RESTORE CONTROLFILE FROM AUTOBACKUP;
5> }

executing command: SET CONTROLFILE AUTOBACKUP FORMAT

Starting restore at 13-05-20

allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=13 devtype=DISK
channel ORA_DISK_1: looking for autobackup on day: 20130520
channel ORA_DISK_1: looking for autobackup on day: 20130519
channel ORA_DISK_1: looking for autobackup on day: 20130518
channel ORA_DISK_1: autobackup found: C:\brubru\auto\c-2176828955-20130518-00
channel ORA_DISK_1: controlfile restore from autobackup complete
replicating controlfile
input filename=C:\BDD_ORACLE\ORADATA\PEM\CONTROL01.CTL
output filename=C:\BDD_ORACLE\ORADATA\PEM\CONTROL02.CTL
output filename=C:\BDD_ORACLE\ORADATA\PEM\CONTROL03.CTL
Finished restore at 13-05-20

RMAN> alter database mount;

database mounted

RMAN> run
2> {
3> allocate channel c1 device type disk format 'c:\brubru\%U.bkp';
4> restore database;
5> release channel c1;
6> }

released channel: ORA_DISK_1
allocated channel: c1
channel c1: sid=13 devtype=DISK

Starting restore at 13-05-20

released channel: c1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 05/20/2013 15:53:37
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 15 found to restore
RMAN-06023: no backup or copy of datafile 14 found to restore
RMAN-06023: no backup or copy of datafile 13 found to restore
RMAN-06023: no backup or copy of datafile 12 found to restore
RMAN-06023: no backup or copy of datafile 11 found to restore
RMAN-06023: no backup or copy of datafile 10 found to restore
RMAN-06023: no backup or copy of datafile 9 found to restore
RMAN-06023: no backup or copy of datafile 8 found to restore
RMAN-06023: no backup or copy of datafile 7 found to restore
RMAN-06023: no backup or copy of datafile 6 found to restore
RMAN-06023: no backup or copy of datafile 5 found to restore
RMAN-06023: no backup or copy of datafile 4 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 2 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore

RMAN> list backup;


List of Backup Sets
===================

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
105     737M       DISK        00:00:39     13-05-18
        BP Key: 105   Status: AVAILABLE   Tag: TAG20130518T124955
        Piece Name: C:\BRUBRU\39O9ULFK_1_1.BKP

  List of Archived Logs in backup set 105
  Thrd Seq     Low SCN    Low Time Next SCN   Next Time
  ---- ------- ---------- -------- ---------- ---------
  1    1156    245177104  13-05-11 245458552  13-05-12
  1    1157    245458552  13-05-12 245647641  13-05-13
  1    1158    245647641  13-05-13 245857439  13-05-14
  1    1159    245857439  13-05-14 246084782  13-05-15
  1    1160    246084782  13-05-15 246304002  13-05-16
  1    1161    246304002  13-05-16 246519120  13-05-17
  1    1162    246519120  13-05-17 246722961  13-05-18
  1    1163    246722961  13-05-18 246779464  13-05-18

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
106     Full    1G         DISK        00:02:14     13-05-18
        BP Key: 106   Status: AVAILABLE   Tag: TAG20130518T125043
        Piece Name: C:\BRUBRU\DATA_PEM_106_20130518.BAK
  List of Datafiles in backup set 106
  File LV Type Ckp SCN    Ckp Time Name
  ---- -- ---- ---------- -------- ----
  1       Full 246779607  13-05-18 C:\BDD_ORACLE\ORADATA\PEM\SYSTEM01.DBF
  2       Full 246779607  13-05-18 C:\BDD_ORACLE\ORADATA\PEM\UNDOTBS01.DBF
  3       Full 246779607  13-05-18 C:\BDD_ORACLE\ORADATA\PEM\CWMLITE01.DBF
  4       Full 246779607  13-05-18 C:\BDD_ORACLE\ORADATA\PEM\DRSYS01.DBF
  5       Full 246779607  13-05-18 C:\BDD_ORACLE\ORADATA\PEM\EXAMPLE01.DBF
  6       Full 246779607  13-05-18 C:\BDD_ORACLE\ORADATA\PEM\INDX01.DBF
  7       Full 246779607  13-05-18 C:\BDD_ORACLE\ORADATA\PEM\ODM01.DBF
  8       Full 246779607  13-05-18 C:\BDD_ORACLE\ORADATA\PEM\TOOLS01.DBF
  9       Full 246779607  13-05-18 C:\BDD_ORACLE\ORADATA\PEM\USERS01.DBF
  10      Full 246779607  13-05-18 C:\BDD_ORACLE\ORADATA\PEM\XDB01.DBF
  11      Full 246779607  13-05-18 C:\BDD_ORACLE\ORADATA\PEM\USER.ORA
  12      Full 246779607  13-05-18 C:\BDD_ORACLE\ORADATA\PEM\GDR2.ORA
  13      Full 246779607  13-05-18 C:\BDD_ORACLE\ORADATA\PEM\USR.ORA
  14      Full 246779607  13-05-18 C:\BDD_ORACLE\ORADATA\RMAN\RMAN01.DBF
  15      Full 246779607  13-05-18 C:\BDD_ORACLE\ORADATA\RMAN3\RMAN301.DBF

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
107     163K       DISK        00:00:01     13-05-18
        BP Key: 107   Status: AVAILABLE   Tag: TAG20130518T125258
        Piece Name: C:\BRUBRU\3BO9ULLA_1_1.BKP

  List of Archived Logs in backup set 107
  Thrd Seq     Low SCN    Low Time Next SCN   Next Time
  ---- ------- ---------- -------- ---------- ---------
  1    1164    246779464  13-05-18 246779907  13-05-18

RMAN> run
2> {
3> allocate channel c1 device type disk format 'c:\brubru\%U.bkp';
4> set until SCN 246779907;
5> restore database;
6> release channel c1;
7> }

allocated channel: c1
channel c1: sid=13 devtype=DISK

executing command: SET until clause
released channel: c1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of set command at 05/20/2013 15:59:11
RMAN-20208: UNTIL CHANGE is before RESETLOGS change

RMAN> LIST INCARNATION;


List of Database Incarnations
DB Key  Inc Key DB Name  DB ID            CUR Reset SCN  Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1       1       PEM      2176828955       NO  190578     10-02-10
2       2       PEM      2176828955       YES 246779908  13-05-18

RMAN> RESET DATABASE TO INCARNATION 1;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of reset command at 05/20/2013 15:55:33
RMAN-06002: command not allowed when not connected to a recovery catalog
oracle rman
  • 1 1 respostas
  • 4297 Views

1 respostas

  • Voted
  1. Best Answer
    kubanczyk
    2014-07-16T08:56:38+08:002014-07-16T08:56:38+08:00

    Sim, este cenário é possível no modo NOCATALOG. Fiz exatamente isso no 9.2 no último sábado, então posso garantir :) Sua tentativa quase foi bem-sucedida. A única coisa que você fez de errado foi restaurar o arquivo de controle que era muito novo, estava acima Reset SCN 246779908de . Se você se mudar C:\brubru\auto\c-2176828955-20130518-00, provavelmente encontrará um arquivo de controle um pouco mais antigo e a restauração será bem-sucedida. Certifique LIST INCARNATIONS-se de que não exibe a nova encarnação - controlfile não deve saber disso.

    • 1

relate perguntas

  • Backups de banco de dados no Oracle - Exportar o banco de dados ou usar outras ferramentas?

  • ORDER BY usando prioridades personalizadas para colunas de texto

  • Interface sqlplus confortável? [fechado]

  • Como encontrar as instruções SQL mais recentes no banco de dados?

  • Como posso consultar nomes usando expressões regulares?

Sidebar

Stats

  • Perguntas 205573
  • respostas 270741
  • best respostas 135370
  • utilizador 68524
  • Highest score
  • respostas
  • Marko Smith

    Como fazer a saída do sqlplus aparecer em uma linha?

    • 3 respostas
  • Marko Smith

    Selecione qual tem data máxima ou data mais recente

    • 3 respostas
  • Marko Smith

    Como faço para listar todos os esquemas no PostgreSQL?

    • 4 respostas
  • Marko Smith

    Conceder acesso a todas as tabelas para um usuário

    • 5 respostas
  • Marko Smith

    Listar todas as colunas de uma tabela especificada

    • 5 respostas
  • Marko Smith

    Como usar o sqlplus para se conectar a um banco de dados Oracle localizado em outro host sem modificar meu próprio tnsnames.ora

    • 4 respostas
  • Marko Smith

    Como você mysqldump tabela (s) específica (s)?

    • 4 respostas
  • Marko Smith

    Listar os privilégios do banco de dados usando o psql

    • 10 respostas
  • Marko Smith

    Como inserir valores em uma tabela de uma consulta de seleção no PostgreSQL?

    • 4 respostas
  • Marko Smith

    Como faço para listar todos os bancos de dados e tabelas usando o psql?

    • 7 respostas
  • Martin Hope
    Stéphane Como faço para listar todos os esquemas no PostgreSQL? 2013-04-16 11:19:16 +0800 CST
  • Martin Hope
    Mike Walsh Por que o log de transações continua crescendo ou fica sem espaço? 2012-12-05 18:11:22 +0800 CST
  • Martin Hope
    Stephane Rolland Listar todas as colunas de uma tabela especificada 2012-08-14 04:44:44 +0800 CST
  • Martin Hope
    haxney O MySQL pode realizar consultas razoavelmente em bilhões de linhas? 2012-07-03 11:36:13 +0800 CST
  • Martin Hope
    qazwsx Como posso monitorar o andamento de uma importação de um arquivo .sql grande? 2012-05-03 08:54:41 +0800 CST
  • Martin Hope
    markdorison Como você mysqldump tabela (s) específica (s)? 2011-12-17 12:39:37 +0800 CST
  • Martin Hope
    pedrosanta Listar os privilégios do banco de dados usando o psql 2011-08-04 11:01:21 +0800 CST
  • Martin Hope
    Jonas Como posso cronometrar consultas SQL usando psql? 2011-06-04 02:22:54 +0800 CST
  • Martin Hope
    Jonas Como inserir valores em uma tabela de uma consulta de seleção no PostgreSQL? 2011-05-28 00:33:05 +0800 CST
  • Martin Hope
    Jonas Como faço para listar todos os bancos de dados e tabelas usando o psql? 2011-02-18 00:45:49 +0800 CST

Hot tag

sql-server mysql postgresql sql-server-2014 sql-server-2016 oracle sql-server-2008 database-design query-performance sql-server-2017

Explore

  • Início
  • Perguntas
    • Recentes
    • Highest score
  • tag
  • help

Footer

AskOverflow.Dev

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve