Ola pessoal. Segue mais um artigo sobre o Oracle 12c. Dessa vez eu brinquei um pouco com a feature de RECOVER TABLE do RMAN, feature essa que foi uma das mais anunciadas pela Oracle. Essa feature facilita e muito a vida do DBA que precisa realizar o restore de apenas uma ou poucas tabelas corrompidas/truncadas “acidentalmente”. Ela nada mais é do que um Tablespace Point-in-time recovery mais automático, e como consequência disso, menos suscetível a erros.

 

Conceitos iniciais

Para realizar o RECOVER de uma tabela específica, o RMAN cria uma base de dados auxiliar (auxiliary instance) para ser usada durante o recover. O destino dessa base de dados auxiliar é definido pelo comando AUXILIARY DESTINATION. Depois da base ter sido criada, o RMAN realiza um export da tabela dessa base auxiliar e importa seus dados na base principal, via Datapump.

A base auxiliar restaura as tablespaces SYSTEM, SYSAUX, UNDO, SYSEXT (caso presente), e as tablespaces que contenham as tabelas a serem restauradas, portando, deve-se verificar antes do restore, se há espaço suficiente para armazenar essa instância auxiliar (soma das tablespaces SYSTEM, SYSAUX, UNDO, SYSEXT e tablespaces das tabelas a serem restauradas)

O RECOVER TABLE permite recuperar uma ou varias tabelas até um certo sequence#, SCN ou período de tempo – UNTIL [SEQUENCE|SCN|TIME] respectivamente.

A tabela usada para testes foi a seguinte:

[et_pb_dmb_code_snippet _builder_version=”4.0.6″ code=”ICDigJQKICAg4oCUIGRlcG9pcyBkZSBjcmlhciBlc3NhIHRhYmVsYSwgcG92b2VpIGVsYSBjb20gMTAwLjAwMCByZWdpc3Ryb3MKICAg4oCUCgpDUkVBVEUgVEFCTEUgVVNSX1BST0QuVEFCX1RFU1RFU19SRUNPVkVSICgKSURfUkVHSVNUUk8gICBOVU1CRVIgQ09OU1RSQUlOVCBQS19JRF9SRUdfVFNUX1JFQ09WRVIgUFJJTUFSWSBLRVksCkRFU0NSSUNBTyAgICAgVkFSQ0hBUjIoMjAwKSwKQ09ESUdPICAgICAgICBOVU1CRVIgQ09OU1RSQUlOVCBVS19DT0RJR09fMDEgVU5JUVVFLApEQVRBX1JFRyAgICAgIERBVEUKKTs=” hover_enabled=”0″]ICDigJQKICAg4oCUIGRlcG9pcyBkZSBjcmlhciBlc3NhIHRhYmVsYSwgcG92b2VpIGVsYSBjb20gMTAwLjAwMCByZWdpc3Ryb3MKICAg4oCUCgpDUkVBVEUgVEFCTEUgVVNSX1BST0QuVEFCX1RFU1RFU19SRUNPVkVSICgKSURfUkVHSVNUUk8gICBOVU1CRVIgQ09OU1RSQUlOVCBQS19JRF9SRUdfVFNUX1JFQ09WRVIgUFJJTUFSWSBLRVksCkRFU0NSSUNBTyAgICAgVkFSQ0hBUjIoMjAwKSwKQ09ESUdPICAgICAgICBOVU1CRVIgQ09OU1RSQUlOVCBVS19DT0RJR09fMDEgVU5JUVVFLApEQVRBX1JFRyAgICAgIERBVEUKKTs=[/et_pb_dmb_code_snippet]

Pré-requisitos

– Banco de dados deve estar em ARCHIVELOG

– Pelo menos um backup FULL das tablespaces SYSTEM, SYSAUX, UNDO, SYSEXT (caso presente), e as tablespaces que contenham as tabelas a serem restauradas, mais os archives até o período desejado de restore.

– Espaço suficiente para armazenar a instância auxiliar

– Caso a tabela a ser recuperada possua dependentes (child tables), estas também devem ser incluídas no RECOVER.

– O RECOVER deve ser executado a partir do Container.

– Case a tabela a ser recuperada esteja em um PDB, deve-se especificar a clausula OF PLUGGABLE DATABASE <nome_pdb>

 

Exemplos

