How to Remove and Drop Datafiles from Tablespace in Oracle Database Ako odstrániť a Drop Datafiles z Tablespace v Oracle Database

Oracle RDBMS databases stores data logically in the form of tablespaces and physically in the form of data files. Oracle RDBMS databázy ukladá dáta logicky vo forme tablespaces a fyzicky vo forme dátových súborov. The datafiles are added to the tablespaces as database space requirement grows bigger. V datafiles sú pridané do databázy tablespaces ako priestor rozširuje. However, there are several reasons you may want to remove or delete data files from a tablespace. Existuje však niekoľko dôvodov, že budete chcieť odstrániť alebo zmazať dátové súbory z 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. Ako náhodne pridať neprávom veľkých alebo nežiaduce datafile na Tablespace, alebo údaje, využitie priestoru stala menej a niektoré dátové súbory chcete odstrániť, alebo sa pokúša získať späť Oracle databázy, ktorá nedokáže spustiť kvôli chýbajúce alebo poškodené datafiles odstránením nich Oracle neposkytuje jednoduchú cestu alebo užívateľské rozhranie pre odstránenie alebo pokles datafiles z 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. Jednou datafile sa v rámci Tablespace, že už nemôžu byť oddelené, alebo odstrániť z Tablespace, aj keď existuje niekoľko riešení.

How to Completely Drop the Whole Tablespace with All Datafiles Ako úplne Odhoï Celá Tablespace so všetkými Datafiles

The easiest way to drop a or multiple datafiles is by dropping the entire tablespace together with its datafiles. Najjednoduchší spôsob, ako stratiť alebo viac datafiles je pád celého Tablespace spolu s jeho 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. Ak nepotrebujete dáta obsahu zo Tablespace, nasledujúci príkaz odhodiť Tablespace sa datafile a Tablespace obsahu z údajov slovníka. All of the objects that where contained in that tablespace are permanently removed. Všetky predmety, ktoré, ak sú obsiahnuté v tomto Tablespace sa natrvalo odstránia.

DROP TABLESPACE <tablespace name> INCLUDING CONTENTS AND DATAFILES; DROP Tablespace <tablespace Name> VRÁTANE BALENIE A 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). Ak neuvediete "A DATAFILES", Oracle nebude pokles fyzickej datafile po DROP Tablespace príkazom, ale vždy môžete mazať súbory z operačného systému shell (Ak dátové súbory sú zamknuté, reštartovať server).

But always perform a backup of the database, as the “DROP TABLESPACE” command is irreversible. Ale vždy vykonať zálohu databázy, ako "DROP Tablespace" príkaz je neodvolateľné. 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. Je tiež dobré praxe overiť a zistiť, koľko datafiles jeden Tablespace skutočne má pred vykonaním kvapka akcie, aby nedošlo k omylu.

How to Check How Many Datafiles a Tablespace Has Ako skontrolovať, ako veľa Datafiles jeden Tablespace Bola

To determine and identify all datafiles that link to a tablespace, use the following query, with tablespace name in capital letter: Ak chcete zistiť a identifikovať všetky datafiles, že odkaz na Tablespace, použite nasledujúcu otázku, s Tablespace meno vo veľké písmeno:

SELECT file_name, tablespace_name SELECT názovsúboru, tablespace_name
FROM dba_data_files Z dba_data_files
WHERE tablespace_name ='<tablespace name>'; KDE tablespace_name = '<tablespace Name>';

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. Ak Tablespace obsahuje viac datafiles, a chcete len kvapku jedného alebo niektoré z datafiles a zachovať zostávajúce datafiles spoločne s objektmi a obsah, predmety alebo informácie musia byť vyvážené pre postihnuté miesto tabuľky. Once exported, the tablespace can be dropped with above “DROP TABLESPACE” command. Akonáhle vyvezený, Tablespace možno spadol s vyššie "DROP Tablespace" príkaz. Then, recreate the tablespace with the datafile(s) required (that you initially want to keep), and then import the objects into the recreated tablespace. Potom získala Tablespace s datafile (y) požadovaná (ktoré ste pôvodne chceli zachovať), a potom importovať objekty do Tablespace znova.

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. Ak jeden alebo viac datafiles chýba po obnovení procesu alebo náhodného vymazanie, môžete použiť ALTER DATABASE datafile <datafile Name> Offline DROP príkaz, aby sa datafile offline tak, že databáze možno začína až po ktorej zkormoutil Tablespace môže byť zrušená. (See (Pozri instruction to recover from missing datafiles pokyn, na zotavenie sa zo chýba datafiles .) .)

