Which two methods or commands would you use to accomplish this task?

You plan to migrate your database from a File system to Automata Storage Management (ASM)
on same platform.
Which two methods or commands would you use to accomplish this task?

You plan to migrate your database from a File system to Automata Storage Management (ASM)
on same platform.
Which two methods or commands would you use to accomplish this task?

A.
RMAN CONVERT command

B.
Data Pump Export and import

C.
Conventional Export and Import

D.
The BACKUP AS COPY DATABASE . . . command of RMAN

E.
DBMS_FILE_TRANSFER with transportable tablespace

Explanation:
A:
1. Get the list of all datafiles.
Note: RMAN Backup of ASM Storage
There is often a need to move the files from the file system to the ASM storage and vice versa.
This may come in handy when one of the file systems is corrupted by some means and then the
file may need to be moved to the other file system.
D: Migrating a Database into ASM
* To take advantage of Automatic Storage Management with an existing database you must
migrate that database into ASM. This migration is performed using Recovery Manager (RMAN)
even if you are not using RMAN for your primary backup and recovery strategy.

* Example:
Back up your database files as copies to the ASM disk group.
BACKUP AS COPY INCREMENTAL LEVEL 0 DATABASE
FORMAT ‘+DISK’ TAG ‘ORA_ASM_MIGRATION’;
Reference: Migrating Databases To and From ASM with Recovery Manager



Leave a Reply 31

Your email address will not be published. Required fields are marked *


Mohammad Rafiq

Mohammad Rafiq

A and D

Jaroslav

Jaroslav

A and D.
I can use RMAN CONVERT for “the same endian” conversion as well.

Andrejs

Andrejs

CONVERT DATAFILE creates data files copies that do not belong to the target database.
So I think DE is correct.

Domingo

Domingo

DE

I think A is not correct because would be needed transportable tablespace in same way as E.

Ksumi

Ksumi

DE is right

Relo

Relo

You could use B, C and D. B and C might not be ideal, but you CAN use them.

Denny

Denny

The questions asks “which one would you use”, so any option that makes it possible to move to ASM should be an acceptable answer, because the options I use personally might be different from the options you use. I hate questions like these.

rsv1999

rsv1999

The DBMS_FILE_TRANSFER package provides procedures to copy a binary file within a database or to transfer a binary file between databases. The DBMS_FILE_TRANSFER package provides procedures to copy a binary file within a database or to transfer a binary file between databases. The destination database converts each block when it receives a file from a platform with different endianness. Datafiles can be imported after they are moved to the destination database as part of a transportable operation without RMAN conversion. This package is useful when we want to copy files and not a database. Thus, E can be ruled out.
Datapump utility can be used to migrate databases from one version to another version. For example, if you want to migrate a 11.2.0.4.0 database to 12.1.0.1, or plug this as a pluggabel db, these tools are useful. Here we are migrating the datafiles from one file system to ASM. So, the Datapump may not work here.
Ref: Oracle documentation
CONVERT DATAFILE and CONVERT TABLESPACE can also be used to move files into and out of Automated Storage Management (ASM) disk groups. This capability is needed because native operating system file manipulation commands like Unix cp and Windows COPY cannot read from or write to ASM disk groups.
CONVERT DATABASE is used to transport an entire database from a source platform to a destination platform, converting the datafiles to the format of the destination platform and ensuring the creation of other required database files. Depending upon the requirements of your situation, CONVERT DATABASE on either the source or destination platform.
Because you cannot use operating system utilities to move files into ASM, you may want to use CONVERT TABLESPACE or CONVERT DATAFILE to move files into ASM even if no change in endian format is required. Using CONVERT in this manner provides the equivalent of an operating system-level file copy command for copying files into ASM. BACKUP AS COPY provides similar functionality but catalogs the file copies created in the RMAN repository, which is only desirable if the file copies created in ASM are intended for use as backups at the target database.
Hence I would go with A, D

