LoginSignup
0
0

More than 5 years have passed since last update.

oracle テーブルスペースの移動

Posted at

パフォーマンス検証用に作成したテーブルスペースを、別のディスクに移す必要があったので、その時のメモ。

手順

1 テーブルスペースを OFFLINE に。

SQL> alter tablespace test1 OFFILE;

2 os コマンドでファイルを移動。

cp -pi /home/user1/test1.dbf  /data/user1/test2.dbf
rm -i /home/user1/test1.dbf

mv しちゃえばいいだけなんですが、念のため。

3 テーブルスペース情報をリネーム

SQL> alter tablespace test1 rename datafile '/home/user1/test1.dbf' to '/data/user1/test2.dbf';

4 テーブルスペースを ONLINE に

SQL> alter tablespace test1 ONLINE;

これだけ。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0