Home > Ngoprek > Recreate temp tablespace + datafile Oracle

Recreate temp tablespace + datafile Oracle

Tak terasa datafile temp tablespace development saya membengkak, memenuhi harddisk server development.
Untuk itu, saya “create” ulang temp tablespace nya, initiate dengan datafile yang ukurannya kecil.

Berikut step-stepnya:

  • Buat temp tablespace baru, untuk keperluan temporary.
    CREATE TEMPORARY TABLESPACE temp2;

  • Set temporary tablespace ke temp2 yang baru dibuat.
    ALTER DATABASE DEFAULT TEMPORARY TABLESPACE temp2;
  • Hapus temporary tablespace yang lama.
    DROP TABLESPACE TEMP INCLUDING CONTENTS AND DATAFILES;
  • Buat temp tablespace baru
    CREATE TEMPORARY TABLESPACE temp TEMPFILE '/pbx_u01/oradata/data1/DBMOBCOM/temp01.dbf' SIZE 256M REUSE AUTOEXTEND ON NEXT 128M MAXSIZE unlimited EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M;

  • Set default tablespace ke temp
    ALTER DATABASE DEFAULT TEMPORARY TABLESPACE temp;
  • Hapus temporary tablespace (temp2)
    DROP TABLESPACE temp2 INCLUDING CONTENTS AND DATAFILES;

 

Semoga bermanfaat.

Salam

Advertisements
Categories: Ngoprek
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: