1Z0-058 · Question #42
Various clients can access and manipulate ASM files. Which two statements are true?
The correct answer is D. The DBMS_FILE_TRANSFER.GET_FILE procedure reads an ASM file from a remote machine E. The ASMCMD rm command will delete ASM files and directories, but not database files on an. 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…
Question
Various clients can access and manipulate ASM files. Which two statements are true?
Options
- AThe DBMS_FILE_TRANSFER.COPY_FILE procedure can move a database file from one ASM to
- BThe ASMCMD cp command can move database files from a file system to ASM, but not from
- CThe SQL*Plus command ALTER DISKGROUP orcl MOVE '+DATA/orcl/example01.dbf' to
- DThe DBMS_FILE_TRANSFER.GET_FILE procedure reads an ASM file from a remote machine
- EThe ASMCMD rm command will delete ASM files and directories, but not database files on an
How the community answered
(66 responses)- A3% (2)
- B8% (5)
- C5% (3)
- D85% (56)
Explanation
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. You can copy any type of file to and from a local file system. However, you can copy only database files (such as datafiles, tempfiles, controlfiles, and so on) to and from an ASM disk GET_FILE Procedure This procedure contacts a remote database to read a remote file and then creates a copy of the file in the local file system or ASM. The file that is copied is the source file, and the new file that results from the copy is the destination file. The destination file is not closed until the procedure completes successfully. CREATE OR REPLACE DIRECTORY df AS '+datafile' ; GRANT WRITE ON DIRECTORY df TO "user"; CREATE DIRECTORY DSK_FILES AS ''^t_work^''; GRANT WRITE ON DIRECTORY dsk_files TO "user"; -- asumes that dbs2 link has been created and we are connected to the instance. -- dbs2 could be a loopback or point to another instance. -- asm file to an os file -- get an asm file from dbs1.asm/a1 to dbs2.^t_work^/oa5.dat DBMS_FILE_TRANSFER.GET_FILE ( 'df' , 'a1' , 'dbs1', 'dsk_files' , 'oa5.dat' ); -- os file to an os -- get an os file from dbs1.^t_work^/a2.dat to dbs2.^t_work^/a2back.dat DBMS_FILE_TRANSFER.GET_FILE ( 'dsk_files' , 'a2.dat' , 'dbs1', 'dsk_files' , 'a2back.dat' ); Oracle® Database PL/SQL Packages and Types Reference 11g Release 2 (11.2) Enables you to copy files between Oracle ASM disk groups and between a disk group and the operating system. You can use the cp command to: Copy files from a disk group to the operating system Copy files from a disk group to a disk group Copy files from the operating system to a disk group Deletes the specified Oracle ASM files and directories. Oracle® Automatic Storage Management Administrator's Guide 11g Release 2 (11.2)
Topics
Community Discussion
No community discussion yet for this question.