How to Remove and Drop Datafiles from Tablespace in Oracle Database Kā noņemt un Drop Datafiles no Tablespace in Oracle Database

Oracle RDBMS databases stores data logically in the form of tablespaces and physically in the form of data files. Oracle RDBMS datubāzēs uzglabā datu loģiski kā tablespaces un fiziski kā datu faili. The datafiles are added to the tablespaces as database space requirement grows bigger. Par datafiles ir papildināts ar tablespaces kā datubāze kosmosa prasība aug lielāka. However, there are several reasons you may want to remove or delete data files from a tablespace. Tomēr pastāv vairāki iemesli, jūs varētu vēlēties, lai novērstu vai dzēst datu failus no 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. Piemēram, nejauši pievienotu nepareizi lieluma vai nevēlamas datafile uz tablespace vai datu kosmosa lietojums ir kļuvis mazāks un dažas datu failus vēlaties jālikvidē, vai mēģināt atgūt Oracle datu bāzi, kas nespēj sākt trūkuma dēļ vai bojāti datafiles, atceļot tos , Oracle nesniedz viegls veids vai lietotāja interfeisu, lai dzēstu vai pilienu datafiles no 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. Kad datafile tiek daļa no tablespace, tas vairs nav iespējams atdalīt, vai izņem no tablespace, kaut gan ir vairāki workarounds.

How to Completely Drop the Whole Tablespace with All Datafiles Kā Pilnīgi Drop Visas Tablespace ar visām Datafiles

The easiest way to drop a or multiple datafiles is by dropping the entire tablespace together with its datafiles. Vieglākais veids, kā aizrakstīt vai daudzkāršu datafiles ir kritienizturības visu tablespace kopā ar tās 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. Ja jums vairs nav nepieciešama datu saturu, tablespace, šādu komandu būs nometiet tablespace, tad datafile, un tablespace saturu no datu vārdnīcai. All of the objects that where contained in that tablespace are permanently removed. Visi objekti, ka, ja šajā tablespace tiek neatgriezeniski izņemt.

DROP TABLESPACE <tablespace name> INCLUDING CONTENTS AND DATAFILES; DROP TABLESPACE <tablespace nosaukums> IESKAITOT saturu un 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). Ja nenorādāt "UN DATAFILES" Oracle netiks piliens fizisko datafile pēc DROP TABLESPACE komanda, bet jūs vienmēr varat izdzēst failus no operētājsistēmas apvalks (Ja datu faili ir bloķēta, restart server).

But always perform a backup of the database, as the “DROP TABLESPACE” command is irreversible. Bet vienmēr veikt backup no datubāzes, kā "DROP TABLESPACE" komanda ir neatgriezeniska. 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. Tas ir arī labs praksē pārbaudīt un noteikt, cik daudz datafiles a tablespace faktiski ir Pirms veikt piliens rīcību, lai izvairītos no kļūdu.

How to Check How Many Datafiles a Tablespace Has Kā pārbaudīt, cik daudz Datafiles a Tablespace Has

To determine and identify all datafiles that link to a tablespace, use the following query, with tablespace name in capital letter: Lai noteiktu un identificēt visu datafiles, ka saiti uz tablespace, tad izmanto šādu vaicājumu, ar tablespace vārds kapitāla burta:

SELECT file_name, tablespace_name SELECT FILE_NAME, tablespace_name
FROM dba_data_files NO dba_data_files
WHERE tablespace_name ='<tablespace name>'; KUR tablespace_name = '<tablespace nosaukums> ";

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. Ja tablespace satur vairākas datafiles, un jūs vienkārši vēlaties piliens vienu vai dažiem no datafiles un tur paliekot datafiles kopā ar objektiem un saturs, objektus vai datu jāeksportē par skārusi galda telpu. Once exported, the tablespace can be dropped with above “DROP TABLESPACE” command. Pēc tam, kad eksportētas, tablespace var kritās ar iepriekš "DROP TABLESPACE" komandu. Then, recreate the tablespace with the datafile(s) required (that you initially want to keep), and then import the objects into the recreated tablespace. Tad, atjaunotu tablespace ar datafile (s), kas vajadzīgs (ka jūs sākotnēji vēlaties saglabāt), un pēc tam importējiet objektu iekļaušana gaitai 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. Ja viena vai vairākas datafiles trūkst pēc atgūšanas procesa vai nejaušu izdzēšanu, varat izmantot ALTER DATABASE DATAFILE <datafile nosaukums> Offline DROP komanda, lai datafile bezsaistes tā, ka datu bāzē var sākšanas, pēc kura nemierīgajā tablespace var pārkāpties. (See (Skatīt instruction to recover from missing datafiles instrukciju, lai atgūtu no missing datafiles .) .)

