Re: How to get the file transfer working between virtual box oracle developer vm and mac(host)

From: Sayan Malakshinov <>
Date: Sun, 4 Aug 2019 13:01:28 +0300
Message-ID: <>

Hi Kunwar,

You can use any SQL client for that:
1. Create oracle directory for trace directory: begin

   for r in (SELECT VALUE FROM V$DIAG_INFO WHERE NAME = 'Diag Trace') loop

      execute immediate utl_lms.format_message( q'{create directory TRACE_DIR as '%s' }', r.value);

   end loop;
select directory_path from dba_directories where directory_name='TRACE_DIR';

2. Then you can use bfilename('TRACE_DIR',tracefile_name) to get it. Note, that you need to specify just file name, not full path to file. For example: select bfilename('TRACE_DIR','ORA19_j000_14336.trc') f from dual;

3. To get a list of trace files in this directory you can use this pl/sql block:

   PROCEDURE LIST_FILES (lp_directory varchar2, lp_string varchar2, lp_limit binary_double default 'inf')


      lv_pattern VARCHAR2(1024);
      lv_ns VARCHAR2(1024);
      SELECT directory_path
      INTO lv_pattern
      FROM dba_directories
      WHERE directory_name = lp_directory;


      FOR file_list IN (
         SELECT FNAME_KRBMSFT AS file_name
         FROM sys.X$KRBMSFT
         WHERE --FNAME_KRBMSFT LIKE '%'|| lp_string||'%'
           regexp_like(FNAME_KRBMSFT ,lp_string)
         and rownum <= lp_limit
      END LOOP;


   list_files('TRACE_DIR','*.trc', 10);

First parameter is the oracle directory name, second - regexp mask for the files, and 3rd (optional) - max number of file names to return.

On Sun, Aug 4, 2019 at 11:53 AM kunwar singh <> wrote:

> Hi Listers,
> I am trying to get the file transfer working between vm and the host (mac)
> Basically i wanted to transfer a 10046 trace and i couldn't get it working
> despite all the google searches and trying various stuff including adding
> VBoxGuestAdditions_5.1.18.iso
> Not sure where do to go from here. Can you please suggest.
> Host MAC OS version :10.11.6 (15G22010)
> Virtulbox version : 5.1.18
> i am able to connect to the database using the method mentioned in the
> below link , but stuck at file transfer now.
> Any pointers are welcome , thanks much in advance.
> --
> Cheers,
> Kunwar

Best regards,
Sayan Malakshinov
Oracle performance tuning engineer
Oracle ACE Associate

Received on Sun Aug 04 2019 - 12:01:28 CEST

Original text of this message