I was overwhelmed by ASM recently. Yesterday I met a customer who used WIN2008 + RAC + ASM. Due to the storage problem of emc, the ASM instance has a problem and the data cannot be read, which leads to RAC problems. After two hours, I finally started the ASM instance and converted the RAC into a single node. Sadly, an error occurred while reading the ASM disk group: An error occurred in the select Table, exp, expdp, and rman copy. Arrive at the customer's site, continue to toss, and finally repair the error. On the way back, I have been thinking about a problem. In the ASM environment, how do I perform database cold backup?
First, Oracle provides the file transfer package DBMS_FILE_TRANSFER, which is used to transmit the ASM file to the file system. The procedure is as follows:
1. Create another instance under the same host to run DBMS_FILE_TRANSFER
2. Run DBMS_FILE_TRANSFER on the instance to copy data files, control files, and log files.
Reference
Create directory source_dir AS '+ DATADG/ORADATA ';
Create directory dest_dir AS '/tmp ';
BEGIN
DBMS_FILE_TRANSFER.COPY_FILE (
Source_directory_object => 'source _ dir ',
Source_file_name => 'user01. dbf ',
Destination_directory_object => 'dest_dir ',
Destination_file_name => 'user01. dbf ');
END;
/
Second, use the ftp features provided by ASM
1. Create another instance under the same host for ftp transmission
2. Use ftp to transfer related files
Appendix: DBMS_FILE_TRANSFER restrictions
# The user must have read privilege on the source directory object and write privilege on the destination directory object.
# The procedure converts directory object names to uppercase unless they are surrounded by double quotes.
# Files to be copied must be multiples of 512 bytes in size.
# Files to be copied must be equal to or less than 2 terabytes in size.
# File transfers are not transactional.
# Files are copied as binary, so no character conversions are saved med.
# File copies can be monitored using the V $ SESSION_LONGOPS view