How to Remove and Drop Datafiles from Tablespace in Oracle Database Kako to Maknuti i Kap Datafiles iz Tablespace u Oracle baza podataka

Oracle RDBMS databases stores data logically in the form of tablespaces and physically in the form of data files. Oracle RDBMS baza podataka pohranjuje podatke logično u obliku tablespaces i fizički u formi datotekama. The datafiles are added to the tablespaces as database space requirement grows bigger. The datafiles su dodani to tablespaces kao baza podataka zahtjev za prostorom raste veći. However, there are several reasons you may want to remove or delete data files from a tablespace. Međutim, postoji nekoliko razloga ti svibanj ištanje to maknuti ili izbrisati podatke iz datoteke 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. Kao što je slučajno dodati pogrešno veličine ili neželjeni datafile na tablespace, ili podaci prostor običaj je postao manji i neki podaci kartoteka ištanje biti maknuti, ili pokušati oporaviti Oracle bazu podataka koja ne uspijeva pokrenuti zbog nestale ili oštećene datafiles uklanjanjem ih , Oracle ne pruža jednostavan način ili korisničko sučelje to izbrisati ili kap datafiles iz 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. Jednom datafile dio izrađen je od tablespace, to se više ne može biti odvojen ili ukloniti iz tablespace, iako postoji nekoliko workarounds.

How to Completely Drop the Whole Tablespace with All Datafiles Kako Kap Potpuno cijeli Tablespace sa svim Datafiles

The easiest way to drop a or multiple datafiles is by dropping the entire tablespace together with its datafiles. Najlakši način da ispusti ili više datafiles je pada cijeli tablespace zajedno sa svojim 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. Ako više ne trebate podatke o sadržaju tablespace, slijedeće naredba će ispustiti tablespace je datafile, a tablespace's sadržaja iz podataka rječnik. All of the objects that where contained in that tablespace are permanently removed. Svi predmeti koji, gdje su sadržane u tom tablespace trajno uklanjaju.

DROP TABLESPACE <tablespace name> INCLUDING CONTENTS AND DATAFILES; Drop TABLESPACE <tablespace name> UKLJUČUJUĆI sadržaja i 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). Ako ne odredite "DATAFILES I", Oracle neće ispustiti do fizičkog datafile nakon pada TABLESPACE naredbu, ali uvijek možete brisati datoteke iz ljuske operacijskog sustava (Ako se podaci kartoteka jesu zaključan, ponovo pokrenuti poslužitelj).

But always perform a backup of the database, as the “DROP TABLESPACE” command is irreversible. Ali uvijek izvršiti backup baze podataka, kao što je "Kap TABLESPACE" naredba je nepovratan. 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. Također je dobra praksa da provjerite i utvrdite koliko datafiles jedan tablespace zapravo je prije vršenja drop akciju kako bi se izbjegla pogreška.

How to Check How Many Datafiles a Tablespace Has Kako to Ček Koliko Datafiles Ima jedna Tablespace

To determine and identify all datafiles that link to a tablespace, use the following query, with tablespace name in capital letter: Da biste utvrdili i identificirati sve datafiles koje vode na tablespace, koristite sljedeći upit, s tablespace ime u veliko slovo:

SELECT file_name, tablespace_name ODABERITE FILE_NAME, tablespace_name
FROM dba_data_files OD dba_data_files
WHERE tablespace_name ='<tablespace name>'; GDJE 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. Ako tablespace sadrži više datafiles, a vi jednostavno želite ispustiti jedan ili neke od datafiles i zadržati preostali datafiles zajedno s predmetima i sadržajima, objekata ili podaci moraju se izvesti za zahvaćene tablice prostora. Once exported, the tablespace can be dropped with above “DROP TABLESPACE” command. Jednom izvezeno je tablespace može biti izostavljen sa gore "Drop TABLESPACE" naredba. Then, recreate the tablespace with the datafile(s) required (that you initially want to keep), and then import the objects into the recreated tablespace. Zatim, ponovno je tablespace s datafile (a) obavezna (da se u početku želi zadržati), a onda uvesti predmete u recreated 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. Ako jedna ili više datafiles je nestalo nakon što je proces oporavka ili slučajnog brisanja, možete koristiti Alter BAZE DATAFILE <datafile name> Offline Drop naredba to izraditi datafile offline tako da baza može se pokreće nakon što je uznemiri tablespace može biti izostavljen. (See (Vidi instruction to recover from missing datafiles uputstvo za oporavak od nestalih datafiles .) .)