How to Resize a Datafile to Minimum Size Kā Resize a Datafile lai Minimālais izmērs

Another alternative to drop the datafile is by shrinking the size of datafile instead of dropping. Vēl viena alternatīva nometiet datafile ir sarūk izmēru datafile vietā pārtraukt. This option is only possible if there is no extents in the datafile. Šis variants ir iespējams tikai tad, ja nav mērā, kas 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. Ja tādu nav, tas ir iespējams mainīt datu failu uz leju, lai ļoti nelielu failu (2 bloki), kur Oracle datu bāzi, vairs nekādus lielā mērā arī 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. Tomēr šo metodi, nav noņemiet datafile no tablespace ne izdzēst failu fiziski, bet tas samazinātu risku, jo nav datu būs atdalīta, jo tikai tukšs bloki ir samazināts. It simply makes it unusable and takes up almost close to no disk space. Tā vienkārši padara neizmantojamu un aizņem gandrīz tuvu nav vietu diskā. To resize a datafile, use the following query: Lai mainītu uz datafile, izmantojiet šādu jautājumu:

alter database datafile '<datafile name>' resize 8M; mainīt datu bāzē datafile "<datafile nosaukums>" izmainīsiet 8m;

How to Determine the Extents inside Datafile Kā Nosaka mērā iekšpusē Datafile

To check and determine the extents that exists in a datafile, use this query: Lai noskaidrotu un noteiktu mērā, ka pastāv a datafile, izmantojiet šo jautājumu:

SELECT owner, segment_name SELECT īpašnieks, segment_name
FROM dba_extents a, dba_data_files b NO dba_extents a, dba_data_files b
WHERE a.file_id = b.file_id KUR a.file_id = b.file_id
AND b.file_name = '<datafile name>' UN b.file_name = '<datafile nosaukums> "

IMPORTANT : The page is machine translated and provided "as is" without warranty. SVARĪGI: Šī lapa ir mašīna tulkoto un ar nosacījumu ", kas ir" bez garantijas. Machine translation may be difficult to understand. Machine translation var būt grūti saprast. Please refer to Lūdzu, skatiet original English article oriģināls angļu rakstu whenever possible. kad vien iespējams.


One Response to “How to Remove and Drop Datafiles from Tablespace in Oracle Database” One Response to "Kā Noņemiet un Drop Datafiles no Tablespace in Oracle Database"

  1. How Drop Tablespace and Recover Oracle Database When Accidentally Delete Datafile » My Digital Life Kā Drop Tablespace un atgūt Oracle Database Kad nejauši Dzēst Datafile »Mans Digital Life
    August 4th, 2007 02:55 Augusts 4, 2007 02:55
    1 1

    [...] Tip: How to check datafiles that belong to tablespace. [...] Padoms: Kā pārbaudīt datafiles, kas pieder tablespace. [...] [...]

Leave a Reply Atstāj atbildi

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> Jūs varat izmantot šos tagus: <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. Parakstīties uz komentāriem iezīme ir atspējota. To receive notification of latest comments posted, subscribe to Lai saņemtu paziņojumu par jaunāko komentāri norīkots darbā, abonēt My Digital Life Comments RSS feed Mans Digitālais Life Comments RSS feed or vai register to receive reģistrēties, lai saņemtu new comments in daily email digest. jauni komentāri ikdienas e-pasta sagremot.
Custom Search

New Articles Jauns pants

Incoming Search Terms for the Article Incoming Meklēt Noteikumi par pants

