How to Remove and Drop Datafiles from Tablespace in Oracle Databaseデータファイルを削除してからドロップする方法をOracleデータベースのテーブルスペースで

Oracle RDBMS databases stores data logically in the form of tablespaces and physically in the form of data files. OracleのRDBMSのより多くのデータをデータベースに格納さのテーブルスペースの形で論理的にも肉体的には、フォームのデータをファイルです。 The datafiles are added to the tablespaces as database space requirement grows bigger.テーブルスペースのデータファイルが追加されたデータベースのスペース要件として大きく成長します。 However, there are several reasons you may want to remove or delete data files from a 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.を追加するなど、誤って誤ってテーブルスペースの大きさや不要なDATAFILEをしてか、または、データ容量が小さく、利用方法にはいくつかのデータファイルを削除するか、またはOracleデータベースを復元する試みが失敗した場合を開始するか、または破損し行方不明のためにデータファイルを削除して、 Oracleの提供する簡単な方法はありませんまたはユーザーインターフェイスをテーブルからデータファイルを削除したり、ドロップします。 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. DATAFILEを一度には、テーブルスペースの一部を、分離できなくなることができますまたはテーブルから削除さは、たとえには、いくつかの回避策です。

How to Completely Drop the Whole Tablespace with All Datafiles テーブルスペース全体を完全にドロップする方法についてすべてのデータファイル

The easiest way to drop a or multiple datafiles is by dropping the entire tablespace together with its 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.もはや必要とする場合、データの内容を、テーブルスペース、テーブルスペースには、以下のコマンドをドロップすると、 DATAFILEを、との内容のテーブルからのデータ辞書をダウンロードします。 All of the objects that where contained in that tablespace are permanently removed.どこのすべてのオブジェクトが含まれるテーブルスペースが完全に削除します。

DROP TABLESPACE <tablespace name> INCLUDING CONTENTS AND DATAFILES; ドロップテーブルスペース<tablespace内容やデータファイル名を含む;

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).を指定しない場合は"とデータファイル" 、 Oracleは特定の物理的なDATAFILEをドロップドロップした後、テーブルスペースのコマンドを、いつでもオペレーティングシステムからファイルを削除してシェル(の場合、データファイルがロックされ、サーバーを再起動します) 。

But always perform a backup of the database, as the “DROP TABLESPACE” command is irreversible.しかし、データベースのバックアップを実行するには常に、 "ドロップテーブルスペース"コマンドは不可逆的です。 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.それには、良い練習をチェックすると、実際にテーブルスペースを識別する方法については、多くのデータファイルを実行する前にミスを避けるために行動をドロップします。

How to Check How Many 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:識別を決定すると、テーブルのすべてのデータファイルにリンクして、次のようなクエリを使用して、テーブルスペースの名前を資本金の手紙:

SELECT file_name, tablespace_name ファイル名を選択し、 tablespace_name
FROM dba_data_files よりdba_data_files
WHERE tablespace_name =’<tablespace name>’; どこtablespace_name = ' <tablespace名' ;

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.テーブルスペースを含む場合は、複数のデータファイル、およびドロップするだけに、 1つまたはいくつかのデータファイルとデータファイルと一緒に、残りの維持は、オブジェクトや内容は、データオブジェクトまたはエクスポートしなければならないため、影響を受けるテーブルスペースです。 Once exported, the tablespace can be dropped with above “DROP TABLESPACE” command.一度にエクスポートすると、テーブルスペースの上に落とし、 "ドロップテーブルスペース"コマンドを使用します。 Then, recreate the tablespace with the datafile(s) required (that you initially want to keep), and then import the objects into the recreated tablespace.その後、テーブルスペースのDATAFILEを再作成します(劇団)が必要となります(最初にしたいことを保つ) 、と入力し、オブジェクトをインポートしてテーブルスペースの再作成します。

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. 1つまたは複数のデータファイルが存在しない場合、回復プロセスまたは誤って削除した後、 データベースを使用することができますDATAFILEを変える<datafile名 DATAFILEをオフラインでドロップコマンドを使うことで、オフラインのデータベースを起動するようにした後は、テーブルスペースの問題を抱えたが破棄されます。 (See (参照 instruction to recover from missing datafiles命令を回復するデータファイルから行方不明 .) 。 )

How to Resize a Datafile to Minimum Size DATAFILEをどのように最小サイズのサイズを変更する

Another alternative to drop the datafile is by shrinking the size of datafile instead of dropping.もう一つの代わりにドロップするだけのサイズを縮小するDATAFILEのはDATAFILEの代わりにドロップします。 This option is only possible if there is no extents in the datafile.このオプションは、のみ可能なことがない場合はエクステントは、 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.場合にはなし、することが可能にダウンしてデータファイルのサイズを変更する非常に小さなファイル( 2ブロック) 、ここでOracleデータベースは、もはや任意の範囲は、 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.しかし、この回避策はありませんDATAFILEを削除してからファイルを削除してテーブルスペースにも肉体的に、それとしてのリスクを削減するだけに切り捨てられるデータは空のブロックが減少します。 It simply makes it unusable and takes up almost close to no disk space.単に使用不可能にすることとは、ディスクの空き容量アップほとんどないに近いです。 To resize a datafile, use the following query: DATAFILEのサイズを変更するには、次のようなクエリを使用して:

alter database datafile ‘<datafile name>’ resize 8M; データベースDATAFILEを変える' <datafile名'のサイズを変更8メートル;