pkg

pkg

You are just confused.
have you read this –

DBMS_FILE_TRANSFER.COPY_FILE Procedure
This procedure reads a file from a source directory and creates a copy of it in a destination directory. The source and destination directories can both be in a local file system, or both be in an Automatic Storage Management (ASM) disk group, or between local file system and ASM with copying in either direction.

In question you are migrating from a file system to ASM.

Read more about DBMS_FILE_TRANSFER package in 12c, the behaviour has been changed to support data conversion across different endian format.

HTH.

I think D & E.

A is better over D only when copying a file across different endian format.

dbaman

dbaman

@pkg – I agree with you.

RMAN CONVERT is purely for platform migration with different endianess.

Jai

Jai

A,D and E are the options which any one can use.

If, however, you just to create copies of some datafiles from non-ASM to ASM storage on the same platform, you can use the CONVERT command, without specifying a source or destination platform.

Looks like there are three answer to this question but now difficult to identify which one is expected from us.

Experts please comment on it.

KenzoF

KenzoF

How are you going to use DBMS_FILE_TRANSFER to move SYSTEM, SYSAUX and UNDO?? The files to be moved should be in READONLY or OFFLINE state.

I guess A,D are the correct answers, as you can take advantage of those in the mount mode.

KenzoF

KenzoF

DBMS_FILE_TRANSFER supports online backup. You should therefore be careful in copying or transferring a file that is being modified by the database because this can result in an inconsistent file, and require recovery. To guarantee consistency, bring files offline when the database is in use. If you want to use DBMS_FILE_TRANSFER for performing backups, note that you are implementing self-managed backups, and should therefore put the files in hot backup mode.

Carlos

Carlos

A & D

https://docs.oracle.com/cd/B19306_01/backup.102/b14191/dbxptrn.htm#CHDCFCIB

If your goal is to migrate parts or all of your database or flash recovery area into ASM storage, see Chapter 16, “Migrating Databases To and From ASM with Recovery Manager”. If, however, you just to create copies of some datafiles from non-ASM to ASM storage on the same platform, you can use the CONVERT command, without specifying a source or destination platform.

Peter

Peter

A is correct

from the docs

One use of CONVERT is to transport a tablespace into a database stored in Oracle Automatic Storage Management (Oracle ASM). Native operating system commands such as Linux cp and Windows COPY cannot read from or write to Oracle ASM disk groups.

Umaruddin Ansari

Umaruddin Ansari

A,D are correct

lazar

lazar

DBMS_FILE_TRANSFER Utility Enhancements
The DBMS_FILE_TRANSFER is a stored procedure that was introduced in 9i. This package provided a
means to copy files between two locations (on same host or between database servers). In 10.1, ASM
leverages this utility to copy files between ASM diskgroups, and is the primary utility used to instantiate an
ASM DataGuard database. In 10.2, DBMS_FILE_TRANSFER has been enhanced to support all
combinations of ASM and non-ASM file transfers as follows:
• ASM to ASM
• ASM to OS file
• OS file to ASM
• OS file to OS file
These changes now provide DBAs with another method to migrate database files into and out of ASM
storage.

dziri

dziri

The correct answer is : A, B

A, B :
Appendix: Limitations on Full Transportable Export/Import
———————————————————
http://www.oracle.com/technetwork/database/enterprise-edition/full-transportable-wp-12c-1973971.pdf

A:
You can use the RMAN CONVERT DATAFILE command to convert the data.

B:
Traditional methods used for database migration work seamlessly with pluggable databases.
Original Export/Import, Data Pump export/import, and transportable tablespaces can all be used to migrate from earlier versions of Oracle Database to a pluggable database running with Oracle Database 12c. In addition, an exciting new feature, full transportable export/import, is available to make migration to Oracle Database 12c faster, easier, and more efficient than ever before.

