oracle-databaseoracle11gdirectoryoracle-rac

Oracle RAC - creating a directory


Having trouble getting an answer to this. On an Oracle RAC how do Oracle logical directories work? E.g. if I run this command

CREATE DIRECTORY import_dir AS '/data/oracle/import';

does Oracle create the directory on just one node, or does it create it on each node and manage it virtually? How does it guarantee that a file that gets written to the directory is available to all RAC nodes?

thanks


Solution

  • An Oracle Directory is simply a catalog object stored in the database.

    Oracle doesn't physically create the actual directory on the file system, in fact it doesn't even check if it really exists and has the appropriate permissions (link to the docs).

    In a RAC system you will need to create yourself the physical directory on all the nodes where the cluster instances are running (/data/oracle/import in your example).

    To make the same files available on all the cluster nodes you might want to use a clustered file system or a network share (such as NFS or CIFS) and make sure that the mount point is the same on all nodes.