oracle drop datafile orākuls piliens datafile - -- oracle drop tablespace orākuls piliens tablespace - -- drop datafile oracle piliens datafile orākuls - -- drop datafile piliens datafile - -- drop tablespace oracle piliens tablespace orākuls - -- delete tablespace izdzēst tablespace - -- oracle remove datafile orākuls noņemt datafile - -- drop tablespace datafile piliens tablespace datafile - -- oracle delete tablespace orākuls izdzēst tablespace - -- oracle drop tablespace datafile orākuls piliens tablespace datafile - -- drop oracle datafile piliens orākuls datafile - -- oracle delete datafile orākuls izdzēst datafile - -- remove datafile noņemt datafile - -- oracle drop tablespace including datafiles orākuls piliens tablespace ieskaitot datafiles - -- remove tablespace noņemt tablespace - -- drop tablespace command piliens tablespace komanda - -- oracle remove datafile from tablespace orākuls noņemt datafile no tablespace - -- delete tablespace oracle izdzēst tablespace orākuls - -- remove datafile oracle noņemt datafile orākuls - -- drop datafiles piliens datafiles - -- oracle drop datafiles orākuls piliens datafiles - -- delete datafile izdzēst datafile - -- alter tablespace remove datafile mainīt tablespace noņemt datafile - -- drop tablespace in oracle piliens tablespace in orākuls - -- delete datafile in oracle izdzēst datafile in orākuls - -- delete datafile oracle izdzēst datafile orākuls - -- drop datafile in oracle piliens datafile in orākuls - -- drop datafile from tablespace piliens datafile no tablespace - -- remove datafile from tablespace noņemt datafile no tablespace - -- drop tablespace and datafiles piliens tablespace un datafiles - -- HOW TO DELETE DATAFILE IN ORACLE Kā izdzēst DATAFILE IN ORACLE - -- how to drop datafile in oracle kā piliens datafile in orākuls - -- oracle drop tablespace and datafile orākuls piliens tablespace un datafile - -- delete oracle datafile izdzēst orākuls datafile - -- drop tablespace and datafile piliens tablespace un datafile - -- oracle remove datafiles orākuls noņemt datafiles - -- drop datafile + oracle piliens datafile + orākuls - -- drop tablespace including datafile piliens tablespace ieskaitot datafile - -- drop tablespace including contents and datafiles piliens tablespace ieskaitot saturu un datafiles - -- how to delete tablespace Kā izdzēst tablespace - -- oracle drop datafile from tablespace orākuls piliens datafile no tablespace - -- delete oracle tablespace izdzēst orākuls tablespace - -- oracle resize tablespace orākuls izmainīsiet tablespace - -- drop datafiles oracle piliens datafiles orākuls - -- delete tablespace in oracle izdzēst tablespace in orākuls - -- Oracle drop tablespace datafiles Oracle piliens tablespace datafiles - -- drop tablespace including datafiles piliens tablespace ieskaitot datafiles - -- Oracle dropping datafile Oracle pilināmā datafile - -- remove oracle datafile noņemt orākuls datafile - -- drop datafile tablespace piliens datafile tablespace - -- oracle drop tablespace with datafile orākuls piliens tablespace ar datafile - -- how to remove tablespace Kā noņemt tablespace - -- drop file oracle piliens failu orākuls - -- how to drop datafile kā piliens datafile - -- delete a tablespace izdzēstu tablespace - -- DROP TABLESPACE WITH DATAFILE DROP TABLESPACE AR DATAFILE - -- remove datafile from tablespace oracle noņemt datafile no tablespace orākuls - -- drop tablespace file piliens tablespace failu - -- drop datafile piliens datafile - -- drop oracle tablespace piliens orākuls tablespace - -- how to remove a datafile kā izņemt datafile - -- alter tablespace drop datafile mainīt tablespace piliens datafile - -- how to drop oracle datafile kā piliens orākuls datafile - -- how to delete datafile from tablespace Kā izdzēst datafile no tablespace - -- oracle tablespace drop file orākuls tablespace piliens failu - -- how to drop datafiles in oracle kā piliens datafiles in orākuls - -- drop tablespace command in oracle piliens tablespace komandu orākuls - -- HOW TO DELETE DATAFILE Kā izdzēst DATAFILE - -- remove datafile tablespace noņemt datafile tablespace - -- ORACLE DATAFILE DELETE ORACLE DATAFILE DELETE - -- oracle drop datafile orākuls piliens datafile - -- oracle drop data file orākuls piliens datu failu - -- Dropping datafile from tablespace Pilināmā datafile no tablespace - -- deleting oracle datafile svītrojot orākuls datafile - -- delete tablespace name izdzēst tablespace nosaukums - --