How to Resize a Datafile to Minimum Size Ako zmeniť veľkosť datafile minimálnej veľkosti

Another alternative to drop the datafile is by shrinking the size of datafile instead of dropping. Inou alternatívou odhodiť datafile sa zmenšuje veľkosť datafile miesto zahodenie. This option is only possible if there is no extents in the datafile. Táto voľba je možná len vtedy, ak neexistuje miere v 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. Ak tomu tak nie je, je možné zmeniť veľkosť súboru dát na veľmi malý súbor (2 bloky), kde databázy Oracle už nebude vytvárať žiadne miere v 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. Ale tento postup nie je odstrániť datafile z Tablespace ani zmazať súbor fyzicky, ale zníženie rizika, ako žiadne dáta budú skrátiť len prázdne bloky sú znížené. It simply makes it unusable and takes up almost close to no disk space. Je prostě je nepoužiteľný a zaberá takmer takmer žiadne miesto na disku. To resize a datafile, use the following query: Ak chcete zmeniť veľkosť datafile, použite nasledujúcu otázku:

alter database datafile '<datafile name>' resize 8M; zmeniť databázu datafile '<datafile Name>' veľkosť 8M;

How to Determine the Extents inside Datafile Ako určiť miere vnútri datafile

To check and determine the extents that exists in a datafile, use this query: Ak chcete skontrolovať a určiť miere, ktorá existuje v datafile použite tento dotaz:

SELECT owner, segment_name SELECT vlastník segment_name
FROM dba_extents a, dba_data_files b Z dba_extents a, b dba_data_files
WHERE a.file_id = b.file_id KDE a.file_id = b.file_id
AND b.file_name = '<datafile name>' A b.file_name = '<datafile Name>'

IMPORTANT : The page is machine translated and provided "as is" without warranty. Upozornenie: Stránka je stroje preložené a poskytované "tak ako sú" bez záruky. Machine translation may be difficult to understand. Strojový preklad môže byť ťažké pochopiť. Please refer to Obráťte sa prosím na original English article Anglický originál článku whenever possible. kedykoľvek je to možné.


One Response to “How to Remove and Drop Datafiles from Tablespace in Oracle Database” Jedna reakcia na "Ako odstrániť a Drop Datafiles z Tablespace v Oracle Database"

  1. How Drop Tablespace and Recover Oracle Database When Accidentally Delete Datafile » My Digital Life Ako Drop Tablespace a Recover Oracle Database Kedy Náhodne Odstrániť datafile »My Digital Life
    August 4th, 2007 02:55 4. august 2007 02:55
    1 1

    [...] Tip: How to check datafiles that belong to tablespace. [...] Tip: Ako skontrolovať datafiles, ktoré patria do Tablespace. [...] [...]

Leave a Reply Nechaj Odpoveď

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> Môžete použiť tieto značky: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime = ""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. Vyberajte komentáre funkcia bola vypnutá. To receive notification of latest comments posted, subscribe to Ak chcete dostávať oznámenie o najnovšie komentáre posta, prihláste sa My Digital Life Comments RSS feed My Digital Life Komentáre RSS or alebo register to receive register pre príjem new comments in daily email digest. nové komentáre v dennom email Digest.
Custom Search

New Articles Nové články

Incoming Search Terms for the Article Incoming Vyhľadávanie Podmienky pre článok

