Link to home
Start Free TrialLog in
Avatar of dbaseek
dbaseek

asked on

create user tablespace

In my database there is no user tablespace and I want to create that as the default tablespace.
In a database in terabyte range...What is the ideal way to create a user tablespace..
Thanks in advance
Avatar of barfi
barfi
Flag of United States of America image

Here is how you create users tablespace in a terabyte database in 10g :

Creating a Bigfile Tablespace: Example

The following example creates a bigfile tablespace bigtbs_01 with a datafile bigtbs_f1.dat of 10 MB:

CREATE BIGFILE TABLESPACE bigtbs_01
  DATAFILE 'bigtbs_f1.dat'
  SIZE 20M AUTOEXTEND ON;

A bigfile tablespace contains only one datafile or tempfile, which can contain up to 232 or 4G blocks. The maximum size of the single datafile or tempfile is 128 terabytes (TB) for a tablespace with 32K blocks and 32TB for a tablespace with 8K blocks
I am sorry I did not pay attention to what db version are your running?
Avatar of dbaseek
dbaseek

ASKER

Sir why here datafile ext is dat ok and where can set the path of that file
which location it should be created for example
C:\oracle\product\10.2.0\oradata\
Avatar of dbaseek

ASKER

CREATE BIGFILE TABLESPACE bigtbs_01
  DATAFILE 'bigtbs_f1.dat'
  SIZE 20M AUTOEXTEND ON;
Tablespace created
ALTER DATABASE DEFAULT TABLESPACE bigtbs_01;
database altered
my question now is where is this bigtbs_01 located
It should be with rest of your other db files. Do followin query to see the path; You can also give your own path while creating.
select * from v$datafile;
and look under Name column it should show you all the paths to all the datafiles.
Oh !did you mean tablespace or datafile. Tablespaces store datafiles.
I just went back to your question.
ASKER CERTIFIED SOLUTION
Avatar of barfi
barfi
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dbaseek

ASKER

thanks everything is perfect only thing is why we are using dat ext instead of dbf
My apology it should be .dbf extension and not .dat. -TYPO :(