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

How to drop all tables and corresponding objects

Featured Replies

بتاريخ:

How to drop all tables and there corresponding objects
????????????????????

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

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

ألسلا م عليكم
اتوقع الطريقة انك تحذف اليوسر بشكل كلي
والله اعلم
DROP USER USER_NAME CASCADE
تاكد وردلي خبر
[email protected]

بتاريخ:

طريقتك ممكن تنجح qaraqesho

بتاريخ:

drop user.....

بتاريخ:

اخي الكريم جرب هذا الكود طبعا ماخذه من موقع اجنبي اتمنى يفيدك
This script disables all constraints of a user..

/******************************************************************
** Nom         : disable_constraints.sql                         **
** Auteur      : PGL                                             **
** Date        : 07/04/1998                                      **
** Lancement   : Sous le compte a desactiver...                  **
** Description : Désactivation de toutes les contraintes actives **
**               d'un utilisateur avec sauvegarde du contexte    **
                dans la table CONSTRAINTS_DISABLED_TMP.         **
*******************************************************************/
DECLARE
       -- Curseur des contraintes actives. --
       CURSOR c_contraintes IS
       SELECT table_name, constraint_name
       FROM user_constraints WHERE constraint_type in ('P','R') AND status = 'ENABLED';

       -- Curseur pour test de l'existance de la table temp.
       CURSOR cDrop IS
       Select table_name
       from user_tables where table_name='CONSTRAINTS_DISABLED_TMP';


       Nom_Table user_constraints.table_name%TYPE;
       Nom_Const user_constraints.constraint_name%TYPE;

       Ignore INTEGER;
       cSQL   INTEGER;
       cSQL1   INTEGER;
       NomTmp VARCHAR2(30);

BEGIN --------- Suppression de la table temp si elle existe. -------------
    OPEN cDrop;
    FETCH cDrop INTO NomTmp; IF cDrop%NOTFOUND THEN
       ------------- La table n'existe pas : pas d'action particulière...
       NomTmp := '';
    ELSE  ----------- La table existe, on la vire...
       cSQL1 := DBMS_SQL.OPEN_CURSOR;
       DBMS_SQL.PARSE(cSQL1, 'DROP TABLE '||NomTmp, DBMS_SQL.V7);
       Ignore := DBMS_SQL.EXECUTE(cSQL1);
       DBMS_SQL.CLOSE_CURSOR(cSQL1);
    END IF; -------------------------------------------------------------
    CLOSE cDrop;
    -----------------------------------------------------------------------
    -- On crée la table de sauvegarde du contexte des contraintes.
    -- qui contient toutes les contraintes déjà désactivées et qui n'ont
    -- pas à être réactivées après. Cela permet de retrouver le même schéma
    -- après la manip.
    -----------------------------------------------------------------------
    cSQL1 := DBMS_SQL.OPEN_CURSOR;
    DBMS_SQL.PARSE(cSQL1, 'CREATE TABLE CONSTRAINTS_DISABLED_TMP AS SELECT constraint_name
                       FROM user_constraints WHERE constraint_type in (''P'',''R'') AND status = ''DISABLED''', DBMS_SQL.V7);
    Ignore := DBMS_SQL.EXECUTE(cSQL1);
    DBMS_SQL.CLOSE_CURSOR(cSQL1);
    ------------------------------------------------------------------------
    ---------------- Désactivation des contraintes actives -----------------
    ------------------------------------------------------------------------
    cSQL:= DBMS_SQL.OPEN_CURSOR;
    OPEN c_contraintes;
    LOOP
       FETCH c_contraintes INTO Nom_Table, Nom_Const;
       EXIT WHEN c_contraintes%NOTFOUND;
       DBMS_SQL.PARSE(cSQL, 'ALTER TABLE '||Nom_Table||' DISABLE CONSTRAINT '||Nom_Const||' CASCADE',DBMS_SQL.V7);
       Ignore := DBMS_SQL.EXECUTE(cSQL);
    END LOOP;
    CLOSE c_contraintes;
    DBMS_SQL.CLOSE_CURSOR(cSQL);
END;
/

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

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

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

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

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

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.