Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: environment variables in PL/SQL

Re: environment variables in PL/SQL

From: Tom Barnes <barnest_at_san.rr.com>
Date: 19 Jul 2002 19:58:04 -0700
Message-ID: <ae6b6116.0207191858.7360b139@posting.google.com>


You have a database - why don't you use it? Keep your "environments" and paths in a table and get rid of your constants.

lrako_at_hotmail.com (LR) wrote in message news:<dcc2db96.0207190420.671ee192_at_posting.google.com>...
> Hi Oracle gurus,
>
> I do have a problem which should not be too difficult to solve.
> Maybe it is more related to Unix but I am not so proficient in Unix.
>
> We are developing an application which is tested in different
> environments.
> The application uses UTL_FILE to write flat files. The UTL_FILE_DIR
> parameter is in the following form:
>
> /busdata/<DB_NAME>/<ENVIRONMENT>/interface/inbound
>
> where DB_NAME stands for the database name and <ENVIRONMENT> is for
> example DEV, TEST, QA, EDU, PROD.
>
> In addition, we are using a package, CONST_PKG, containing all
> constants with a variable
>
> EDI_ROOT VARCHAR2(255) := '/busdata/<DB_NAME>/<ENVIRONMENT>
>
> with hardcoded values for each environment. Which is a bad design, I
> acknowledge.
>
> Now, how can we make this all dynamic ? I mean, if in UNIX, we do have
> environment variables $DB_NAME and $ENVIRONMENT, is there a way to
> dynamically compile the CONST_PKG, according to the values of $DB_NAME
> and $ENVIRONMENT ?
>
> What any other options would you consider ?
>
> Thanks and regards,
>
> Lalaina RAKOTONIAINA
> ERP Analyst Developer
Received on Fri Jul 19 2002 - 21:58:04 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US