How to Remove and Drop Datafiles from Tablespace in Oracle Database Cara Hapus dan Drop Datafiles dari tablespace di Oracle Database

Oracle RDBMS databases stores data logically in the form of tablespaces and physically in the form of data files. RDBMS database oracle menyimpan data secara logis dalam bentuk tablespace dan secara fisik dalam bentuk file data. The datafiles are added to the tablespaces as database space requirement grows bigger. Para datafiles ditambahkan ke database tablespace sebagai kebutuhan ruang tumbuh lebih besar. However, there are several reasons you may want to remove or delete data files from a tablespace. Namun, ada beberapa alasan Anda mungkin ingin untuk menghapus atau menghapus file data dari sebuah 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. Seperti sengaja menambah ukuran salah atau tidak diinginkan datafile ke tablespace, atau penggunaan kapasitas data yang telah menjadi lebih kecil dan beberapa file data yang ingin dihapus, atau mencoba untuk memulihkan database Oracle yang gagal untuk memulai karena hilang atau rusak datafiles dengan membuang mereka , Oracle tidak menyediakan cara yang mudah atau user interface untuk menghapus atau menjatuhkan datafiles dari sebuah 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. Sekali datafile dibuat bagian dari tablespace, itu tidak lagi dapat dilepaskan atau dihapus dari tablespace, meskipun ada beberapa workarounds.

How to Completely Drop the Whole Tablespace with All Datafiles Bagaimana Completely Drop tablespace Utuh dengan Semua Datafiles

The easiest way to drop a or multiple datafiles is by dropping the entire tablespace together with its datafiles. Cara termudah untuk mengurangi salah satu atau beberapa datafiles adalah dengan menjatuhkan seluruh tablespace bersama-sama dengan 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. Jika Anda tidak lagi membutuhkan isi data tablespace, perintah berikut ini akan menjatuhkan tablespace, yang datafile, dan tablespace isi dari kamus data. All of the objects that where contained in that tablespace are permanently removed. Semua objek-objek yang mana yang terdapat dalam tablespace secara permanen dihapus.

DROP TABLESPACE <tablespace name> INCLUDING CONTENTS AND DATAFILES; DROP tablespace <tablespace name> TERMASUK ISI DAN 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). Jika Anda tidak menentukan "DAN DATAFILES", Oracle tidak akan menjatuhkan fisik datafile tablespace setelah perintah DROP, tapi Anda selalu dapat menghapus file dari sistem operasi shell (Jika file data terkunci, restart server).

But always perform a backup of the database, as the “DROP TABLESPACE” command is irreversible. Tetapi selalu melakukan backup database, sebagai "DROP tablespace" perintah ireversibel. 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. Ini juga merupakan praktik yang baik untuk memeriksa dan mengidentifikasi berapa banyak yang tablespace datafiles sebenarnya memiliki sebelum melakukan tindakan drop untuk menghindari kesalahan.

How to Check How Many Datafiles a Tablespace Has Cara Periksa Berapa Banyak Datafiles sebuah tablespace Has

To determine and identify all datafiles that link to a tablespace, use the following query, with tablespace name in capital letter: Untuk menentukan dan mengidentifikasi semua datafiles yang memiliki pranala ke suatu tablespace, gunakan query berikut, dengan nama tablespace dalam huruf besar:

SELECT file_name, tablespace_name SELECT file_name, tablespace_name
FROM dba_data_files DARI dba_data_files
WHERE tablespace_name ='<tablespace name>'; WHERE 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. Jika suatu tablespace berisi beberapa datafiles, dan Anda hanya ingin menjatuhkan salah satu atau beberapa datafiles dan menyimpan sisanya datafiles bersama-sama dengan benda-benda dan isinya, objek-objek atau data harus diekspor untuk ruang meja yang terkena. Once exported, the tablespace can be dropped with above “DROP TABLESPACE” command. Setelah diekspor, tablespace dapat dijatuhkan dengan di atas "DROP tablespace" perintah. Then, recreate the tablespace with the datafile(s) required (that you initially want to keep), and then import the objects into the recreated tablespace. Kemudian, menciptakan kembali tablespace dengan datafile (s) yang diperlukan (yang Anda awalnya ingin tetap), dan kemudian mengimpor benda ke tablespace diciptakan kembali.

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. Jika satu atau lebih datafiles yang hilang setelah proses pemulihan atau penghapusan tidak disengaja, Anda dapat menggunakan ALTER DATABASE OFFLINE DATAFILE <datafile name> perintah DROP untuk membuat datafile offline database sehingga dapat dijalankan setelah yang tablespace yang bermasalah dapat dijatuhkan. (See (Lihat instruction to recover from missing datafiles instruksi untuk pulih dari hilang datafiles .) .)

How to Resize a Datafile to Minimum Size Bagaimana Resize Datafile untuk sebuah Luas Minimum

Another alternative to drop the datafile is by shrinking the size of datafile instead of dropping. Alternatif lain untuk menjatuhkan datafile adalah dengan menyusut ukuran datafile bukannya turun. This option is only possible if there is no extents in the datafile. Pilihan ini hanya mungkin jika tidak ada di datafile extent. 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. Jika tidak ada, mungkin untuk mengubah ukuran file data ke file yang sangat kecil (2 blok), dimana database Oracle tidak akan lagi menciptakan batas tertentu di 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. Namun, prosedur ini tidak menghapus datafile dari tablespace atau menghapus file secara fisik, tapi itu mengurangi risiko karena tidak ada data yang akan dipotong hanya sebagai blok kosong berkurang. It simply makes it unusable and takes up almost close to no disk space. Ini hanya membuat tidak dapat digunakan dan memakan waktu hampir dekat dengan tidak ada disk space. To resize a datafile, use the following query: Untuk mengubah ukuran suatu datafile, gunakan query berikut:

alter database datafile '<datafile name>' resize 8M; alter database datafile '<datafile name>' merubah ukuran 8M;

How to Determine the Extents inside Datafile Cara Tentukan luasan dalam Datafile

To check and determine the extents that exists in a datafile, use this query: Untuk memeriksa dan menentukan luasan yang ada dalam sebuah datafile, gunakan query ini:

SELECT owner, segment_name SELECT pemilik, segment_name
FROM dba_extents a, dba_data_files b DARI dba_extents a, b dba_data_files
WHERE a.file_id = b.file_id WHERE a.file_id = b.file_id
AND b.file_name = '<datafile name>' DAN b.file_name = '<datafile name>'

IMPORTANT : The page is machine translated and provided "as is" without warranty. PENTING: Halaman ini adalah mesin diterjemahkan dan diberikan "sebagaimana adanya" tanpa jaminan. Machine translation may be difficult to understand. Terjemahan mesin mungkin sulit untuk mengerti. Please refer to Silakan merujuk ke original English article artikel asli bahasa Inggris whenever possible. bila memungkinkan.


One Response to “How to Remove and Drop Datafiles from Tablespace in Oracle Database” Satu Respon untuk "Cara Hapus dan Drop Datafiles dari tablespace di Oracle Database"

  1. How Drop Tablespace and Recover Oracle Database When Accidentally Delete Datafile » My Digital Life Bagaimana Drop tablespace dan Recover Oracle Database Ketika sengaja Hapus Datafile »My Digital Life
    August 4th, 2007 02:55 4 Agustus 2007 02:55
    1 1

    [...] Tip: How to check datafiles that belong to tablespace. [...] Tips: Bagaimana memeriksa datafiles milik 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> Anda dapat menggunakan tag ini: <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. Berlangganan ke fitur komentar telah dinonaktifkan. To receive notification of latest comments posted, subscribe to Untuk menerima pemberitahuan dari komentar terbaru diposting, untuk berlangganan My Digital Life Comments RSS feed My Digital Life Komentar RSS Feed or atau register to receive mendaftar untuk menerima new comments in daily email digest. komentar baru di email digest harian.
Custom Search

New Articles Artikel Baru

Incoming Search Terms for the Article Cari Syarat masuk untuk Artikel

oracle drop datafile oracle drop datafile - -- drop datafile oracle drop datafile oracle - -- drop tablespace oracle drop tablespace oracle - -- oracle drop tablespace including datafiles drop tablespace oracle termasuk datafiles - -- delete tablespace menghapus tablespace - -- drop datafile drop datafile - -- oracle drop tablespace drop tablespace oracle - -- oracle remove datafile oracle menghapus datafile - -- oracle alter tablespace drop datafile oracle mengubah drop tablespace datafile - -- delete tablespace oracle menghapus tablespace oracle - -- drop datafiles in oracle drop datafiles di oracle - -- drop tablespace including datafiles drop tablespace termasuk datafiles - -- how to delete tablespace bagaimana menghapus tablespace - -- select datafile tablespace "oracle" pilih datafile tablespace "oracle" - -- alter database tablespace resize with data alter database dengan data tablespace resize - -- drop tablespace datafiles drop tablespace datafiles - -- удаление tablespace в Oracle в удаление Oracle Tablespace - -- ALTER TABLESPACE DROP DATAFILE DROP ALTER tablespace DATAFILE - -- alter tablespace drop datafile mengubah drop tablespace datafile - -- can I empty a oracle datafile dapat saya kosong oracle datafile - -- check datafile for a tablespace cek datafile untuk tablespace - -- datafile dropped datafile menjatuhkan - -- delete tablespace users menghapus tablespace pengguna - -- delete tablespace in oracle menghapus tablespace di oracle - -- delete data file in oracle menghapus file data di oracle - -- delete a datafile from tablespace menghapus datafile dari tablespace - -- delete user, datafile & tablespace in oracle menghapus pengguna, datafile & tablespace di oracle - -- delete datafile oracle menghapus datafile oracle - -- delete oracle datafile menghapus datafile oracle - -- drop one data file drop satu file data - -- dropping of tablespace ts$ menjatuhkan dari tablespace ts $ - -- drop datafile in oracle 10g drop datafile di oracle 10g - -- drop data file drop file data - -- drop tablespace +datafile drop tablespace + datafile - -- drop tablespace does it remove the datafile drop tablespace apakah itu menghapus datafile - -- drop file tablespace oracle file drop tablespace oracle - -- drop datafiles from table sapce drop meja datafiles dari sapce - -- drop tablespace with file drop tablespace dengan file - -- drop datafile in oracle drop datafile di oracle - -- drop datafile include contents drop datafile termasuk isi - -- drop tablespace without datafile drop tablespace tanpa datafile - -- droping tablespace on oracle droping tablespace pada oracle - -- drop tablespace in oracle drop tablespace di oracle - -- drop tablespace did not delete file drop tablespace tidak menghapus file - -- drop datafile + oracle drop datafile + oracle - -- drop datafile from tablespace drop datafile dari tablespace - -- drop tablespace in oracle 10g drop tablespace di oracle 10g - -- drop tablespace destroy drop tablespace yang menghancurkan - -- DROP TABLESPACE DATAFILE DROP tablespace DATAFILE - -- how to drop tablespace in oracle 10g cara drop tablespace di oracle 10g - --