[et_pb_dmb_code_snippet _builder_version=”4.0.6″ code=”ICDigJQKICAg4oCUIEVYMDEg4oCTIHJlY3VwZXJhbmRvIHVtYSB0YWJlbGEgcXVlIGV4aXN0aWEgYW50ZXJpb3JtZW50ZSBkZW50cm8gZG8gQ0RCCiAgIOKAlAoKUk1BTj4gUkVDT1ZFUiBUQUJMRSBVU1JfUFJPRC5UQUJfVEVTVEVTX1JFQ09WRVIgVU5USUwgU0VRVUVOQ0UgMTY1IEFVWElMSUFUWSBERVNUSU5BVElPTiAnL2JhY2t1cC9hdXhpbGlhcnknOwoKIAoKICAg4oCUCiAgIOKAlCBFWDAyIOKAkyByZWN1cGVyY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KUkVNQVAgVEFCTEVTUEFDRSAnVEJTX1BST0QnOidUQlNfUkVDT1ZFUkVEJzsKCiAgCgogICDigJQKICAg4oCUIEVYMDQg4oCTIHJlY3VwZXJhbmRvIHVtYSB0YWJlbGEgcXVlIGV4aXN0aWEgYW50ZXJpb3JtZW50ZSBkZW50cm8gZGUgdW0gZGV0ZXJtaW5hZG8gUERCCiAgIOKAlCBuZXN0ZSBleGVtcGxvLCBldSBuw6NvIHJlYWxpemVpIGRlIGZhdG8gYSByZXN0YXVyYcOnw6NvIGRhIHRhYmVsYSwgbWFzIGFwZW5hcyBnZXJlaSBvCiAgIOKAlCBkdW1wIG5lY2Vzc2FyaW8gKGNsYXVzdWxhcyBEQVRBUFVNUCBERVNUSU5BVElPTiBlIERVTVAgRklMRSkKICAg4oCUIHBhcmEgcmVhbGl6YXIgbyBpbXBvcnQgZGVzc2EgdGFiZWxhIGVtIHF1YWxxdWVyIGJhc2UgZGUgZGFkb3MuCiAgIOKAlCBhIGNsYXVzdWxhIE5PVEFCTEVJTVBPUlQgw6kgcXVlbSBkZWZpbmUgcXVlIGEgdGFiZWxhIG7Do28gc2Vyw6EgcmVzdGF1cmFkYQogICDigJQKClJNQU4+IFJFQ09WRVIgVEFCTEUgVVNSX1BST0QuVEFCX1RFU1RFU19SRUNPVkVSIE9GIFBMVUdHQUJMRSBEQVRBQkFTRSBQREJQUk9EMQpVTlRJTCBTRVFVRU5DRSAzNApBVVhJTElBUlkgREVTVElOQVRJT04gJy9hdXgvYXV4aWxpYXJ5JwpEQVRBUFVNUCBERVNUSU5BVElPTiAnL2F1eC9hdXhpbGlhcnknCkRVTVAgRklMRSAnaW1wZHBfdGFiX3Rlc3Rlc19yZWNvdmVyXzE5MDUyMDE0LmRtcCcKTk9UQUJMRUlNUE9SVDs=[/et_pb_dmb_code_snippet]

… vejam que após o término da execução do comando acima, eu tenho meu dump, como havia definido na clausula DUMP FILE:

[et_pb_dmb_code_snippet _builder_version=”4.0.6″ code=”ZHJ3eHIteC0tLS4gNSBvcmFjbGUgb2luc3RhbGwgNC4wSyBNYXkgMTkgMTc6MjkgREIxMgpkcnd4ci14LS0tLiA0IG9yYWNsZSBvaW5zdGFsbCA0LjBLIE1heSAxOSAxNzo0NCBHQVRHX1BJVFJfUERCUFJPRDFfREIxMgogICAgICAtcnctci0tLS0tLiAxIG9yYWNsZSBvaW5zdGFsbCA0LjBLIE1heSAxOSAxNzo0NiBpbXBkcF90YWJfdGVzdGVzX3JlY292ZXJfMTkwNTIwMTQuZG1w” hover_enabled=”0″]ZHJ3eHIteC0tLS4gNSBvcmFjbGUgb2luc3RhbGwgNC4wSyBNYXkgMTkgMTc6MjkgREIxMgpkcnd4ci14LS0tLiA0IG9yYWNsZSBvaW5zdGFsbCA0LjBLIE1heSAxOSAxNzo0NCBHQVRHX1BJVFJfUERCUFJPRDFfREIxMgogICAgICAtcnctci0tLS0tLiAxIG9yYWNsZSBvaW5zdGFsbCA0LjBLIE1heSAxOSAxNzo0NiBpbXBkcF90YWJfdGVzdGVzX3JlY292ZXJfMTkwNTIwMTQuZG1w[/et_pb_dmb_code_snippet]

… após gerar o dump, a instância auxiliar é removida (assim como em todas as operações acima):

[et_pb_dmb_code_snippet _builder_version=”4.0.6″ code=”Tm90IHBlcmZvcm1pbmcgdGFibGUgaW1wb3J0IGFmdGVyIHBvaW50LWluLXRpbWUgcmVjb3ZlcnkKICAgIAogICAgIFJlbW92aW5nIGF1dG9tYXRpYyBpbnN0YW5jZQogICAgIHNodXR0aW5nIGRvd24gYXV0b21hdGljIGluc3RhbmNlCiAgICAgT3JhY2xlIGluc3RhbmNlIHNodXQgZG93bgogICAgIEF1dG9tYXRpYyBpbnN0YW5jZSByZW1vdmVkCiAgICAgYXV4aWxpYXJ5IGluc3RhbmNlIGZpbGUgL2F1eC9hdXhpbGlhcnkvREIxMi9kYXRhZmlsZS9vMV9tZl90ZW1wXzlxbnY2Z2wwXy50bXAgZGVsZXRlZAogICAgIGF1eGlsaWFyeSBpbnN0Y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gIGF1eGlsaWFyeSBpbnN0YW5jZSBmaWxlIC9hdXgvYXV4aWxpYXJ5L0RCMTIvY29udHJvbGZpbGUvbzFfbWZfOXFudGQ4bWZfLmN0bCBkZWxldGVkICAgICAKCiAgICAgRmluaXNoZWQgcmVjb3ZlciBhdCAxOS1NQVktMTQ=[/et_pb_dmb_code_snippet]

… como não confio muito nas coisas, gerei o arquivo DDL a partir do dump acima gerado, somente para ter certeza de que tudo foi bem:

[et_pb_dmb_code_snippet _builder_version=”4.0.6″ code=”aW1wZHAgYyMjZmFicmljaW8vPHNlbmhhPkBwZGJwcm9kMSBkaXJlY3Rvcnk9VFNQSVRSX0RJUk9CSl9EUERJUiBkdW1wZmlsZT1pbXBkcF90YWJfdGVzdGVzX3JlY292ZXJfMTkwNTIwMTQuZG1wIHRhYmxlcz1VU1JfUFJPRC5UQUJfVEVTVEVTX1JFQ09WRVIgc3FsZmlsZT1kZGxfdGFiZWxhLnNxbA==” hover_enabled=”0″]aW1wZHAgYyMjZmFicmljaW8vPHNlbmhhPkBwZGJwcm9kMSBkaXJlY3Rvcnk9VFNQSVRSX0RJUk9CSl9EUERJUiBkdW1wZmlsZT1pbXBkcF90YWJfdGVzdGVzX3JlY292ZXJfMTkwNTIwMTQuZG1wIHRhYmxlcz1VU1JfUFJPRC5UQUJfVEVTVEVTX1JFQ09WRVIgc3FsZmlsZT1kZGxfdGFiZWxhLnNxbA==[/et_pb_dmb_code_snippet]

… o comando acima me gerou um arquivo .sql contendo os DDLs do dump. Nele podemos ver que a tabela está lá bem como todas as suas costraints:

[et_pb_dmb_code_snippet _builder_version=”4.0.6″ code=”4oCUIG5ldyBvYmplY3QgdHlwZSBwYXRoOiBUQUJMRV9FWFBPUlQvVEFCTEUvVEFCTEUKQ1JFQVRFIFRBQkxFICJVU1JfUFJPRCIuIlRBQl9URVNURVNfUkVDT1ZFUiIKKCAgICAiSURfUkVHSVNUUk8iIE5VTUJFUiwKIkRFU0NSSUNBTyIgVkFSQ0hBUjIo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