How to Remove and Drop Datafiles from Tablespace in Oracle Database Kaip pašalinti ir Drop Datafiles iš Tablespace Oracle duomenų bazė

Oracle RDBMS databases stores data logically in the form of tablespaces and physically in the form of data files. Oracle RDBMS duomenų bazėse saugomi duomenys, logiškai į lentelių forma ir fiziškai duomenų rinkmenų formą. The datafiles are added to the tablespaces as database space requirement grows bigger. Datafiles papildomas duomenų bazių plotas reikalavimas lentelių išaugs. However, there are several reasons you may want to remove or delete data files from a tablespace. Tačiau yra keletas priežasčių, galite pašalinti ar ištrinti duomenų bylas iš 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. Tokie kaip netyčia Pridėti neteisingai dydžio ar nepageidaujamas datafile į tablespace arba duomenų erdvės naudojimas turi tapo mažesnės ir kai kurių duomenų rinkmenas norite pašalinti, arba bando susigrąžinti "Oracle" duomenų bazę, kurioje nepavyksta paleisti, nes nėra arba jis sugadintas datafiles pašalinant juos Oracle nesuteikia lengvai arba naudotojo sąsajos ištrinti arba lašą datafiles nuo 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. Kai datafile pagamintas dalis tablespace, jis nebegali būti nuimami arba pašalintas iš tablespace, nors yra keletas apeiti.

How to Completely Drop the Whole Tablespace with All Datafiles Kaip visiškai Drop Visa Tablespace su Datafiles Visi

The easiest way to drop a or multiple datafiles is by dropping the entire tablespace together with its datafiles. Paprasčiausias būdas mesti ar kelis datafiles yra metimo visai tablespace kartu su savo 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. Jei jums nebereikia duomenų turinys tablespace, šią komandą bus drop tablespace, datafile ir tablespace turinio iš duomenų žodyną. All of the objects that where contained in that tablespace are permanently removed. Visi objektai, kur yra tos tablespace yra visam laikui pašalinami.

DROP TABLESPACE <tablespace name> INCLUDING CONTENTS AND DATAFILES; DROP TABLESPACE <tablespace Name> ĮSKAITANT IR KIEKIS 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). Jei nenurodysite "IR DATAFILES", "Oracle" nebus lašas po fizinio datafile DROP TABLESPACE komandų, bet jūs visada galite ištrinti iš apvalkalo operacinės sistemos failus (jei duomenų failai yra užrakinti, perkrauti serverį).

But always perform a backup of the database, as the “DROP TABLESPACE” command is irreversible. Tačiau visada atlikti duomenų bazės atsarginę kopiją, kaip "drop TABLESPACE" komanda yra negrįžtamas. 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. Taip pat gera praktika būtų patikrinti ir nustatyti, kiek datafiles tablespace tiesų yra prieš atliekant lašas veiksmų siekiant išvengti klaidų.

How to Check How Many Datafiles a Tablespace Has Kaip patikrinti, kiek Datafiles Tablespace Yra

To determine and identify all datafiles that link to a tablespace, use the following query, with tablespace name in capital letter: Nustatyti ir identifikuoti visas datafiles, kad nuoroda į tablespace, naudokite šią užklausą, su tablespace pavadinimas didžiosiomis raidėmis:

SELECT file_name, tablespace_name PASIRINKITE FILE_NAME, tablespace_name
FROM dba_data_files IŠ dba_data_files
WHERE tablespace_name ='<tablespace name>'; KUR tablespace_name = '<tablespace konta>';

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. Jei tablespace yra daug datafiles, ir jūs tiesiog norite atsisakyti vienos ar kelių datafiles ir išsaugoti likusius datafiles kartu su objektų ir turinys, objektai ar duomenys turi būti eksportuojamas įtakos lentelės vietą. Once exported, the tablespace can be dropped with above “DROP TABLESPACE” command. Kai eksportuojamos, tablespace gali būti atsisakyta aukščiau "DROP TABLESPACE" komandą. Then, recreate the tablespace with the datafile(s) required (that you initially want to keep), and then import the objects into the recreated tablespace. Tada iš naujo su datafile (-ai) privalo tablespace (kurį iš pradžių norite išsaugoti), ir tada importuoti objektus į atkurta 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. Jei vienas ar daugiau datafiles trūksta po regeneravimo proceso ar netyčia ištrinti, galite naudoti ALTER DATABASE DATAFILE <datafile Name> OFFLINE DROP komanda padaryti datafile offline, kad duomenų bazė pradėjo veikti nuo kurios nerimauja tablespace gali būti atsisakyta. (See (Žr. instruction to recover from missing datafiles nurodymas išieškoti iš trūkstamų datafiles .) .)

How to Resize a Datafile to Minimum Size Kaip Resize Datafile į Minimalus dydis

Another alternative to drop the datafile is by shrinking the size of datafile instead of dropping. Kita alternatyva mesti datafile yra pagal mažėjantį į datafile vietoj išmetimo dydį. This option is only possible if there is no extents in the datafile. Ši parinktis galima tik tada, jei nėra datafile mastu. 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. Jei jų nėra, gali būti, kad duomenų failo dydį iki labai mažų byla (2 blokai), kai "Oracle" duomenų bazės nebus sukurti bet datafile apimtį. 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. Tačiau tai problemos nepašalina datafile nuo tablespace nei ištrinti failą fiziškai, bet ir mažinti, nes nė duomenys bus sutrumpintas, nes tik tuščia blokai būtų sumažinta rizika. It simply makes it unusable and takes up almost close to no disk space. Jis tiesiog tampa netinkami ir užima beveik beveik nėra laisvos vietos diske. To resize a datafile, use the following query: Norėdami pakeisti datafile, naudokite šią užklausą:

