Create tablespace

Hey how do I create a oracle tablespace with initial size as 10gb and expandable to 50gb. Can I have the command for it. I really appreciate your time and help
hussainkhan22Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
slightwv (䄆 Netminder)Connect With a Mentor Commented:
THE DOCS (the docs,the docs,the docs,the docs,the docs):
http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/statements_7003.htm#i2202468

Everything you need to know is in the docs.

example from the docs.  Just change your values.

CREATE TABLESPACE tbs_02
   DATAFILE 'diskb:tbs_f5.dbf' SIZE 500K REUSE
   AUTOEXTEND ON NEXT 500K MAXSIZE 100M;
0
 
slightwv (䄆 Netminder) Commented:
It's even simple to find in the docs.

Two second search:
http://www.oracle.com/pls/db112/search?remark=quick_search&word=create+tablespace
0
 
sdstuberCommented:
Note,  you don't create tablespaces of specific size.

Tablespaces are a logical construct.

You create (as illustrated above) datafiles with specific sizes.
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
sventhanCommented:
http://psoug.org/reference/tablespaces.html

CREATE TABLESPACE your_tbs_name LOGGING
DATAFILE '/u01/oradata/' SIZE 10G  ------------
EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M
SEGMENT SPACE MANAGEMENT AUTO;
0
 
slightwv (䄆 Netminder) Commented:
sventhan,

that example is different from mine how?
0
 
sdstuberCommented:
If you're using OMF, you don't need to specify the file name and location, only the parameters.
If you don't want to create a single 50G datafile, you can create the tablespace with multiple files.
In this example it would be 5 datafiles that can each grow to 10Gb from an initial size of 2 each

CREATE TABLESPACE yourtablespace DATAFILE
   SIZE 2G AUTOEXTEND ON NEXT 256M MAXSIZE 10G,
   SIZE 2G AUTOEXTEND ON NEXT 256M MAXSIZE 10G,
   SIZE 2G AUTOEXTEND ON NEXT 256M MAXSIZE 10G,
   SIZE 2G AUTOEXTEND ON NEXT 256M MAXSIZE 10G,
   SIZE 2G AUTOEXTEND ON NEXT 256M MAXSIZE 10G
EXTENT MANAGEMENT LOCAL AUTOALLOCATE
SEGMENT SPACE MANAGEMENT AUTO;
0
 
sventhanCommented:
@ slightwv

< that example is different from mine how?

Why do you think its same ;)

Is SEGMENT SPACE MANAGEMENT AUTO a default?  Its a different link.
0
 
slightwv (䄆 Netminder) Commented:
>>Is SEGMENT SPACE MANAGEMENT AUTO a default?  Its a different link.

The docs apply to all.  Excerpt form the link I posted:

This setting is called automatic segment-space management and is the default.

>>Its a different link.

and?  Still basically a duplicate example from a previous post and didn't really add anything new to the question.
0
 
sventhanCommented:
Agreed. No points for me.
0
 
Geert GOracle dbaCommented:
get toad and click on 'create tablespace'
the dba version of toad that is :)

no one posted that comment yet :)

0
 
khadermoinuddinCommented:
try this syntax i am opening it will work

CREATE TABLESPACE users
   DATAFILE 'diskb:users.dbf' SIZE 10g
   AUTOEXTEND ON
NEXT 2G MAXSIZE 50G;
0
 
slightwv (䄆 Netminder) Commented:
khadermoinuddin,

The 'exact' datafile syntax will be based on how the database is set up.  Also, the size parameters should be straight forward from the many examples above.

also in your post:  'diskb:users.dbf' looks like it might have come from the documentation since Oracle likes to use it:  re:the example I posted above from the docs.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.