الانتقال إلى المحتوى
View in the app

A better way to browse. Learn more.

مجموعة مستخدمي أوراكل العربية

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

مراقبه الدخول والخروج للمستخدمين فى قاعده البيانات مع تسجيلها فى جدول داخل قاعده البيانات

Featured Replies

بتاريخ:

CONNECT / AS SYSDBA

DROP TABLE user_login_audit;

CREATE TABLE user_login_audit (
login_time	DATE,
username        VARCHAR2(30),
machine		VARCHAR2(30),
       command		VARCHAR2(128)
);

CREATE OR REPLACE TRIGGER user_login_trig
AFTER LOGON ON scott.SCHEMA
DECLARE
 v_username sys.v_$session.username%TYPE;
 v_machine  sys.v_$session.machine%TYPE;
 v_command  sys.v_$session.command%TYPE;
BEGIN SELECT username, machine, command 
   INTO v_username, v_machine, v_command
   FROM sys.v_$session WHERE audsid = USERENV('SESSIONID') AND audsid != 0  -- Don't Check SYS Connections AND rownum = 1;  -- Parallel processes will have the same AUDSID's

 INSERT INTO sys.user_login_audit VALUES (SYSDATE, v_username, v_machine, v_command);

 IF UPPER(v_machine) like '%PC1%' THEN		-- Start SQL trace for users from PC1 dbms_session.set_sql_trace(TRUE);
 END IF;
END;
/
SHOW ERRORS

CONNECT SCOTT/TIGER

CONNECT / AS SYSDBA

SELECT * FROM sys.user_login_audit;

  • بعد 8 شهور...
بتاريخ:

جامد ياابو حمييييييييد

  • بعد 5 شهور...
بتاريخ:

لم أستطع انشاء التريغر وظهر لي الخطأ التالي :

Warning: Trigger created with compilation errors.



SQL> show errors
Errors for TRIGGER USER_LOGIN_TRIG:

LINE/COL ERROR
-------- -----------------------------------------------------------------
5/7 PL/SQL: SQL Statement ignored
8/2 PL/SQL: ORA-00933: SQL command not properly ended
12/1 PLS-00103: Encountered the symbol "END" when expecting one of the
following:
begin case declare exit for goto if loop mod null pragma
raise return select update while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge
<a single-quoted SQL string> pipe



