Oracle Commands


Create Tablespace

Syntax

CREATE TABLESPACE
DATAFILE
SIZE
AUTOEXTEND on
MAXSIZE
EXTENT MANAGEMENT LOCAL UNIFORM SIZE ;

Example

create tablespace RAJEEVA
datafile ‘/usr/lib/oracle/xe/oradata/XE/rajeeva.dft’
size 100M
autoextend on
maxsize 2000M
extent management local uniform size 640K;

Create User

Syntax

create user
identified by
default tablespace
temporary tablespace temp;

Example

create user CLEANGLOBUS
identified by root
default tablespace RAJEEVA
temporary tablespace temp;

Grant Permission for User:

Syntax

grant connect, resource to ;

Example

grant connect, resource to CLEANGLOBUS;

Import Dump

Syntax

imp User/Password File=filename.dmp FULL=y

Export Dump

Syntax

exp User/Password FILE=filename.dmp OWNER=User

Alter Tablespace Size

ALTER dataBaseName DATAFILE ‘/usr/lib/oracle/xe/oradata/XE/gbdata.dft’ RESIZE 3000M

Alter Tablespace Name

ALTER TABLESPACE oldTablespaceName RENAME TO newTablespaceName;

Advertisements

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 )

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: