How to Remove and Drop Datafiles from Tablespace in Oracle Database كيفية ازالة وانخفاض datafiles من tablespace في قاعدة بيانات اوراكل

Oracle RDBMS databases stores data logically in the form of tablespaces and physically in the form of data files. RDBMS تجربة قواعد البيانات أوراكل مخازن البيانات منطقيا في شكل tablespaces وجسديا في شكل ملفات البيانات. The datafiles are added to the tablespaces as database space requirement grows bigger. وقد datafiles تضاف الى قاعدة البيانات كما tablespaces الفضاء شرط تنمو اكبر. However, there are several reasons you may want to remove or delete data files from a tablespace. ومع ذلك ، هناك اسباب عديدة قد ترغب في ازالة ملفات البيانات او حذفها من tablespace. Such as accidentally add a wrongly sized or unwanted datafile to a tablespace, or the data space usage has became smaller and some data files want to be removed, or attempt to recover Oracle database which fails to start due to missing or corrupted datafiles by removing them, Oracle does not provide an easy way or user interface to delete or drop datafiles from a tablespace. مثل اضافة مصادفه أو خطأ غير المرغوب فيه datafile الحجم الى tablespace ، او استعمال البيانات الفضاء قد أصبح أصغر حجما وبعض ملفات البيانات يريد ان يكون ازالة ، او محاولة لاستعادة قاعدة البيانات أوراكل التي لم تبدأ بسبب المفقودين او تعرض للتلف منها عن طريق ازالة datafiles ، اوراكل لا توفر طريقة سهلة او واجهة المستخدم لحذف او اسقاط datafiles من tablespace. Once a datafile is made part of a tablespace, it can no longer be detached or removed from the tablespace, albeit there are several workarounds. مرة واحدة في datafile اعتماد جزء من tablespace ، فإنه لم يعد من الممكن فصل أو إزالتها من tablespace ، وان كان هناك العديد من workarounds.

How to Completely Drop the Whole Tablespace with All Datafiles تماما كيفية اسقاط كل tablespace مع جميع datafiles

The easiest way to drop a or multiple datafiles is by dropping the entire tablespace together with its datafiles. وأسهل طريقة لاسقاط أحد أو متعددة datafiles هو عن طريق اسقاط كامل tablespace جنبا الى جنب مع شركائها datafiles. If you no longer need the data contents of the tablespace, the following command will drop the tablespace, the datafile, and the tablespace’s contents from the data dictionary. اذا لم تعد في حاجة الى بيانات من المحتويات tablespace ، الامر التالي سوف اسقاط tablespace ، datafile ، وtablespace محتويات من قاموس البيانات. All of the objects that where contained in that tablespace are permanently removed. جميع الاشياء من حيث ان الوارد في ذلك ازالة tablespace بشكل دائم.

DROP TABLESPACE <tablespace name> INCLUDING CONTENTS AND DATAFILES; اسقاط اسم tablespace <tablespaceبما في المحتويات وdatafiles ؛

If you don’t specify “AND DATAFILES”, Oracle will not drop the physical datafile after the DROP TABLESPACE command, but you can always delete the files from operating system shell (If the data files are locked, restart the server). اذا كنت لا تحدد "وdatafiles" ، اوراكل لن اسقاط الماديه datafile بعد انحسار tablespace القيادة ، ولكن يمكنك دائما حذف الملفات من نظام التشغيل شل (اذا كانت البيانات هي ملفات مغلق ، واعادة تشغيل الخادم).

But always perform a backup of the database, as the “DROP TABLESPACE” command is irreversible. ولكن دائما احتياطيه من قاعدة البيانات ، حيث ان "انخفاض tablespace" القيادة لا رجعة فيه. It’s also a good practice to check and identify how many datafiles a tablespace actually has before performing the drop action in order to avoid mistake. ولكنها ايضا ممارسة جيدة لفحص وتحديد الكيفيه التي يمكن بها العديد من datafiles أ tablespace بالفعل قبل هبوط اداء العمل من اجل تجنب الخطأ.

How to Check How Many Datafiles a Tablespace Has كيفية التحقق من عدد tablespace وقد datafiles أ

To determine and identify all datafiles that link to a tablespace, use the following query, with tablespace name in capital letter: لتحديد وتحديد جميع datafiles التي تربط بين لtablespace ، باستخدام التالية استفسار ، مع اسم tablespace رأس المال في الرسالة :

