الانتقال إلى المحتوى
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.

prevent objects getting dropped by user by mistake

Featured Replies

بتاريخ:

This trigger secures the objects from getting dropped by mistake by a user.



Create a table for example called SECURED_OBJECTS with a column objectname with varchar2(20) o

Insert a record in this table with a value, the name of the object which should not get dropped





Create or replace trigger check_beforedrop before drop on database 
declare 
oname char(20); 
begin select objectname into oname from secured_objects where upper(objectname)=ora_dict_obj_name; 
if sql%found then 
RAISE_APPLICATION_ERROR(-20001,'You didnot want this object to be dropped'); 
end if; 
exception 
when no_data_found then 
dbms_output.put_line('This object will be dropped'); 
end;



Once this trigger is created, we can not the drop the object whose name is entered in the above table. In case it needs to be dropped ,remove the entry from the secured_objects table.

NOTE: This is a simple procedure to protect the objects from getting dropped.
Can be modified with more features.
Comments from DBA'S and develepers are requested

تم تعديل بواسطة bedooracle

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

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

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

برجاء الإنتباه

بإستخدامك للموقع فأنت تتعهد بالموافقة على هذه البنود: سياسة الخصوصية

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.