بتاريخ: 1 نوفمبر 200520 سنة comment_50623 اخواني فاللهارجو منكم المساعدة في معرفة ip الخاص بجهازclientهل ممكن يا ريت المساعدةاخوكم غريب تقديم بلاغ
بتاريخ: 1 نوفمبر 200520 سنة comment_50654 select sys_context('userenv','ip_address') from dual;---------------------------Have you tried to use D2KWUTIL library? There is a function to get a computer name. (WIN_API_ENVIRONMENT.Get_Computer_Name)-----------------------------You could HOST out and do some sort of IPCONFIG then read back in with TEXT_IO.----------------------you use the PL/SQL toolkit to get this then use OWA_UTIL package, which contains two procedures, one for listing all the environment variables and one for retrieving them on a single named basis.-----------------------:global.ip := sys.client_ip_address;----------------------select sys_context('USERENV','IP_ADDRESS') into :global.ip from dual;orhost('cmd/c "c:&cd\&ipconfig > c:\oratemp\ip.txt"');then read in with text_io... ahmed تقديم بلاغ
بتاريخ: 2 نوفمبر 200520 سنة كاتب الموضوع comment_50667 اخي العزيز احمد شكرا علي سرعة الاستجابةانا شغال DEVELOPPER 10Gجربت الكود DECLARE V1 VARCHAR2(50);BEGIN select sys_context('userenv','ip_address') INTO V1 from dual; MESSAGE(V1); MESSAGE(V1);END;للاسف وانا علي جهاز الCLIENTبيجيب IPالخاص بالجهاز اللي موجود عليه APPLICATIONالموجود عليه البرامجهيه دي المشكلةومشكلتي الاكبر اني حاسس ان الحل في WEBUTILبس والله بقالي 5شهور مش عارف انزلهاشكرا للتعاوناخوك غريب تقديم بلاغ
بتاريخ: 2 نوفمبر 200520 سنة comment_50673 الاخ الكريم اليك هذا الرابط قد يفيد بالاجابةhttp://www.araboug.org/ib/index.php?sho...2532&hl=webutil تقديم بلاغ
بتاريخ: 2 نوفمبر 200520 سنة comment_50675 A simple way to get the computer name on the Windows platform in client/server mode istool_env.getvar('COMPUTERNAME', l_str);The similar technic should be possible on other platforms.Another possibility is to use the database session information:select sys_context('userenv', 'host'), sys_context('userenv', 'ip_address') from dual;I suppose this will give the name and address of the application server in web-mode. -----------------------------------------اخي غريبلقد قمت بالحصول علي ocx لهزا الغرضوعملنا لها فورمة فيجوال بيزك والان انا بصدد تحويلها الي اوراكل بمعاونة الاخ الفاضل عبد الله ندا لتعطي فوائد أكثر وأكثرأرجوا ارسال بريد لي للتفاهم حول عمل مشترك للحصول علي نتائج ثم نقدم أحسن ما توصلنا اليه اجل المنتدي[email protected] تقديم بلاغ
بتاريخ: 2 نوفمبر 200520 سنة comment_50676 finding IP of clients connected to a particular server Once you can see the IP address in v$session, you can deny access to a specific IP in the login trigger. ----------------create or replace trigger ctrl_host after logon on databasedeclare host number := 0; dba number := 0;begin select 1 into host from v$session where osuser<>'SLE7412'; select 1 into dba from dba_role_privs where grantee= USER and granted_role='DBA'; if host = 1 and dba = 0 then raise_application_error(-1, 'Connection Refused'); end if;end;/------------[email protected]> select sys_context('userenv', 'ip_address' ) from dual;SYS_CONTEXT('USERENV','IP_ADDRESS')--------------if ( sys_context('userenv','ip_address') = 'IP ADDRESS OF BAD HOST' ) AND proc_role( 'DBA' ) <> 1 ) then raise_application_error( -20001, 'connection refused' ); end if;-----------create or replace trigger on_logon_triggerafter logon on databasebegin dbms_application_info.set_client_info( 'logon ' || sys_context( 'userenv', 'ip_address' ) );end;/---------------create or replace trigger logontrigafter logon on databaseDECLARE asid NUMBER; aprogram VARCHAR2(48); ausername VARCHAR2(30); aserial NUMBER;BEGINexecute immediate 'select v.sid, v.program, v.username, v.serial# from v$session v where sid = ( select sid from v$mystat where rownum = 1 )' INTO asid, aprogram, ausername, aserial; if ausername='SHRAV' THEN execute immediate 'insert into shrav.shrav_log values (100)'; end if;COMMIT;END;/-------------------SQL> select UTL_INADDR.GET_HOST_ADDRESS from dual;----------------------with the following statement you can get your pc's machine name:SELECT UPPER(USERENV('TERMINAL'))FROM DUAL;----------------------host('ipconfig > c:\Temp\Ipconfig.txt', no_screen); use Text_IO to read and parse this file to get the IP address.---------------------- you can try the following APIs for getting the users IP addressbeginreturn wwctx_api.get_ip_address;exceptionwhen wwctx_api.NO_SESSION_EXCEPTION thenreturn 'unknown';end;wwctx_api.get_ip_address can be used to get the Internet Protocol (IP) address of the current, logged in Oracle Portal user's browser-------------HOST('su - root '||:root_password||'; ping hostname');------ utl_tcp.open_connection to check if you can open a tcp connection,-------------- تقديم بلاغ
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.