Nas versões anteriores do Oracle, para migrar e/ou renomear um datafile eram necessários uma série de passos. Exemplo: colocar a tablespace em READ ONLY, alterar o datafile para offline, etc… A partir do 12cR1, um datafile pode ser renomeado ou movido online, simplesmente utilizando a instrução ALTER DATABASE MOVE DATAFILE. Enquanto o datafile estiver sendo trasnferido, o usuário final pode executar consultas, e instruções DML e DDL sem problema. Além disso, os datafile podem ser migrados entre armazenamentos. Ex. migrar de não-ASM para ASM ou vice-versa.

Para os nossos testes, irei utilizar uma VM com o seguinte cenário:

- Disco 1 /dev/sda com 50Gb
- Disco 2 /dev/sdb com 5Gb -> asm-disk1
- Disco 3 /dev/sdc com 5Gb -> asm-disk2
- 3Gb RAM
- 5Gb SWAP
- Oracle Linux Server Release 6.4 x86_64
- Oracle Database 12c R1 (rodando com ASM)

– Criando uma tablespace nova e um novo datafile:

[et_pb_dmb_code_snippet _builder_version=”4.0.6″ code=”U1FMPiBjcmVhdGUgdGFibGVzcGFjZSB0ZXN0ZSBkYXRhZmlsZSAnL3UwMS9hcHAvb3JhY2xlL29yYWRhdGEvY2RicmFjMS90ZXN0ZTEuZGJmJyBzaXplIDEwME07CgpUYWJsZXNwYWNlIGNyZWF0ZWQuCgpTUUw+CuKAkyBSZW5vbWVhbmRvIHVtIGRhdGFmaWxlOgoKU1FMPiBhbHRlciBkYXRhYmFzZSBtb3ZlIGRhdGFmaWxlICcvdTAxL2FwcC9vcmFjbGUvb3JhZGF0YS9jZGJyYWMxL3Rlc3RlMS5kYmYnIHRvICcvdTAxL2FwcC9vcmFjbGUvb3JhZGF0YS9jZGJyYWMxL3Rlc3RlXzExLmRiZic7CgpEYXRhYmFzZSBhbHRlcmVkLgoKU1FMPgrigJMgUXVlIGJvbml0bywgcXVlIGJlbGV6YeKApiB2YW1vcyB2ZXIgY29tbyBmaWNvdSBubyBzLm8uOgoKW29yYWNsZUBvbDYtMTIxLXJhYzEtc2luZ2xlIH5dJCBjZCAvdTAxL2FwcC9vcmFjbGUvb3JhZGF0YS9j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sem precisar aquela confusão toda… copia no s.o., altera no banco, blábláblá!

Mas como será que ele se porta no caso de ser um datafile da tbs SYSTEM por exemplo?

[et_pb_dmb_code_snippet _builder_version=”4.0.6″ code=”U1FMPiBzZWxlY3QgZmlsZV9uYW1lIGZyb20gZGJhX2RhdGFfZmlsZXMgd2hlcmUgdGFibGVzcGFjZV9uYW1lID0gJ1NZU1RFTSc7CgpGSUxFX05BTUUKLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQorREFUQS9DREJSQUMvREFUQUZJTEUvc3lzdGVtLjI1OC44MjEyMDQ1NzcKClNRTD4gYWx0ZXIgdGFibGVzcGFjZSBzeXN0ZW0gYWRkIGRhdGFmaWxlICcrREFUQSc7CgpUYWJsZXNwYWNlIGFsdGVyZWQuCgpTUUw+IHNlbGVjdCBmaWxlX25hbWUgZnJvbSBkYmFfZGF0YV9maWxlcyB3aGVyZSB0YWJsZXNwYWNlX25hbWUgPSAnU1lTVEVNJzsKCkZJTEVfTkFNRQotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCitEQVRBL0NEQlJBQy9EQVRBRklMRS9zeXN0ZW0uMjU4LjgyMTIwNDU3NworREFUQS9DREJSQUMvREFUQUZJTEUvc3lzdGVtLjI3OC44MjEyMTA0MTEKClNRTD4gYWx0ZXIgZGF0YWJhc2UgbW92ZSBkYXRhZmlsZSAnK0RBVEEvQ0RCUkFDL0RBVEFGSUxFL3N5c3RlbS4yNzguODIxMjEwNDExJyB0byAnL3UwMS9hcHAvb3JhY2xlL29yYWRhdGEvY2RicmFjMS9zeXN0ZW0wMi5kYmYn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owMSAvdTAxL2FwcC9vcmFjbGUvb3JhZGF0YS9jZGJyYWMxL3N5c3RlbTAyLmRiZg==[/et_pb_dmb_code_snippet]

– Agora vamos migrar o nosso datafile criado para o ASM. Primeiro vamos verificar a localização atual de todos os datafiles:

[et_pb_dmb_code_snippet _builder_version=”4.0.6″ code=”U1FMPiBzZXQgcGFnZXMgMTAwMCBsaW5lcyAxMDAKU1FMPiBzZWxlY3QgbmFtZSBmcm9tIHYkZGF0YWZpbGUgb3JkZXIgYnkgMTsKCk5BTUUKLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQorREFUQS9DREJSQUMvREFUQUZJTEUvc3lzYXV4LjI1Ny44MjEyMDQ0ODUKK0RBVEEvQ0RCUkFDL0RBVEFGSUxFL3N5c3RlbS4yNTguODIxMjA0NTc3CitEQVRBL0NEQlJBQy9EQVRBRklMRS91bmRvdGJzMS4yNjAuODIxMjA0NjYzCitEQVRBL0NEQlJBQy9EQVRBRklMRS91c2Vycy4yNTkuODIxMjA0NjYxCitEQVRBL0NEQlJBQy9ERDdDNDhBQTVBNDQwNEEyRTA0MzI1QUFFODBBNDAzQy9EQVRBRklMRS9zeXNhdXguMjY2LjgyMTIwNDcyMworREFUQS9DREJSQUMvREQ3QzQ4QUE1QTQ0MDRBMkUwNDMyNUFBRTgwQTQwM0MvREFUQUZJTEUvc3lzdGVtLjI2Ny44MjEyMDQ3MjMKK0RBVEEvQ0RCUkFDL0UxRTM5NEI5MkE2MzFFMERFMDQ1MDAwMDAwMDAwMDAxL0RBVEFGSUxFL3N5c2F1eC4yNzAuODIxMjA1OTgxCitEQVRBL0NEQlJBQy9FMUUzOTRCOTJBNjMxRTBERTA0NTAwMDAwMDAwMDAwMS9EQVRBRklMRS9zeXN0ZW0uMjcxLjgyMTIwNTk4MQor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5CgpTUUw+[/et_pb_dmb_code_snippet]

Feitoria! Datafile migrado para o DG +DATA e nem rastro do mesmo no filesystem!! 😀

– Ao utilizar o parâmetro KEEP mantemos o datafile no local original e copiamos ele para um novo local. Movi o datafile novamente para o filesystem para facilitar a visualização:

[et_pb_dmb_code_snippet _builder_version=”4.0.6″ code=”U1FMPiBzZWxlY3QgbmFtZSBmcm9tIHYkZGF0YWZpbGUgd2hlcmUgbmFtZSBsaWtlICcldGVzdGUlJzsKCk5BTUUKLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQovdTAxL2FwcC9vcmFjbGUvb3JhZGF0YS9jZGJyYWMxL3Rlc3RlXzEyLmRiZgoKU1FMPiBhbHRlciBkYXRhYmFzZSBtb3ZlIGRhdGFmaWxlICcvdTAxL2FwcC9vcmFjbGUvb3JhZGF0YS9jZGJyYWMxL3Rlc3RlXzEyLmRiZicgCiAgMiB0byAnL3UwMS9hcHAvb3JhY2xlL29yYWRhdGEvY2RicmFjMS90ZXN0ZV8yMC5kYmYnIEtFRVA7CgpEYXRhYmFzZSBhbHRlcmVkLgoKU1FMPiAhbHMgLWwgL3UwMS9hcHAvb3JhY2xlL29yYWRhdGEvY2RicmFjMS8qICAgICAgICAgICAKLXJ3LXItLS0tLS4gMSBvcmFjbGUgZGJhIDEwNDg2NTc5MiBKdWwgMTkgMTc6NDIgL3UwMS9hcHAvb3JhY2xlL29yYWRhdGEvY2RicmFjMS90ZXN0ZV8xMi5kYmYKLXJ3LXItLS0tLS4gMSBvcmFjbGUgZGJhIDEwNDg2NTc5MiBKdWwgMTkgMTc6NDIgL3UwMS9hcHAvb3JhY2xlL29yYWRhdGEvY2RicmFjMS90ZXN0ZV8yMC5kYmY=” hover_enabled=”0″]U1FMPiBzZWxlY3QgbmFtZSBmcm9tIH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tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQovdTAxL2FwcC9vcmFjbGUvb3JhZGF0YS9jZGJyYWMxL3Rlc3RlXzIwLmRiZgoKU1FMPg==” hover_enabled=”0″]U1FMPiBzZWxlY3QgbmFtZSBmcm9tIHYkZGF0YWZpbGUgd2hlcmUgbmFtZSBsaWtlICcldGVzdGUlJzsKCk5BTUUKLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQovdTAxL2FwcC9vcmFjbGUvb3JhZGF0YS9jZGJyYWMxL3Rlc3RlXzIwLmRiZgoKU1FMPg==[/et_pb_dmb_code_snippet]

Show! Mas o que acontece se tentarmos mover pra cima daquele arquivo que já existe?

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

Eita… mas pra resolver, utilizamos o parâmetro REUSE:

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

O progresso dessa movimentação de datafiles, no caso de demorar pois o datafile é muito grande, pode ser monitorada na v$session_longops. Além disso, podemos verificar no alert.log onde o Oracle deixa os detalhes das ações que estão sendo tomadas. Ex.:

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

Buenas… essa foi a primeira postagem a respeito das new-features do 12c R1, inclusive, uma das que achei mais bacana! Isso é uma mão na roda quando lota um disco por exemplo, ou é necessário uma migração de storage, etc…