alter database datafile '<datafile name>' resize 8M; keisti duomenų datafile "<datafile konta> 'resize 8M;

How to Determine the Extents inside Datafile Kaip nustatyti viduje Datafile mastu

To check and determine the extents that exists in a datafile, use this query: Patikrinti ir nustatyti mastu, kad egzistuoja datafile, naudokite šią užklausą:

SELECT owner, segment_name PASIRINKITE savininkas, segment_name
FROM dba_extents a, dba_data_files b IŠ dba_extents, dba_data_files b
WHERE a.file_id = b.file_id KUR a.file_id = b.file_id
AND b.file_name = '<datafile name>' IR b.file_name = '<datafile konta>'

IMPORTANT : The page is machine translated and provided "as is" without warranty. DĖMESIO: Šis puslapis yra mašina išvertė ir pateikiama "kaip yra" be garantijų. Machine translation may be difficult to understand. Automatinis vertimas gali būti sunku suprasti. Please refer to Remkitės original English article originalas anglų straipsnis whenever possible. jei įmanoma.


One Response to “How to Remove and Drop Datafiles from Tablespace in Oracle Database” One Response to "Kaip pašalinti ir Drop Datafiles nuo Tablespace Oracle duomenų bazės"

  1. How Drop Tablespace and Recover Oracle Database When Accidentally Delete Datafile » My Digital Life Kaip Drop Tablespace ir susigrąžinti Oracle "duomenų bazę, kai netyčia ištrynėte Datafile» Mano skaitmeninis gyvenimas
    August 4th, 2007 02:55 4 rugpjūtis 2007 02:55
    1 1

    [...] Tip: How to check datafiles that belong to tablespace. [...] Patarimas: Kaip patikrinti datafiles kad priklauso tablespace. [...] [...]

Leave a Reply 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> Galite naudoti šiuos žodžius: <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. Subscribe to comments funkcija buvo išjungta. To receive notification of latest comments posted, subscribe to Norėdami gauti pranešimus apie naujausius komentarų, užsiprenumeruoti My Digital Life Comments RSS feed Mano skaitmeninis gyvenimas Komentarų RSS or arba register to receive Registruokitės gauti new comments in daily email digest. Nauji komentarai kasdien elektroniniu paštu.
Custom Search

New Articles Nauji straipsniai

Incoming Search Terms for the Article Gaunamus paieškos terminus straipsnis

oracle drop datafile Oracle lašas datafile - -- drop datafile oracle lašas datafile orakulas - -- drop tablespace oracle drop tablespace orakulas - -- oracle drop tablespace including datafiles Oracle drop tablespace įskaitant datafiles - -- delete tablespace trinti tablespace - -- drop datafile lašas datafile - -- oracle drop tablespace Oracle drop tablespace - -- oracle remove datafile Oracle pašalinti datafile - -- oracle alter tablespace drop datafile Oracle pakeisti tablespace lašas datafile - -- delete tablespace oracle trinti tablespace orakulas - -- drop datafiles in oracle lašas datafiles Oracle - -- drop tablespace including datafiles drop tablespace įskaitant datafiles - -- how to delete tablespace kaip ištrinti tablespace - -- select datafile tablespace "oracle" pasirinkite datafile tablespace "Oracle" - -- alter database tablespace resize with data keisti duomenų tablespace dydį duomenų - -- drop tablespace datafiles drop tablespace datafiles - -- удаление tablespace в Oracle удаление tablespace в Oracle - -- ALTER TABLESPACE DROP DATAFILE ALTER TABLESPACE DROP DATAFILE - -- alter tablespace drop datafile pakeisti tablespace lašas datafile - -- can I empty a oracle datafile galiu tuščias Oracle datafile - -- check datafile for a tablespace Patikrinti datafile for tablespace - -- datafile dropped datafile sumažėjo - -- delete tablespace users trinti tablespace vartotojams - -- delete tablespace in oracle trinti tablespace Oracle - -- delete data file in oracle Ištrinti duomenis failą Oracle - -- delete a datafile from tablespace išbraukti iš tablespace datafile - -- delete user, datafile & tablespace in oracle ištrinti vartotoją, datafile & tablespace Oracle - -- delete datafile oracle trinti datafile orakulas - -- delete oracle datafile trinti Oracle datafile - -- drop one data file lašas vienas duomenų failas - -- dropping of tablespace ts$ Panaikinus tablespace TS $ - -- drop datafile in oracle 10g lašas datafile Oracle 10g - -- drop data file lašas duomenų byla - -- drop tablespace +datafile drop tablespace + datafile - -- drop tablespace does it remove the datafile drop tablespace tai pašalinti datafile - -- drop file tablespace oracle lašas failas tablespace orakulas - -- drop datafiles from table sapce lašas datafiles nuo stalo sapce - -- drop tablespace with file drop tablespace su byla - -- drop datafile in oracle lašas datafile Oracle - -- drop datafile include contents lašas datafile įtraukti turinį - -- drop tablespace without datafile drop tablespace be datafile - -- droping tablespace on oracle droping tablespace Oracle - -- drop tablespace in oracle drop tablespace Oracle - -- drop tablespace did not delete file drop tablespace nebuvo ištrinti failo - -- drop datafile + oracle lašas datafile + Oracle - -- drop datafile from tablespace lašas datafile nuo tablespace - -- drop tablespace in oracle 10g drop tablespace Oracle 10g - -- drop tablespace destroy drop tablespace sunaikinti - -- DROP TABLESPACE DATAFILE DROP TABLESPACE DATAFILE - -- how to drop tablespace in oracle 10g kaip lašas tablespace Oracle 10g - --