:( أفيدوني دام فضلكم

  • بعد 7 شهور...
بتاريخ:

CONNECT / AS SYSDBA

DROP TABLE user_login_audit;

CREATE TABLE user_login_audit (
login_time	DATE,
username        VARCHAR2(30),
machine		VARCHAR2(30),
       command		VARCHAR2(128)
);

CREATE OR REPLACE TRIGGER user_login_trig
AFTER LOGON ON scott.SCHEMA
DECLARE
 v_username sys.v_$session.username%TYPE;
 v_machine  sys.v_$session.machine%TYPE;
 v_command  sys.v_$session.command%TYPE;
BEGIN SELECT username, machine, command 
   INTO v_username, v_machine, v_command
   FROM sys.v_$session WHERE audsid = USERENV('SESSIONID') AND audsid != 0  -- Don't Check SYS Connections AND rownum = 1;  -- Parallel processes will have the same AUDSID's

 INSERT INTO sys.user_login_audit VALUES (SYSDATE, v_username, v_machine, v_command);

 IF UPPER(v_machine) like '%PC1%' THEN		-- Start SQL trace for users from PC1 dbms_session.set_sql_trace(TRUE);
 END IF;
END;
/
SHOW ERRORS

CONNECT SCOTT/TIGER

CONNECT / AS SYSDBA

SELECT * FROM sys.user_login_audit;


بتاريخ:

Dear Dr. Ahmed,
CanI use this code tin Access Database, of course with changes in variablee names and kinds?
Also, is it possible to lgeneralize using a table or a form from any other pc in the Local Access Network?
For example, I have an access database and I need to link it to the department's website, so the employee can get access to the table needed to enter his/her travel request, and may be change times of his arrival later on.
Can we do that?
Thanks

Lhenboss

بتاريخ:
  • كاتب الموضوع

الاخ Lhenboss

انت تعلم جيدا ان قواعد بيانات اكسس ضعيفه للغايه ولا يوجد بها تريجر مثل الاوراكل على مستوى اليوزر ولكن... التريجر يعمل مع قاعده اكسس بروجكت مرتبط بسكول سرفر مثلا حيث انه يعتمد على سكول سرفر فى تنفيذ هذا التريجر
هذا على حد علمى ويقال انه يمكن تنفيذ بعض العمليات البسيطه على البيانات باستخدام VBA
ولكن اعذرنى فخبرتى ليست فى هذا المجال اطلاقا وارجو من الاخوه افادتنا ببعض الامثله التوضيحيه لاكواد VBA لكى تعم الفائده

وهنا رابط لموقع يوجد به اداه لاداره قاعده بيانات اكسس لعلها تفيدك

هنـــــــــــــــــــــــــــا

اتمنى اكون افدتك






بتاريخ:

Dear Dr. Ahmed,
CanI use this code tin Access Database, of course with changes in variablee names and kinds?
Also, is it possible to lgeneralize using a table or a form from any other pc in the Local Access Network?
For example, I have an access database and I need to link it to the department's website, so the employee can get access to the table needed to enter his/her travel request, and may be change times of his arrival later on.
Can we do that?
Thanks

Lhenboss
بتاريخ:

شكرا لك يا دكتور على سرعةالرد، نعم أفدتني كثيرا وسوف نتواصل إن شاء الله في الأوراكل داتابيس في الفادم من الأيام

أخوك/ أبوزيد

بتاريخ:

الله يعطيك العافية

انا مبتدأ جدا dba

ولما انشأت التالي

CREATE TABLE user_login_audit (
       login_time      DATE,
       username        VARCHAR2(30),
       machine         VARCHAR2(30),
       command         VARCHAR2(128)
);

CREATE OR REPLACE TRIGGER user_login_trig
       AFTER LOGON ON scott.SCHEMA
DECLARE
 v_username sys.v_$session.username%TYPE;
 v_machine  sys.v_$session.machine%TYPE;
 v_command  sys.v_$session.command%TYPE;
BEGIN SELECT username, machine, command 
   INTO v_username, v_machine, v_command
   FROM sys.v_$session WHERE audsid = USERENV('SESSIONID') AND audsid != 0  -- Don't Check SYS Connections AND rownum = 1;  -- Parallel processes will have the same AUDSID's

 INSERT INTO sys.user_login_audit VALUES (SYSDATE, v_username, v_machine, v_command);

 IF UPPER(v_machine) like '%PC1%' THEN         -- Start SQL trace for users from PC1 dbms_session.set_sql_trace(TRUE);
 END IF;
END;
/



ظهرت لي رسالة
تم تكون زناد مع اخطاء ترجمة

وشكرا لك انتظر ردك

بتاريخ:
  • كاتب الموضوع

الله يعطيك العافية

انا مبتدأ جدا dba

ظهرت لي رسالة
تم تكون زناد مع اخطاء ترجمة

وشكرا لك انتظر ردك


برجاء ذكر الرساله كامله مع ذكر مااذا كنت متصلا باليوزر SYS اثناء تنفيذ هذا الاجراء ام لا
بتاريخ:

اي نعم استاذي القدير كنت داخل باليوزر sys

انا نازل عندب Oracle sql puls نازل عندي عرببي فتظهر الرسائل باللغة العربية

هو تم تكون الجدول صح TABLE user_login_audit

بس REPLACE TRIGGER هي فيها مشكلة عندي

تظهر في اخر شي رسالة بالعربي بهذا النص

تحذير:تم تكوين زناد مع اخطاء ترجمة

تم تعديل بواسطة Dr.TIGer

بتاريخ:

Warning: Trigger created with compilation errors.

بتاريخ:
  • كاتب الموضوع

اخى العزيز قم بتجربه هذا الكود مع تغيير قيمه PC1 الى الجهاز الذى تريد متابعته

 CREATE OR REPLACE TRIGGER user_login_trig
	AFTER LOGON ON scott.SCHEMA
DECLARE
v_username sys.v_$session.username%TYPE;
v_machine sys.v_$session.machine%TYPE;
v_command sys.v_$session.command%TYPE;
BEGIN SELECT username, machine, command 
INTO v_username, v_machine, v_command
FROM sys.v_$session WHERE audsid = USERENV('SESSIONID') AND audsid != 0 ; -- Don't Check SYS Connections AND rownum = 1; -- Parallel processes will have the same AUDSID's


IF UPPER (v_machine) like '%PC1%' THEN 
INSERT INTO user_login_audit VALUES (SYSDATE, v_username, v_machine, v_command);
	END IF ;
END;
/



تحياتى

بتاريخ:

جزاك الله كل خير تم انشاء TRIGGER لكن
1-انا حطيت بدال pc1 اسم جهازي هل كذا صح ( طيب لو عندي اكثر من جهاز اريد ان اراقبه) ماهي الطريقة ؟
2- انا بعد انشاء TRIGGER
نفذت التالي
CONNECT SCOTT/TIGER

CONNECT / AS SYSDBA

SELECT * FROM sys.user_login_audit;

لم يسجل اي معلمومات هل يوجد عندي خطا

انتظرك على احر من الجمر يالغالي


اخى العزيز قم بتجربه هذا الكود مع تغيير قيمه PC1 الى الجهاز الذى تريد متابعته

 CREATE OR REPLACE TRIGGER user_login_trig
	AFTER LOGON ON scott.SCHEMA
DECLARE
v_username sys.v_$session.username%TYPE;
v_machine sys.v_$session.machine%TYPE;
v_command sys.v_$session.command%TYPE;
BEGIN SELECT username, machine, command 
INTO v_username, v_machine, v_command
FROM sys.v_$session WHERE audsid = USERENV('SESSIONID') AND audsid != 0 ; -- Don't Check SYS Connections AND rownum = 1; -- Parallel processes will have the same AUDSID's


IF UPPER (v_machine) like '%PC1%' THEN 
INSERT INTO user_login_audit VALUES (SYSDATE, v_username, v_machine, v_command);
	END IF ;
END;
/



تحياتى

  • بعد 7 شهور...
بتاريخ:

اريد معرفة هل المستخدم قام بتعديل في البيانات او مسح وما هذه التعديلات
افادكم الله عز وجل

انضم إلى المناقشة

يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.

زائر
أضف رد على هذا الموضوع...

Account

Navigation

البحث

البحث

إعداد إشعارات المتصفح الفورية

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.