How can i get ipaddress of the client machine

I tried the below trigger to check the client ipaddress but
I am getting error 'identifier 'sys_context' must be declared'
Declare
     IP_ID varchar2(16);
     T_IP_ID NUMBER(15);
Begin
     select sys_context('USERENV','IP_ADDRESS') into IP_ID from dual;
     IF :EMP_NO IS NULL THEN
MESSAGE('ENTER YOUR USER_ID NOW');MESSAGE(' ');
Raise Form_Trigger_Failure;
ELSE
set_item_property('CHG_PWD',DISPLAYED,PROPERTY_TRUE);
BEGIN
SELECT USER_CATEGORY,IP_ADD INTO :GLOBAL.CAT,IP_ID from USER_ADMIN_MASTER
WHERE USER_ID = :EMP_NO AND T_IP_ID=IP_ID AND EFF_END_DATE IS NULL;
:GLOBAL.EMP := :EMP_NO;
NEXT_ITEM;
EXCEPTION
WHEN NO_DATA_FOUND THEN
BELL;
MESSAGE(TO_CHAR(:EMP_NO)||'- IS NOT A VAILD USER_ID ! PL CHECK AND RE-ENTER');
MESSAGE(' ');
RAISE FORM_TRIGGER_FAILURE;
END ;
END IF;
End;
Dev

I don't know, I use this in SQL*Plus script:
Try:
declare
cursor c_ctx is select
select  SYS_CONTEXT('USERENV','IP_ADDRESS') ip_address from dual:
ctx c_ctx%ROWTYPE;
IP_ID varchar2(15);
begin
   open c_ctx;
   fetch c_ctx into ctx;
   close c_ctx;
   IP_ID := ctx.ip_address;Regards

Similar Messages

Maybe you are looking for

  • Display very slow in RH8

    Hi all, I just upgraded to RH8 (via TCS 2). If I try to display a topic from the Project tab (double-click or right-click>Edit), it takes 5 to 10 seconds to actually display the topic in the Design tab - repeated for each topic, it makes things very

  • HP P7-1446s having volume issues (goes to 0 automatica​lly)

    my volume control keeps appearing upper right of my monitor and goes to 0 automatically.  I have to play with volume buttons on keyboard to get it to come back on but it goes to 0 again eventually.  I'm using an HP keyboard also.  This just started t

  • Can't install Flex B3 on Windows XP

    Hello, Can't solve this problem, Flex Builder 3 can't instalkl on Windows XP ! I have this error message : Installer User Interface Mode Not Supported : Unable to load and to prepare the installer in GUI mode. Someone can help ? Thanks !

  • How to uninstall Elements 8?

    I installed Elements 10, but when I tried to uninstall Elements 8 I get, "Error 1316. A network error occurred while attempting to read from the file C:\Windows\Installer\AdobePhotoshopElements8.0.msi"  I searched the web and found one set of instuct

  • Swapping components

    I have a gui built in swing, and the main part of this is a list of files in the content area, now when i click another button i need to remove that and replace it with a textarea, having some trouble getting my head around it, doesnt seem to be as s