How to Resize a Datafile to Minimum Size Kako Resize jedan do Datafile Minimalna Veličina

Another alternative to drop the datafile is by shrinking the size of datafile instead of dropping. Druga alternativa ispustite datafile je smanjenje veličine datafile umjesto pada. This option is only possible if there is no extents in the datafile. Ova opcija je moguća samo ako nema extents u 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. Ako postoji ništa, to je moguće promijeniti veličinu datoteka podataka dolje do vrlo malih datoteka (2 bloka), gdje je Oracle baza više neće stvarati bilo kakve mjere u 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. Međutim, ovo rješenje neće ukloniti ni datafile iz tablespace izbrisati datoteku fizički, ali se smanjio rizik kao nema podataka će biti skraćen kao samo prazni blokovi su smanjene. It simply makes it unusable and takes up almost close to no disk space. To se jednostavno čini neupotrebljiv i uzima gotovo u blizini nema prostora na disku. To resize a datafile, use the following query: Za veličinu jednog datafile, koristite sljedeći upit:

alter database datafile '<datafile name>' resize 8M; alter database datafile '<datafile name>' veličinu 8m;

How to Determine the Extents inside Datafile Kako utvrditi Extents unutar Datafile

To check and determine the extents that exists in a datafile, use this query: Da biste provjerili i utvrdili da postoji extents u datafile, koristite ovaj upit:

SELECT owner, segment_name ODABERITE vlasnik, segment_name
FROM dba_extents a, dba_data_files b OD dba_extents a, b dba_data_files
WHERE a.file_id = b.file_id GDJE a.file_id = b.file_id
AND b.file_name = '<datafile name>' I b.file_name = '<datafile name>'

IMPORTANT : The page is machine translated and provided "as is" without warranty. VAŽNO: Na stranici je stroj prevedeno i dostavlja "kakav je" sa garantni. Machine translation may be difficult to understand. Strojno prevođenje svibanj biti teško za razumjeti. Please refer to Molimo pogledajte original English article Engleski originalni članak whenever possible. kad god je to moguće.


One Response to “How to Remove and Drop Datafiles from Tablespace in Oracle Database” One Response to "Kako to Maknuti i Kap Datafiles iz Tablespace u Oracle Database"

  1. How Drop Tablespace and Recover Oracle Database When Accidentally Delete Datafile » My Digital Life Kako Kap Tablespace i oporavak Oracle Database Kada slučajno Izbriši Datafile »Moj Digital Life
    August 4th, 2007 02:55 4. kolovoz 2007 02:55
    1 1

    [...] Tip: How to check datafiles that belong to tablespace. [...] Savjet: Kako to ček datafiles koji pripadaju tablespace. [...] [...]

Leave a Reply Dopust Odgovor

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> Možete koristiti te tags: <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. Pretplatite se na komentare značajka je onemogućen. To receive notification of latest comments posted, subscribe to Da biste primali obavijesti o najnovijim comment posted, pretplatite se My Digital Life Comments RSS feed My Digital Life Komentari RSS or ili register to receive prijaviti za primanje new comments in daily email digest. nove komentare na e-poruke dnevno svariti.
Custom Search

New Articles Novi članci

Incoming Search Terms for the Article Dolazni Traži Uvjeti za Članak