D:
RMAN COPY Command Tips
———————-
http://www.dba-oracle.com/t_rman_copy_command_tips.htm
The BACKUP AS COPY command creates image copies and removes the need to extract them from a backup set. This BACKUP AS COPY command allows you to copy a database, tablespaces, datafiles, archived redo logs as well as control files.

C:
Users on Oracle 10g and later releases should use the Data Pump expdp and impdp utilities instead of the older imp and exp utilities described in this document.
http://www.orafaq.com/wiki/Import_Export_FAQ

E:
Overview
The DBMS_FILE_TRANSFER package provides procedures to copy a binary file within a database or to transfer a binary file between databases. The destination database converts each block when it receives a file from a platform with different endianness. Datafiles can be imported after they are moved to the destination database as part of a transportable operation without RMAN conversion. Both GET and PUT operations will converted the file across platform difference at the destination. However, COPY is a local operation and therefore no conversion is required.

dziri

dziri

A, B

https://docs.oracle.com/database/121/ADMIN/transport.htm#ADMIN11403
Transporting data is much faster than performing either an export/import or unload/load of the same data. It is faster because, for user-defined tablespaces, the data files containing all of the actual data are copied to the target location, and you use Data Pump to transfer only the metadata of the database objects to the new database

Transportable tablespaces and transportable tables only transports data that resides in user-defined tablespaces. However, full transportable export/import transports data that resides in both user-defined and administrative tablespaces, such as SYSTEM and SYSAUX. Full transportable export/import transports metadata for objects contained within the user-defined tablespaces and both the metadata and data for user-defined objects contained within the administrative tablespaces. Specifically, with full transportable export/import, the export dump file includes only the metadata for objects contained within the user-defined tablespaces, but it includes both the metadata and the data for user-defined objects contained within the administrative tablespaces

Moving a Non-CDB Into a CDB
https://docs.oracle.com/database/121/ADMIN/transport.htm#BEHDGGAI

Transporting a Database Using an Export Dump File
https://docs.oracle.com/database/121/ADMIN/transport.htm#ADMIN13726

If the source platform’s endian format is different from the target platform’s endian format, then use one of the following methods to convert the data files:
Use the GET_FILE or PUT_FILE procedure in the DBMS_FILE_TRANSFER package to transfer the data files. These procedures convert the data files to the target platform’s endian format automatically.
Use the RMAN CONVERT command to convert the data files to the target platform’s endian format.

Appendix: Limitations on Full Transportable Export/Import
http://www.oracle.com/technetwork/database/enterprise-edition/full-transportable-wp-12c-1973971.pdf

dziri

dziri

D:
http://www.dba-oracle.com/t_rman_copy_command_tips.htm
The BACKUP AS COPY command creates image copies and removes the need to extract them from a backup set. This BACKUP AS COPY command allows you to copy a database, tablespaces, datafiles, archived redo logs as well as control files.
E:
http://docs.oracle.com/cd/B19306_01/appdev.102/b14258/d_ftran.htm#CHDHJDIH
Summary of DBMS_FILE_TRANSFER Subprograms
COPY_FILE Procedure–>> Reads a file from a source directory and creates a copy of it in a destination directory. The source and destination directories can both be in a local file system, or both be in an Automatic Storage Management (ASM) disk group, or between local file system and ASM with copying in either direction.

My Answer is : D, E
Because we are in the same Platform, we don’t need to convert or import/export.

Diogo

Diogo

A,D

CONVERT act as BACKUP AS COPY if not format option is specified:

“You can use either the FORMAT or fileNameConversionSpec arguments to control the names of the output files generated by the CONVERT command. If you do not specify either, then the rules governing the location of the output files equal those governing the output files from a BACKUP AS COPY operation.”
https://docs.oracle.com/database/121/RCMRF/rcmsynta011.htm

Richard

Richard

A and D are correct.

-https://docs.oracle.com/cd/B19306_01/backup.102/b14194/rcmsynta018.htm