oracle drop datafile Oracle kvapka datafile - -- oracle drop tablespace Oracle kvapka Tablespace - -- drop datafile oracle kvapka datafile veštbami - -- drop datafile kvapka datafile - -- drop tablespace oracle kvapka Tablespace veštbami - -- delete tablespace zmazať Tablespace - -- oracle remove datafile Oracle odstrániť datafile - -- drop tablespace datafile kvapka Tablespace datafile - -- oracle delete tablespace Oracle odstrániť Tablespace - -- oracle drop tablespace datafile Oracle kvapka Tablespace datafile - -- drop oracle datafile kvapka Oracle datafile - -- oracle delete datafile Oracle odstrániť datafile - -- remove datafile odobrať datafile - -- oracle drop tablespace including datafiles Oracle kvapka Tablespace vrátane datafiles - -- remove tablespace odobrať Tablespace - -- drop tablespace command kvapka Tablespace príkazom - -- oracle remove datafile from tablespace Oracle datafile odstrániť z Tablespace - -- delete tablespace oracle zmazať Tablespace veštbami - -- remove datafile oracle odobrať datafile veštbami - -- drop datafiles kvapka datafiles - -- oracle drop datafiles Oracle kvapka datafiles - -- delete datafile zmazať datafile - -- alter tablespace remove datafile zmeniť Tablespace odstrániť datafile - -- drop tablespace in oracle kvapka Tablespace v Oracle - -- delete datafile in oracle zmazať datafile v Oracle - -- delete datafile oracle zmazať datafile veštbami - -- drop datafile in oracle kvapka datafile v Oracle - -- drop datafile from tablespace kvapka datafile z Tablespace - -- remove datafile from tablespace odobrať datafile z Tablespace - -- drop tablespace and datafiles kvapka Tablespace a datafiles - -- HOW TO DELETE DATAFILE IN ORACLE HOW TO DELETE datafile v ORACLE - -- how to drop datafile in oracle ako kvapka v datafile veštbami - -- oracle drop tablespace and datafile Oracle kvapka Tablespace a datafile - -- delete oracle datafile zmazať Oracle datafile - -- drop tablespace and datafile kvapka Tablespace a datafile - -- oracle remove datafiles Oracle odstrániť datafiles - -- drop datafile + oracle kvapka datafile + Oracle - -- drop tablespace including datafile kvapka Tablespace vrátane datafile - -- drop tablespace including contents and datafiles kvapka Tablespace vrátane obsahu a datafiles - -- how to delete tablespace ako odstrániť Tablespace - -- oracle drop datafile from tablespace Oracle kvapka datafile z Tablespace - -- delete oracle tablespace zmazať Oracle Tablespace - -- oracle resize tablespace Oracle veľkosť Tablespace - -- drop datafiles oracle kvapka datafiles veštbami - -- delete tablespace in oracle zmazať Tablespace v Oracle - -- Oracle drop tablespace datafiles Oracle kvapka Tablespace datafiles - -- drop tablespace including datafiles kvapka Tablespace vrátane datafiles - -- Oracle dropping datafile Oracle kvapkadlová datafile - -- remove oracle datafile odobrať Oracle datafile - -- drop datafile tablespace kvapka datafile Tablespace - -- oracle drop tablespace with datafile Oracle kvapka Tablespace s datafile - -- how to remove tablespace ako odstrániť Tablespace - -- drop file oracle kvapka súbor veštbami - -- how to drop datafile ako kvapka datafile - -- delete a tablespace Odstránenie Tablespace - -- DROP TABLESPACE WITH DATAFILE DROP Tablespace S datafile - -- remove datafile from tablespace oracle odobrať datafile z Tablespace veštbami - -- drop tablespace file kvapka Tablespace obrázok - -- drop datafile kvapka datafile - -- drop oracle tablespace kvapka Oracle Tablespace - -- how to remove a datafile ako odstrániť datafile - -- alter tablespace drop datafile zmeniť Tablespace kvapka datafile - -- how to drop oracle datafile ako kvapka Oracle datafile - -- how to delete datafile from tablespace ako odstrániť datafile z Tablespace - -- oracle tablespace drop file Oracle Tablespace kvapka obrázok - -- how to drop datafiles in oracle ako kvapka v datafiles veštbami - -- drop tablespace command in oracle kvapka Tablespace príkazom v Oracle - -- HOW TO DELETE DATAFILE HOW TO DELETE datafile - -- remove datafile tablespace odobrať datafile Tablespace - -- ORACLE DATAFILE DELETE ORACLE datafile DELETE - -- oracle drop datafile Oracle kvapka datafile - -- oracle drop data file Oracle kvapka dátového súboru - -- Dropping datafile from tablespace Zahazování datafile z Tablespace - -- deleting oracle datafile mazanie Oracle datafile - -- delete tablespace name zmazať Tablespace meno - --