Knowledgebase

Oracle 8i adding tablespace

Here's an example of statement that creates a new tablespace and new user that can use it.
It should be execute by sys.
Note that this is only an example and you probably want consult your dba before actually
creating a new tablespace.
values in [] should be changed to whatever value you'd like it to be.

# creating tablespace
CREATE TABLESPACE [baker_extranet]
DATAFILE '[/export/home/u02/oradata/cbaker/extranet_tablespace.dat]' SIZE [10M]
AUTOEXTEND ON NEXT [1M] MAXSIZE [50M]
OFFLINE;

alter tablespace [baker_extranet] online;

# creating a new user with new tablespace as default
create user [baker] identified by [password]
default tablespace [baker_extranet];

# giving user quota on new tablespace
alter user [baker] quota [50M] on [baker_extranet];

# granting new user connect rights
grant connect to [baker];

# creating new rollback segment
create rollback segment [extranet_rollback]
tablespace [baker_extranet];

alter rollback segment [extranet_rollback] online;
Post Date: 2015-02-22 18:00:27 · Tags: Knowledgebase,

Article Topics

Apache
 . . .SSL (1)
Mysql (2)
SOLR (1)
Oracle (4)
Unix (2)
 . . .Command Line (1)

Quick Contact

Phone: 608-320-9321

pdf document opens new tab Resume

LinkedIn opens new tab LinkedIn Profile

Payments opens new tab Online Payments