Function sys_context('USERENV','CLIENT_IDENTIFIER') Returns ANONYMOUS

our application codes has custom fine grain access control that looks for certain id's such as the userid and machine identifier. some of the codes rely on this sys_context('USERENV','CLIENT_IDENTIFIER') function to compare it's return result to some custom account reference table. one of the server machine that we recently use for testing purpose of new version for Oracle Reports is returning this ANONYMOUS result when the sys_context('USERENV','CLIENT_IDENTIFIER') is queried. this cause issue to our application.
normally, the sys_context('USERENV','CLIENT_IDENTIFIER') returns a null value when it can't recognize of find. how do i resolved it on the server to return the correct result? is there any config file that i should look into? please advise.
our test server machine is running on a Microsoft Windows XP [Version 5.1.2600].
thanks,
warren

SYS_CONTEXT('userenv','LANG') returns the Oracle short language name/abbreviation, this id may or may not correspond to the ISO language code.
Table A-1 http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14225/applocaledata.htm#g679875" in the Globalization Support guide lists all the Oracle language abbreviations.
To obtain the ISO code, you can try calling the UTL_I18N.MAP_LOCALE_TO_ISO function( ), which is available in 10g.
http://download-west.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_i18n.htm#sthref14725

Similar Messages

  • Parameter in SYS_CONTEXT('USERENV'

    Hi,
    is there any parameter in SYS_CONTEXT('USERENV' that shows the name or IP adresse of database server ( machine on which DB is running) ?
    many thanks.
    I know the followings but non lets know (but if I'm wrong).
    SYS_CONTEXT('USERENV','TERMINAL') terminal,
    SYS_CONTEXT('USERENV','LANGUAGE') language,
    SYS_CONTEXT('USERENV','SESSIONID') sessionid,
    SYS_CONTEXT('USERENV','INSTANCE') instance,
    SYS_CONTEXT('USERENV','ENTRYID') entryid,
    SYS_CONTEXT('USERENV','ISDBA') isdba,
    SYS_CONTEXT('USERENV','NLS_TERRITORY') nls_territory,
    SYS_CONTEXT('USERENV','NLS_CURRENCY') nls_currency,
    SYS_CONTEXT('USERENV','NLS_CALENDAR') nls_calendar,
    SYS_CONTEXT('USERENV','NLS_DATE_FORMAT') nls_date_format,
    SYS_CONTEXT('USERENV','NLS_DATE_LANGUAGE') nls_date_language,
    SYS_CONTEXT('USERENV','NLS_SORT') nls_sort,
    SYS_CONTEXT('USERENV','CURRENT_USER') current_user,
    SYS_CONTEXT('USERENV','CURRENT_USERID') current_userid,
    SYS_CONTEXT('USERENV','SESSION_USER') session_user,
    SYS_CONTEXT('USERENV','SESSION_USERID') session_userid,
    SYS_CONTEXT('USERENV','PROXY_USER') proxy_user,
    SYS_CONTEXT('USERENV','PROXY_USERID') proxy_userid,
    SYS_CONTEXT('USERENV','DB_DOMAIN') db_domain,
    SYS_CONTEXT('USERENV','DB_NAME') db_name,
    SYS_CONTEXT('USERENV','HOST') host,
    SYS_CONTEXT('USERENV','OS_USER') os_user,
    SYS_CONTEXT('USERENV','EXTERNAL_NAME') external_name,
    SYS_CONTEXT('USERENV','IP_ADDRESS') ip_address,
    SYS_CONTEXT('USERENV','NETWORK_PROTOCOL') network_protocol,
    SYS_CONTEXT('USERENV','BG_JOB_ID') bg_job_id,
    SYS_CONTEXT('USERENV','FG_JOB_ID') fg_job_id,
    SYS_CONTEXT('USERENV','AUTHENTICATION_TYPE')
    authentication_type,
    SYS_CONTEXT('USERENV','AUTHENTICATION_DATA')
    authentication_data,
    SYS_CONTEXT('USERENV','CURRENT_SQL') current_sql,
    SYS_CONTEXT('USERENV','CLIENT_IDENTIFIER') client_identifier,
    SYS_CONTEXT('USERENV','GLOBAL_CONTEXT_MEMORY')

    We have 10g and 9i DBs. We should be able to know to which machine user is connected.
    Thank you.
    On 9i I tested :
    SQL> select SYS_CONTEXT('USERENV','hostname') from dual;
    select SYS_CONTEXT('USERENV','hostname') from dual
    ERREUR à la ligne 1 :
    ORA-02003: invalid USERENV parameter

  • Error in substr(sys_context('userenv','ip_address'),1,20)

    Hi GURUS,
    I m new to oracle here i created a table in oracle 10g(10.1.0.2.0) named
    create table iv_master(
    iv_code varchar2(6) not null,
    iv_name varchar2(50) not null,
    created_at varchar2(15) default substr(sys_context('userenv','ip_address'),1,20),
    created_on date default sysdate,
    created_by varchar2(5) not null,
    modified_at varchar2(15) default substr(sys_context('userenv','ip_address'),1,20),
    modified_on date default sysdate,
    modified_by varchar2(5) not null,
    constraint iv_master_pk primary key(iv_code))
    Now i want to remove this 'default' keyword in created_at & modified_at fields
    i tried alter table command but it is not working.tell me the way to remove this default keyword and also in created_on ,modified_on..(without dropping the table)
    i tried the following statement,
    create table test (ipaddr varchar2(20) SUBSTR(SYS_CONTEXT('USERENV','IP_ADDRESS')1,20));
    but i m getting.this following error
    ERROR at line 1:
    ORA-00922: missing or invalid option
    pls tell me where i m wrong...and also tell me the query to do it...
    Advance thanks for all...

    Hi,
    bharathit wrote:
    Hi GURUS,
    I m new to oracle here i created a table in oracle 10g(10.1.0.2.0) named
    create table iv_master(
    iv_code varchar2(6) not null,
    iv_name varchar2(50) not null,
    created_at varchar2(15) default substr(sys_context('userenv','ip_address'),1,20),
    created_on date default sysdate,
    created_by varchar2(5) not null,
    modified_at varchar2(15) default substr(sys_context('userenv','ip_address'),1,20),
    modified_on date default sysdate,
    modified_by varchar2(5) not null,
    constraint iv_master_pk primary key(iv_code))
    Now i want to remove this 'default' keyword in created_at & modified_at fieldsYou can't have the default functionality without the "DEFAULT" keyword.
    Are you saying that you no longer want a default value? That's the same as saying DEFAULT NULL, and you can change the table like this:
    ALTER TABLE  iv_master
    MODIFY       ( created_at     DEFAULT NULL
              , modified_at     DEFAULT NULL
              );Edited by: Frank Kulash on Feb 17, 2010 12:59 PM
    Changed ALTER TABLE example to modify both columns.

  • SELECT SYS_CONTEXT ('userenv', 'ip_address') FROM dual;

    I am using the following query
    SELECT SYS_CONTEXT ('userenv', 'ip_address') FROM DUAL:
    and the retuned row is blank.
    Any Idea why?

    SELECT SYS_CONTEXT ('userenv', 'ip_address') FROM dual
    will return the IP address of the client of the current session. If the current session is connected to a local database (i.e. not using SQL*NET), then this query appears to return NULL.
    SELECT SYS_CONTEXT ('userenv', 'host') FROM dual
    will return the host name from which the client is connected, even if the client is connected locally.
    If the host name is not sufficient, then I'm not sure what your other options are (perhaps writing a java stored procedure which returns the IP address of the database server? always connecting via SQL*Net?)

  • Sys_context procedure not return ip address

    Hello,
    db 11gr1
    what would be the reason that this query not return an ip_address?
    select sys_context('userenv', 'ip_address') from dual;
    Thanks,

    what would be the reason that this query not return an ip_address?USERENV does not know what the IP# is.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> select sys_context('userenv', 'ip_address') from dual;
    SYS_CONTEXT('USERENV','IP_ADDRESS')
    --------------------------------------------------------------------------------It could be because you are logged in locally & not via SQL*Net
    Edited by: sb92075 on Oct 27, 2010 12:53 PM

  • Not matching the SYS_CONTEXT('USERENV', 'LANG') with oracle fod schema data

    I have imported the fod schema into oracle XE. I observed that the data available for following languages:
    SQL> select distinct language from category_translations;
    LANGUAGE
    EN
    EL
    FR
    DE
    JA
    But, when I check the value for the LANG in oracle XE, it is returning as 'US'.
    SQL> select SYS_CONTEXT('USERENV','LANG') FROM DUAL;
    SYS_CONTEXT('USERENV','LANG')
    US
    Becasue of this, I am not getting data when I run VOs from JDeveloper. Even I am not able to see data from FOD schema views.
    Please suggest what changes I need to do for getting data.

    Try this,it will work
    alter session set nls_language = 'GREEK'
    If the above query is used,it will set the current session's language code to 'GL' which is valid in the language filed of category_translations.
    I did not find any nls_language value to get the 'EN' code.
    You can get the valid language values from the below query:
    select * from V$NLS_VALID_VALUES where parameter='LANGUAGE'
    Thanks,
    Mohan

  • It is possible to get NULL in SYS_CONTEXT('USERENV','OS_USER') .?

    Hi ,
    I am using below query in my procedure. Can it possible below query give NULL. If yes then which Case...?
    SELECT SYS_CONTEXT('USERENV','OS_USER')
    FROM DUAL
    Thanks lot..
    Edited by: user8568838 on Mar 1, 2011 2:05 AM
    Edited by: user8568838 on Mar 1, 2011 2:27 AM

    BluShadow wrote:
    smon wrote:
    Please apologize and remove the word 'Urgent'.lol, lighten up!It's not about lightening up, it's about people coming here and being rude by assuming everyone should drop what they're doing to help them "urgently". You would consider it rude if you were busy talking to people in a room and someone came in demanding your urgent attention without consideration for what you're doing.
    I've now edited the subject line to remove the "urgent" from it.That isn't the intention, to get everyone to drop what they're doing. Marking it as urgent just means the clocks ticking at his end, he isn't haughtily making demands of me, you or anyone else.
    The meeting room analogy doesn't work, as the poster isn't barging in and disturbing us from whatever else we're doing. He's passively posting on a forum, and we're actively looking for his, or anyone elses posts, to read and reply to. If I'm busy doing something else, then the poster with the urgent problem isn't disturbing me, because I'm not on the forum.

  • Form 6i not support this SELECT sys_context('userenv', 'host') from dual;

    hi master
    sir i use this command for user ip address
    SELECT sys_context('userenv', 'host'), sys_context('userenv', 'ip_address') FROM dual;
    BUT
    form6i give me this error
    Error 201 at line 26, column 12
    Identifier ‘SYS_CONTEXT’ must be declared
    please give me idea how i get ip_address in form
    thank

    thank for your reply
    sir my need is
    i check user computer name if that computer in table then i update the user feeding ouer wise i insert that computer name as new and give the feeding form access to user
    you see my code
    SELECT sys_context('userenv','host'), sys_context('userenv', 'ip_address') INTO HOSTNAME,IPADD FROM dual;
    SELECT COUNT(*) INTO USERCOUNT FRoM forclosingyear WHERE HOSTNAME=HOSTNAME AND IPADD=IPADD;
    IF USERCOUNT>0 THEN
    update forclosingyear SET YEARID=:SYID,datefrom=:ysdate,dateto=:yedate WHERE HOSTNAME=HOSTNAME AND IPADD=IPADD;
    ELSIF USERCOUNT=0 THEN
    INSERT INTO forclosingyear (YEARID,datefrom,dateto,HOSTNAME,IPADD) VALUES (:SYID,:ysdate,:yedate,HOSTNAME,IPADD);
    END IF;
    this is my need
    please give me idea how i get termenal name or user computer name
    thank
    aamir

  • Function module that will return week  details

    Anyone know Sap FM that will return Week  details(as below)for a given start and end dates (similar to the function module HR_99S_INTERVAL_BETWEEN_DATES which  returns details for a month) independent of factory calendar
    I am expecting
    Inputs
    Start Date  - 01/01/2005
    End Date   -  05/05/2006
    outputs
    WK YEAR BEGDA      ENDDA      
    02 2005 01/03/2005 01/09/2005 
    03 2005 01/10/2005 01/16/2005 
    04 2005 01/01/2005 01/23/2005
    Thank, Bill

    Hi Bill,
    FM is <b>GET_WEEK_INFO_BASED_ON_DATE</b>
    Here's a test-program for your requirement:
    REPORT zforum09 LINE-SIZE 255.
    PARAMETERS:fdate  LIKE sy-datum DEFAULT '20050103',
               tdate  LIKE sy-datum DEFAULT '20060505'.
    DATA : BEGIN OF itab OCCURS 0,
           week LIKE scal-week,
           from LIKE sy-datum,
           to LIKE sy-datum,
           END OF itab,
           next LIKE sy-datum.
    next = fdate.
    WHILE tdate > itab-to.
      CALL FUNCTION 'GET_WEEK_INFO_BASED_ON_DATE'
           EXPORTING
                date   = next
           IMPORTING
                week   = itab-week
                monday = itab-from
                sunday = itab-to.
      next = itab-from + 7.
      APPEND itab.
    ENDWHILE.
    LOOP AT itab.
      WRITE:/ itab-week+4(2),
              itab-week(4),
              itab-from,
              itab-to.
    ENDLOOP.
    Regards Andreas

  • DB13 error -- Function DB6_PLAN_DELETE_BATCH failed with return code = Job

    hello All,
    when I try to delete or edit any DBA Job in transaction DB13 the following error is displayed:
    An error occurred when processing system
    Function DB6_PLAN_DELETE_BATCH failed with return code = Job error
    How can I fix this error and delete or change my DBA jobs?
    My syste is SAP ECC 6.0 SR3 - Solaris 10 - Oracle 10.2.0.4.0
    Thanks
    Hernando

    Hello Hernando,
    Let's see what this SAP Note says,
    Note 1093883 - ORACLE: Function module DB6_PLAN_ADD_BATCH fails
    Edit: However, 'valid release' makes confusion
    Regards
    Subbarao
    Edited by: subbarao chinta on Oct 8, 2009 9:00 PM

  • Hi Experts, replace function module WS_QUERY to return the name of OS?

    Hi Experts,
    the function WS_QUERY can return your computer operating system, you can try it SE37(WS_QUERY), and only give value 'OS' to the QUERY parameter and execute the function, you can see it in RETURN parameter, but now this function is obsolete and I must replace it with another function or method, can anyone of you tell me which function can totally(the return value need to be the same, but any valuable feedback is also welcome) replace it? thanks in advance!
    Kind regards
    Dawson

    Hi Dawson,
    You can use the static method GET_PLATFORM of the class CL_GUI_FRONTEND_SERVICES.
    Regards,
    Jeevan

  • What is the transaction to trace all the function module and its returned m

    HI ,
    What is the transaction to trace ALL the function module and its returned messages in a program/transaction execution?
    Thank you.

    You can use this function module for that purpose.
    RS_CROSSREFERENCE

  • Function DB6_PLAN_STOP_BATCH_JOB failed with return code = Job error

    Hi team,
    I have issue with "SAP_COLLECTOR_FOR_PERFMONITOR" Job .it has been Finished but in Job Log I get error as below:
    Job started
    Step 001 started (program RSCOLL00, variant , user ID DDIC)
    Clean_Plan:Cleanup of DB13 Plannings
    Clean_Plan:started by RSDBPREV                       on server sapqas01
    Clean_Plan:Cleaning up jobs of system QAS
    Function DB6_PLAN_STOP_BATCH_JOB failed with return code = Job error
    Clean_Plan:terminated with error
    REASON=Job error
    Database system not supported
    Reorganization of the database started
    Reorganization of the database ended
    Job finished
    I have alredy reschedule this Job in 000 with DDIC User.
    Please help me ,
    Thanks
    Vijay

    Hello Vijay,
    The "Database system not supported" error you see, suggests that your TCOLL table is not setup correctly. You probably have a report scheduled in your TCOLL which is for a different DB then the one you run.
    If the collector canels all the time, then this is probably a report which is scheduled to run every hour in your TCOLL. If it only cancels sometimes, then it should be easier to identify which report is causing it in your TCOLL.
    The bottom line is to ensure your TCOLL is setup correctly and that you are not running DB reports there that are for a different DB than the one you use. The SAP note you follow to setup your TCOLL table depends on your SAP system version:
    12103 - Contents of the TCOLL table
    970449 - Contents of TCOLL table in SAP_BASIS 640
    966309 - Contents of table TCOLL in SAP_BASIS 700
    966631 - Contents of TCOLL table in SAP_BASIS 710
    Regards,
    Brendan

  • When userenv('CLIENT_INFO') return too much information?

    We just applied some oracle patches and now when when I do a "select trim(userenv('CLIENT_INFO')) from dual", I am getting PETERRA:1389409584404465. All I want/need is JUST the user name (PETERRA). This worked before our DBAs applied the patch(es).
    Is there a setting I can change to only get the user name - not the "extra" information?
    Please advise.

    SleepDeprivedInSeattle wrote:
    We just applied some oracle patchesWhat patches?
    and now when when I do a "select trim(userenv('CLIENT_INFO')) from dual", I am getting PETERRA:1389409584404465. All I want/need is JUST the user name (PETERRA). This worked before our DBAs applied the patch(es). See +{message:id=10387545}+ : this appears to be a bug or undocumented change in behaviour introduced at some point between 3.0.0 and 4.1.1.
    It's not just the length/additional data, its the difference between the information returned by <tt>CLIENT_INFO</tt> and <tt>CLIENT_IDENTIFIER</tt> (builder session ID and runtime app session ID?)
    Oracle didn't respond to that thread.
    Is there a setting I can change to only get the user name - not the "extra" information?Not that I'm aware of. Can you trim off the extra info?

  • Question about cursors in a function and how to return the results

    Hi all,
    Some tech info:
    I'm using Oracle 11G database and APEX 4.0.2.00.06
    I use three cursors in a function. My function is called in an APEX standard report, like this by example:
    SELECT fnc_exp(tab.arg1, tab,arg2) FROM table_exp tab;
    My question is: how can I return the values calculated from my function to a standard APEX report? Before, this function was used like this by Oracle Forms to fetch the cursors in the right table columns:
    open c_a;
    fetch c_a into :loc.arg1;
    close c_a;
    open c_b;
    fetch c_b into :loc.arg2, :loc.arg3, :loc.arg4, :loc.arg5;
    close c_b;
    Thanks for your advices!
    Maybe my solution is not right, if you have better ideas, please suggest :)
    PS: If you need more details, please ask which you need.

    Hi,
    I don't think you can do exactly like that in APEX.
    Go for a pipelined function if you want the value be returned from the function.

Maybe you are looking for

  • Want to stop for opening multiple frames ????

    Dear i am working on an application . in that there is a frame ok in that frame there is a button. so when u click on that button a new frame will open ok now the problem is that. suppose u click 5 times on that button so that button will open 5 same

  • Uploading Video Directly to Internet

    I am shooting some video for a company who wants me to upload the video to their website afterwards. I don;t want to have to "upload" to my iMac and then transfer it to the website, but go directly from camera to website through the iMac. The website

  • Cleaning Up Vector (array like) in pure AS3 project

    I have been learning a game type animation from a tutorial at this site: http://www.emanueleferonato.com/2011/11/08/as3-version-of-nodes-engine-full-playable-game- with-infinite-solvable-levels/. Source code there online and also available for downlo

  • Do you have to have songs imported into the Library?

    Hi, I have an external drive plugged into my computer with lots of MP3s. When I click a file it plays via iTunes as expected. However, iTunes makes a copy of the file and puts it in /Users/Shmerls/Music/iTunes/iTunes Music/ So I end up with duplicate

  • IMac restarts all the time because of kernel panics

    Hi, I bought an iMac several days ago.  It restarts several times a day because of kernel panics. I made apple diadnostics. It says evering is OK. Could anybody help me to understand what causes the restarts? Here is one of the error reports: Anonymo