Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: NEWBIE Q: Personal Oracle 7.3 and Tablespaces

Re: NEWBIE Q: Personal Oracle 7.3 and Tablespaces

From: Jerry Gitomer <jgitomer_at_p3.net>
Date: 1997/12/11
Message-ID: <3490B6DB.582F@p3.net>#1/1

Okay, how about:

	CREATE TABLESPACE custspace
	DATAFILE 'custfile_01'
	DEFAULT STORAGE (INITIAL 10MB NEXT 10MB PCTINCREASE 1
		MINEXTENTS 1 MAXEXTENTS 249)
	ONLINE;

This will create a tablespace named "custspace" which will contain a datafile named "custfile_01" which will be located in the directory you were in when you you went into Oracle (er, well if you are using UNIX. If you are using a different OS I don't know where the data file will be located.) In any event (oh the hell with it -- I will assume that you are using UNIX) the data file will be 10megabytes in length (the initial extent size since the minimum number of extents is 1) and can grow to 2.49GB (since each succeeding extent will be 10MB and you can have a maximum of 249 extents). The PCTINCREASE value of 1 tells Oracle not to increase the size of each succeeding extent. If you specified 50 for example each succeeding extent would be 50% larger than the last extent added. The final parameter is ONLINE which tells Oracle to make it available for use as soon as it is created.

When you press return Oracle will go out and write 10MB worth of something to the datafile and will then return to you. Now you can create the table.

Jerry

DB wrote:
>
> I'm going through _Oracle: A Beginner's Guide_ with PO7.3.3 and
> SQL*Plus 3.3.3 on Win95. I try the following SQL statement (from
> Chapter 5 if you're keeping track) and get an error:
>
> ----------------------------------------------------------
> Personal Oracle7 Release 7.3.3.0.0 - Production Release
> With the distributed and replication options
> PL/SQL Release 2.3.3.0.0 - Production
>
> SQL> create table customer(
> 2 last_name varchar2(30) not null,
> 3 state_cd varchar(2),
> 4 sales number)
> 5 tablespace custspace
> 6 storage(initial 25k next 25k minextents 1);
> create table customer(
> *
> ERROR at line 1:
> ORA-00959: tablespace 'CUSTSPACE' does not exist
>
> SQL>
>
> ----------------------------------------------------------
>
> For the life of me, I cannot figure out how to create a tablespace in
> addition to the SYSTEM table space that already exists. Any ideas?
>
> All help is appreciated.
>
> db
Received on Thu Dec 11 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US