| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle8 datafiles setting
"Ken" <shihlo_at_erols.com> wrote in message
news:39732C11.B2CBB0CD_at_erols.com...
> I confused the oracle datafile setting:
>
> create database datafile...
> create tablespace .... datafile ....
> alter database create datafile....
> alter database datafile....
> alter tablespace ... add datafile ....
>
> which commands are used when the datafile is not exist and need to
> create?
> which commands are used when the datafile is already exist ?
>
To create a tablespace (and hence the datafile which initially makes it up), use the 'create tablespace X datafile 'xxx/xxx/yy.dbf' size 10M' sort of command.
If you want to resize a file that already exists, use the 'alter tablespace datafile 'x' resize 1M' sort of command.
To add a brand new file to a tablespace, so it gets bigger, use the 'alter tablespace add datafile 'xxx/xxx/ddd.dbf' size 3M' sort of command.
You can only talk about tablespaces when the database is fully open, however, so work with datafiles when in the mount stage involves using the 'alter database datafile' sort of command.
There are various other permutations available to you. In general, you work with datafiles via their hosting tablespace, unless the database is not completely open, in which case you start using the 'database datafile' construct.
Hope that clarifies things a bit
Incidentally, try not to post to so many newsgroups in the future. The server group is the right forum for these sorts of questions -it tends to annoy people a bit when the same stuff gets plastered everywhere.
Regards
HJR
> Ken
>
>
Received on Sun Jul 23 2000 - 00:00:00 CDT
![]() |
![]() |