SELECT file_name, tablespace_name اختر FILE_NAME ، tablespace_name
FROM dba_data_files من dba_data_files
WHERE tablespace_name =’<tablespace name>’; حيث tablespace_name = '<tablespaceاسم' ؛

If a tablespace contains multiple datafiles, and you just want to drop one or some of the datafiles and keep the remaining datafiles together with the objects and contents, the objects or data must be exported for the affected table space. اذا tablespace يتضمن عدة datafiles ، وكنت ترغب فقط لاسقاط واحد او بعض من datafiles والابقاء على ما تبقى من datafiles جنبا الى جنب مع الأشياء والمحتويات ، او الاشياء او البيانات يجب ان تكون للتصدير لانها المتضرره الجدول الفضاء. Once exported, the tablespace can be dropped with above “DROP TABLESPACE” command. مرة واحدة للتصدير ، tablespace يمكن الاستغناء عنها اعلاه مع "اسقاط tablespace" القيادة. Then, recreate the tablespace with the datafile(s) required (that you initially want to keep), and then import the objects into the recreated tablespace. ثم ، فان اعادة tablespace مع datafile (ق) المطلوبة (إن كنت تريد ان تبقي في البداية) ، ثم استيراد اشياء في صوغه tablespace.

If one or more datafiles is missing after a recovery process or accidental deletion, you can use ALTER DATABASE DATAFILE <datafile name> OFFLINE DROP command to make the datafile offline so that database can starts up after which the troubled tablespace can be dropped. كان واحدا او اكثر datafiles مفقود عملية الانتعاش بعد حذف او عارض ، يمكنك استخدام قاعدة بيانات datafile <datafileتغيير اسم القيادة الى انخفاض غير متصل جعل datafile غير متصل قاعدة بيانات بحيث يمكن ان تبدأ بعد tablespace المضطربه التي يمكن الاستغناء عنها. (See (انظر instruction to recover from missing datafiles تعليمات للتعافي من المفقودين datafiles .)

How to Resize a Datafile to Minimum Size كيف ا لتغيير الحد الادنى لحجم datafile

Another alternative to drop the datafile is by shrinking the size of datafile instead of dropping. وثمة بديل آخر لاسقاط datafile هو تقلص حجم datafile بدلا من الانخفاض. This option is only possible if there is no extents in the datafile. هذا الخيار لن يكون ممكنا الا اذا لم يكن هناك اي المديات في datafile. If there are none, it’s possible to resize the data file down to a very small file (2 blocks), where Oracle database will no longer create any extent in the datafile. اذا لا يوجد احد ، فمن الممكن لتغيير ملف البيانات نزولا الى ملف صغير جدا (2 بنات) ، حيث قاعدة البيانات أوراكل لن يخلق اي مدى في datafile. However, this workaround does not remove the datafile from tablespace nor delete the file physically, but it reduce the risk as no data will be truncated as only empty blocks are reduced. بيد ان هذا الحل لا من datafile ازالة tablespace ولا الغاء الملف جسديا ، ولكن الحد من خطر كما لا توجد بيانات سيتم اقتطاعها فارغه الا كما خفضت بنات. It simply makes it unusable and takes up almost close to no disk space. انها ببساطة غير قابلة للاستعمال ويجعله يأخذ تقريبا أي ما يقرب من المساحه على القرص الثابت. To resize a datafile, use the following query: لتغيير أ datafile ، استخدام الاستعلام التالي :

alter database datafile ‘<datafile name>’ resize 8M; تغيير قاعدة بيانات datafile '<datafileاسم' تغيير الحجم 8 م ؛

How to Determine the Extents inside Datafile كيفية تحديد المديات داخل datafile

To check and determine the extents that exists in a datafile, use this query: لفحص وتحديد المديات القائم في datafile ، واستخدام هذه الاستفسارات :

SELECT owner, segment_name اختيار مالك ، segment_name
FROM dba_extents a, dba_data_files b من dba_extents أ ، ب dba_data_files
WHERE a.file_id = b.file_id حيث a.file_id = b.file_id
AND b.file_name = ‘<datafile name>’ وb.file_name = '<datafileاسم'

IMPORTANT : This is a machine translated page which is provided "as is" without warranty. هام : هذا هو الاله الذي ترجم صفحة مقدمة "كما هى" دون ضمان. Machine translation may be difficult to understand. الترجمة الاليه قد يكون من الصعب ان نفهم. Please refer to يرجى الرجوع الى original English article المادة الاصليه English whenever possible. كلما كان ذلك ممكنا.

Share and contribute or get technical support and help at والمساهمة في حصة او الحصول على الدعم التقني والمساعدة فى My Digital Life Forums بلدي الرقميه الحياة المنتديات .



One Response to “How to Remove and Drop Datafiles from Tablespace in Oracle Database” رد واحد على "كيفية ازالة وانخفاض datafiles من tablespace في قاعدة بيانات اوراكل"

  1. How Drop Tablespace and Recover Oracle Database When Accidentally Delete Datafile » My Digital Life كيف تراجع tablespace واستعادة قاعدة البيانات أوراكل عند مصادفه حذف datafile »بلدي الحياة الرقميه
    August 4th, 2007 02:55 الرابع من آب / اغسطس ، 2007 02:55
    1

    [...] Tip: How to check datafiles that belong to tablespace. [...]نصيحه : للتأكد من كيفية datafiles التي تنتمي الى tablespace. [...]

Leave a Reply ترك الرد

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> يمكنك استخدام هذه العلامات : <ahref="" title=""> <abbrtitle=""> <acronymtitle=""> <b><blockquotecite=""> <cite><code><دل datetime = ""> <em><i><qCite=""> <strike><strong>

Subscribe without commenting اشترك بدون تعليق


Custom Search

New Articles المواد الجديدة

Incoming Search Terms for the Article الوافدة من حيث البحث عن المادة

oracle drop datafile اوراكل انخفاض datafile - -- oracle drop tablespace اوراكل انخفاض tablespace - -- drop datafile انخفاض datafile - -- remove datafile ازالة datafile - -- drop tablespace oracle انخفاض tablespace اوراكل - -- delete tablespace حذف tablespace - -- Drop datafile oracle انخفاض datafile أوراكل - -- drop tablespace datafile انخفاض tablespace datafile - -- drop datafiles انخفاض datafiles - -- remove datafile oracle ازالة datafile اوراكل - -- delete datafile حذف datafile - -- oracle remove datafile اوراكل ازالة datafile - -- drop tablespace command اسقاط القيادة tablespace - -- delete datafile oracle حذف اوراكل datafile - -- drop oracle datafile انخفاض اوراكل datafile - -- oracle drop tablespace datafile اوراكل انخفاض tablespace datafile - -- drop tablespace in oracle انخفاض tablespace في أوراكل - -- drop datafile from tablespace انخفاض datafile من tablespace - -- oracle drop datafiles اوراكل انخفاض datafiles - -- oracle delete tablespace حذف اوراكل tablespace - -- oracle delete datafile حذف اوراكل datafile - -- remove tablespace ازالة tablespace - -- delete datafile from tablespace حذف datafile من tablespace - -- oracle tablespace remove datafile اوراكل tablespace ازالة datafile - -- drop tablespace and datafile انخفاض tablespace وdatafile - -- how to delete tablespace لحذف tablespace - -- oracle drop table اوراكل إسقاط الجدول - -- drop datafiles oracle انخفاض datafiles اوراكل - -- drop datafile in oracle انخفاض datafile في أوراكل - -- drop datafile + oracle انخفاض datafile + اوراكل - -- delete tablespace oracle حذف tablespace اوراكل - -- oracle drop tablespace file اوراكل انخفاض tablespace الملف - -- oracle remove data file إزالة ملف بيانات أوراكل - -- drop data file انخفاض ملف بيانات - -- oracle remove datafile from tablespace اوراكل ازالة datafile من tablespace - -- drop tablespace including contents and datafiles انخفاض tablespace بما في المحتويات وdatafiles - -- delete oracle datafile حذف اوراكل datafile - -- drop tablespace datafiles انخفاض tablespace datafiles - -- drop datafile انخفاض datafile - -- datafile drop انخفاض datafile - -- drop tablespace including datafiles انخفاض tablespace بما datafiles - -- how to remove datafile كيفية ازالة datafile - -- Oracle datafile drop اوراكل انخفاض datafile - -- delete datafiles oracle حذف اوراكل datafiles - -- oracle empty datafile اوراكل فارغه datafile - -- drop tablespace with datafile انخفاض tablespace مع datafile - -- oracle delete DATAFILES حذف اوراكل datafiles - -- drop tablespace remove datafile انخفاض tablespace ازالة datafile - -- drop tablespace file انخفاض tablespace الملف - -- oracle drop tablespace datafiles اوراكل انخفاض tablespace datafiles - --