How to Determine the Extents inside Datafile 内部DATAFILEのエクステントを確認する方法

To check and determine the extents that exists in a datafile, use this query:をチェックすると確認するにエクステントが存在するDATAFILEを使うと、このクエリ:

SELECT owner, segment_name 所有者を選択し、 segment_name
FROM dba_extents a, dba_data_files b よりdba_extentsを、 dba_data_files b
WHERE a.file_id = b.file_id どこa.file_id = b.file_id
AND b.file_name = ‘<datafile name>’ とb.file_name = ' <datafile名'

IMPORTANT : This is a machine translated page which is provided "as is" without warranty. 重要 :これは、機械翻訳ページで提供"現状有姿"を保証します。 Machine translation may be difficult to understand.機械翻訳を理解するのは難しいかもしれません。 Please refer toを参照してください original English articleオリジナルの英語記事索引 whenever possible.いつ可能です。

Share and contribute or get technical support and help atを共有して貢献や技術サポートとヘルプを得る My Digital Life Forums 私のデジタルライフフォーラム .です。



One Response to “How to Remove and Drop Datafiles from Tablespace in Oracle Database” 1つの応答を" &ドロップでデータファイルを削除する方法の表領域をOracleデータベースから"

  1. How Drop Tablespace and Recover Oracle Database When Accidentally Delete Datafile » My Digital LifeどのようドロップOracleデータベースのテーブルスペースを回復DATAFILEのときに誤って削除»私のデジタルライフ
    August 4th, 2007 02:55 2007年8月4日02:55
    1

    [...] Tip: How to check datafiles that belong to tablespace. [...]ヒント:データファイルをどのように属してテーブルをチェックする。 [...]

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> これらのタグを使用することができます: <aのhref=のtitle= <abbrのtitle= <blockquote cite=""> <cite> <acronymのtitle= <b>ダウンロードの<code> <デル日時= " " >の<em> <i>て<strike> <strong> <q cite="">

Subscribe without commenting登録なしのコメント


Custom Search

New Articles新しい記事

Incoming Search Terms for the Article検索用語を受信するには

oracle drop datafile ドロップDATAFILEのオラクル - - oracle drop tablespace Oracleのテーブルスペースのドロップ - - drop datafile ドロップDATAFILEの - - remove datafile DATAFILEを削除する - - drop tablespace oracle ドロップテーブルスペースのオラクル - - delete tablespace テーブルスペースを削除 - - Drop datafile oracle ドロップDATAFILEのオラクル - - drop datafiles ドロップデータファイル - - drop tablespace datafile テーブルスペースのDATAFILEのドロップ - - remove datafile oracle 削除DATAFILEのオラクル - - delete datafile DATAFILEを削除する - - drop tablespace command ドロップテーブルスペースコマンド - - delete datafile oracle 削除DATAFILEのオラクル - - oracle remove datafile オラクルDATAFILEを削除する - - drop tablespace in oracle Oracleの表領域をドロップ - - oracle drop tablespace datafile OracleのテーブルスペースのDATAFILEのドロップ - - drop oracle datafile ドロップDATAFILEのオラクル - - drop datafile from tablespace ドロップよりDATAFILEのテーブルスペース - - oracle delete tablespace Oracleのテーブルスペースを削除 - - delete datafile from tablespace DATAFILEのテーブルから削除 - - oracle drop datafiles Oracleのデータファイルドロップ - - oracle delete datafile オラクルDATAFILEを削除する - - oracle tablespace remove datafile DATAFILEをOracleのテーブルスペースを削除 - - remove tablespace テーブルスペースを削除 - - oracle drop table Oracleのドロップテーブル - - drop datafiles oracle ドロップOracleのデータファイル - - how to delete tablespace テーブルスペースを削除する方法 - - drop datafile + oracle ドロップDATAFILEを+オラクル - - delete tablespace oracle Oracleのテーブルスペースを削除 - - oracle drop tablespace file Oracleのテーブルスペースのファイルをドロップ - - oracle remove data file Oracleのデータファイルを削除 - - drop tablespace and datafile テーブルスペースとDATAFILEをドロップ - - drop tablespace datafiles ドロップテーブルスペースのデータファイル - - oracle remove datafile from tablespace DATAFILEをよりOracleのテーブルスペースを削除 - - delete datafiles oracle Oracleのデータファイルを削除 - - delete oracle datafile オラクルDATAFILEを削除する - - drop datafile ドロップDATAFILEの - - datafile drop DATAFILEのドロップ - - how to remove datafile DATAFILEのを削除する方法 - - drop tablespace remove datafile ドロップDATAFILEのテーブルスペースを削除 - - Oracle datafile drop オラクルDATAFILEのドロップ - - drop tablespace file テーブルスペースのファイルをドロップ - - drop datafile in oracle ドロップDATAFILEを、 Oracleの - - drop data file データファイルをドロップ - - oracle drop tablespace datafiles Oracleのテーブルスペースのデータファイルドロップ - - oracle drop tablespace Oracleのテーブルスペースのドロップ - - oracle empty datafile 空のDATAFILEのオラクル - - drop tablespace including contents and datafiles ドロップテーブルの内容とデータファイルを含む - - oracle delete DATAFILES Oracleのデータファイルを削除 - - drop tablespace including datafiles ドロップテーブルスペースのデータファイルを含む - -