Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to copy files from ASM to a file system

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article is about how to copy files from ASM to the file system, the editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.

Version 10.2.0.5

1. Use RMAN:

$sqlplus "/ as sysdba" SQL*Plus: Release 10.2.0.5.0-Production on Fri Mar 16 10:02:41 2012 Copyright (c) 1982, 2010, Oracle. All Rights Reserved. Connected to an idle instance. SQL > startup mount;ORACLE instance started. Total System Global Area 2147483648 bytesFixed Size 2097696 bytesVariable Size 503320032 bytesDatabase Buffers 1627389952 bytesRedo Buffers 14675968 bytesDatabase mounted. SQL > select file#, name, bytes from v$datafile where file#=5 FILE# NAME BYTES--5 + DATA01/dbname/datafile/users.264.730552875 524288000$ rman target / nocatalog Recovery Manager: Release 10.2.0.5.0-Production on Fri Mar 16 10:06:08 2012 Copyright (c) 1982 2007, Oracle. All rights reserved. Connected to target database: dbname (DBID=2555001420, not open) using target database control file instead of recovery catalog RMAN > copy datafile 5 to'/ arch2/users.264.730552875' Starting backup at 16-MAR-12allocated channel: ORA_DISK_1channel ORA_DISK_1: sid=1624 instance=dbname1 devtype=DISKchannel ORA_DISK_1: starting datafile copyinput datafile fno=00005 name=+DATA01/dbname/datafile/users.264.730552875output filename=/arch2/users.264.730552875 tag=TAG20120316T100622 recid=2 stamp=778068391channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15Finished backup at 16-MAR-12 RMAN > exit Recovery Manager complete.$ ls-l / arch2/users.264.730552875-rw-r- 1 oracle oinstall 524296192 Mar 16 10:06 / arch2/users.264.730552875

[@ more@]

2. Use dbms_file_transfer package:

SQL > select open_mode from vault database; OPEN_MODE-READ WRITE SQL > create or replace directory SOURCE_DIR1 as'+ DATA01/dbname/onlinelog/'; Directory created. SQL > create or replace directory ORACLE_DEST as'/ arch2/'; Directory created. SQL > SQL > BEGIN 2 dbms_file_transfer.copy_file (3 source_directory_object = > 'SOURCE_DIR1', 4 source_file_name = >' group_1.274.730565825', 5 destination_directory_object = > 'ORACLE_DEST', 6 destination_file_name = >' group_1.274.730565825' 7), 8 END; 9 / PL/SQL procedure successfully completed. SQL >! Ls-l / arch2/group_1.274.730565825-rw-r- 1 oracle oinstall 524288512 Mar 14 10:49 / arch2/group_1.274.730565825 is how to copy files from ASM to the file system. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report