Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Create directory objects with environment variable in path

Mimi MiamiFeb 10 2014 — edited Feb 10 2014

I need to create a directory object and am wondering if it is valid to use an environment variable in the path_name?  Example:

CREATE OR REPLACE DIRECTORY XMLDIR AS '$ORACLE_HOME/rdbms/xml';

I read the following in the 11.2 Oracle documentation, but it is not clear to me whether an environment variable is allowed or not.  My reason for wanting use an environment variable as opposed to hard coding is so that when I upgrade, I won't have any trailing references to the old Oracle Home.

path_name

Specify the full path name of the operating system directory of the server where the files are located. The single quotation marks are required, with the result that the path name is case sensitive.

This post has been answered by sb92075 on Feb 10 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 10 2014
Added on Feb 10 2014
4 comments
2,795 views