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: Consequences of using DBMS_APPLICATION_INFO.SET_CLIENT_INFO ???

Re: Consequences of using DBMS_APPLICATION_INFO.SET_CLIENT_INFO ???

From: Thomas Kyte <tkyte_at_oracle.com>
Date: 15 Oct 2002 12:02:51 -0700
Message-ID: <aohoor0jdf@drn.newsguy.com>


In article <54df0379.0210151032.238d6530_at_posting.google.com>, PrivateBenjamin_at_hushmail.com says...
>
>Are there any multiuser issues regarding creating dynamic views using
>DBMS_APPLICATION_INFO.SET_CLIENT_INFO in the manner as below
>
>CREATE OR REPLACE VIEW VW_MYINVESTMENTS ( DRIVER,
>INV#, DESCRIPTION, USERID ) AS SELECT
> vw_TBLINVESTMENTS.INV_DRIVER# AS Driver,
> vw_TBLINVESTMENTS.INVESTMENT# AS "Inv#",
> vw_TBLINVESTMENTS.INVESTMENT_DESCRIPTION AS Description,
> VW_TBLEMPLOYEE.USERID
>FROM
> VW_TBLINVESTMENTS,
> VW_TBLEMPLOYEE
>WHERE
> VW_TBLINVESTMENTS.Employee# = vw_TBLEmployee.Employee# and
> VW_TBLEMPLOYEE.userid = userenv('client_info')
>
>then -------
>
>"BEGIN DBMS_APPLICATION_INFO.SET_CLIENT_INFO ( & '" & param & "')" &
>"; END;"
>
>For example, when multiple users are setting the environment variable
>will that affect the other users?
>
>
>Thanks
>April

client info is session "safe", each session has their own.

this is a common technique -- but -- USE BIND VARIABLES when calling dbms_app info -- don't concatenate like you show above -- looks like VB or Java -- so use a ?

"begin dbms_application_info.set_client_info(?); end;"

and bind in param

--
Thomas Kyte (tkyte@oracle.com)             http://asktom.oracle.com/ 
Expert one on one Oracle, programming techniques and solutions for Oracle.
http://www.amazon.com/exec/obidos/ASIN/1861004826/  
Opinions are mine and do not necessarily reflect those of Oracle Corp 
Received on Tue Oct 15 2002 - 14:02:51 CDT

Original text of this message

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