oracle drop datafile Debir pad datafile - -- oracle drop tablespace Debir pad tablespace - -- drop datafile oracle ispustiti datafile Debir - -- drop datafile ispustiti datafile - -- drop tablespace oracle ispustiti tablespace Debir - -- delete tablespace brisanje tablespace - -- oracle remove datafile Debir ukloniti datafile - -- drop tablespace datafile ispustiti tablespace datafile - -- oracle delete tablespace Debir brisanje tablespace - -- oracle drop tablespace datafile Debir pad tablespace datafile - -- drop oracle datafile ispustiti Debir datafile - -- oracle delete datafile Debir brisanje datafile - -- remove datafile ukloniti datafile - -- oracle drop tablespace including datafiles Debir pad tablespace uključujući datafiles - -- remove tablespace ukloniti tablespace - -- drop tablespace command ispustiti tablespace naredbu - -- oracle remove datafile from tablespace Debir datafile ukloniti iz tablespace - -- delete tablespace oracle brisanje tablespace Debir - -- remove datafile oracle ukloniti datafile Debir - -- drop datafiles kap datafiles - -- oracle drop datafiles Debir kap datafiles - -- delete datafile brisanje datafile - -- alter tablespace remove datafile alter tablespace ukloniti datafile - -- drop tablespace in oracle ispustiti tablespace u Debir - -- delete datafile in oracle brisanje datafile u Debir - -- delete datafile oracle brisanje datafile Debir - -- drop datafile in oracle ispustiti datafile u Debir - -- drop datafile from tablespace datafile ispustiti iz tablespace - -- remove datafile from tablespace datafile ukloniti iz tablespace - -- drop tablespace and datafiles ispustiti tablespace i datafiles - -- HOW TO DELETE DATAFILE IN ORACLE Kako to izbrisati DATAFILE U ORACLE - -- how to drop datafile in oracle kako datafile pad u Debir - -- oracle drop tablespace and datafile Debir pad tablespace i datafile - -- delete oracle datafile brisanje Debir datafile - -- drop tablespace and datafile ispustiti tablespace i datafile - -- oracle remove datafiles Debir ukloniti datafiles - -- drop datafile + oracle ispustiti datafile + Debir - -- drop tablespace including datafile ispustiti tablespace uključujući datafile - -- drop tablespace including contents and datafiles ispustiti tablespace uključujući sadržaj i datafiles - -- how to delete tablespace kako to izbrisati tablespace - -- oracle drop datafile from tablespace Debir datafile ispustiti iz tablespace - -- delete oracle tablespace brisanje Debir tablespace - -- oracle resize tablespace Debir veličinu tablespace - -- drop datafiles oracle kap datafiles Debir - -- delete tablespace in oracle brisanje tablespace u Debir - -- Oracle drop tablespace datafiles Oracle tablespace kap datafiles - -- drop tablespace including datafiles ispustiti tablespace uključujući datafiles - -- Oracle dropping datafile Oracle ispuštajući datafile - -- remove oracle datafile ukloniti Debir datafile - -- drop datafile tablespace ispustiti datafile tablespace - -- oracle drop tablespace with datafile Debir tablespace pad s datafile - -- how to remove tablespace kako to maknuti tablespace - -- drop file oracle drop file Debir - -- how to drop datafile kako to drop datafile - -- delete a tablespace brisanje tablespace - -- DROP TABLESPACE WITH DATAFILE Drop TABLESPACE SA DATAFILE - -- remove datafile from tablespace oracle datafile ukloniti iz tablespace Debir - -- drop tablespace file ispustiti tablespace datoteku - -- drop datafile ispustiti datafile - -- drop oracle tablespace ispustiti Debir tablespace - -- how to remove a datafile kako ukloniti datafile - -- alter tablespace drop datafile alter tablespace pad datafile - -- how to drop oracle datafile kako to drop Debir datafile - -- how to delete datafile from tablespace kako to izbrisati datafile iz tablespace - -- oracle tablespace drop file Debir tablespace ispustite datoteku - -- how to drop datafiles in oracle kako to kap datafiles u Debir - -- drop tablespace command in oracle ispustiti tablespace naredbu u Debir - -- HOW TO DELETE DATAFILE Kako to izbrisati DATAFILE - -- remove datafile tablespace ukloniti datafile tablespace - -- ORACLE DATAFILE DELETE ORACLE DATAFILE DELETE - -- oracle drop datafile Debir pad datafile - -- oracle drop data file Debir pad podatkovnu datoteku - -- Dropping datafile from tablespace Ispuštajući datafile iz tablespace - -- deleting oracle datafile brisanjem Debir datafile - -- delete tablespace name brisanje tablespace ime - --