发布网友 发布时间:2022-04-24 02:11
共1个回答
热心网友 时间:2022-05-03 21:34
昨天碰到一客户,数据库使用的是WIN2008+RAC+ASM。由于EMC存储问题,导致ASM实例出问题,读不出数据,进而导致RAC出问题。折腾了2个小时,终于将ASM实例启动,将RAC转换成单节点。可悲的是,ASM磁盘组读取错误:select 表格出错,exp、expdp出错,rman拷贝出错。赶到客户现场,继续折腾,终于修复错误。简要步骤如下 1、同一主机下面建另一实例,用于运行DBMS_FILE_TRANSFER 2、在该实例上运行DBMS_FILE_TRANSFER,拷贝数据文件,控制文件,日志文件 引用 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; /二是使用ASM提供的ftp特性 1、同一主机下面建另一实例,用于传输ftp 2、用ftp传输相关文件附:DBMS_FILE_TRANSFER使用* # The user must have read privilege on the source directory object and write privilege on the destination directory object. # The procere 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 performed. # File copies can be monitored using the V$SESSION_LONGOPS view ++++++++++++++++++++++++++ 据一同事反映,Oracle 11g提供了ASM cp命令,允许在ASM磁盘组和操作系统文件之间互相拷贝。