How to Copy Files From One ASM Instance to Another

  • by
ASM in Oracle 11g grid infrastructure has been improved a lot on the storage operations. For instance, the utility ASMCMD offers several new commands to operate with the storage and make DBA more easily to control the storage, especially on copying files, the "cp". The syntax of cp is
cp [-i][-f][connect_str:]src_file [connect_str:]tgt_file
In the syntax description, "connect_str" is the ASM instance that you want to connect to. The format of the connection string is as:
user@host[.port_number].SID
Now, let's demonstrate how to copy backup files from a remote ASM instance to local ASM with an example below:
[oracle@standby02 ~]$ asmcmd
ASMCMD> cp sys@primary02-vip.1521.+ASM2:+DATA/primdb/backupset/2013_01_23/nnndf0_tag20130123t100747_0.1111.805457271 +DATA/backup/database.bak
Enter password: **********
ASMCMD>

In the above statement, sys@primary02-vip.1521.+ASM2 is the connection string, in which, sys is the username, primary02-vip is the hostname, 1521 is the listener port, and +ASM2 is the instance sid.

Leave a Reply

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