View Single Post
  #1 (permalink)  
Old June 8th, 2007, 16:20
chrisplough's Avatar
chrisplough chrisplough is offline
Site Moderator
 
Join Date: Jun 2006
Location: West Chester, PA
Posts: 847
Blog Entries: 7
Thanks: 53
Thanked 205 Times in 124 Posts
Groans: 0
Groaned at 0 Times in 0 Posts
Rep Power: 10
chrisplough has a spectacular aura aboutchrisplough has a spectacular aura aboutchrisplough has a spectacular aura about
Send a message via AIM to chrisplough
[INSTRUCTIONS] Managing Oracle Tablespaces - Quick Commands

Hello!

I've got a friend who is learning how to install OTM and isn't a very strong DBA. He's been asking about commands for modifying and creating tablespaces within an Oracle database.

While these are readily available on the internet, I feel they're applicable enough to OTM to warrant a post here.

Resize a datafile:
Code:
alter database datafile '/u01/oradata/otmdb/INDX01.dbf' resize 2000M;
Create a tablespace and associated datafile:
Code:
create tablespace BPL_DAY7
  logging
  datafile '/u01/oradata/otmdb/BPL_DAY701.dbf' 
  size 100M
  autoextend on
  next 100M maxsize 2000M
  extent management local;
Create a temporary tablespace and associated datafile:
Code:
create temporary tablespace TEMP 
  tempfile '/u01/oradata/otmdb/TEMP01.dbf' 
  size 1000m 
  autoextend on 
  next 100m maxsize 2000m
  extent management local;
Add a datafile to an existing tablespace:
Code:
alter tablespace INDX
  add datafile '/u01/oradata/otmdb/INDX02.dbf' size 2000M autoextend on next 100m maxsize 4000M;
Add a datafile to an existing temporary tablespace:
Code:
ALTER TABLESPACE TEMP
    add tempfile '/u01/oradata/otmdb/TEMP02.dbf' size 1000M autoextend on next 100m maxsize 2000M;
In addition, here are some great sites for getting more detailed commands and info:Hope this helps!

--Chris
__________________
Chris Plough
MavenWire

www.MavenWire.com
Reply With Quote