Home » RDBMS Server » Server Administration » How to designate a file for use
How to designate a file for use [message #188759] Mon, 21 August 2006 09:30 Go to next message
Jack_zhai
Messages: 12
Registered: February 2006
Junior Member
Hi,

Regularly, when I want to use multiple files for one tablespaces, I am going to turn the first few data files autoextensible to "NO". Just leave the last file's autoextensible as "YES". Then when new object is created in that tablespace, it will go the the last file. Then I can control the size of the data files. Today, I checked another database, I found there were five files in one tablespace. I am wodering how it is done ?

Thanks
Jack
Re: How to designate a file for use [message #188763 is a reply to message #188759] Mon, 21 August 2006 09:48 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
You cannot control the object allocation (table/index) across the datafile.
You can control only on tablespace level. Not in datafile level.
Re: How to designate a file for use [message #188966 is a reply to message #188763] Tue, 22 August 2006 10:48 Go to previous messageGo to next message
Jack_zhai
Messages: 12
Registered: February 2006
Junior Member
Hi,

I know that I just can designate a tablespace for the object not a file. But I saw our oracle financial system used five files for system tablespace and the extensible are "YES". I am wondering how did they do it ?

Thanks
Jack
Re: How to designate a file for use [message #188968 is a reply to message #188966] Tue, 22 August 2006 10:52 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
>>But I saw our oracle financial system used five files for system tablespace and the extensible are "YES". I am wondering how did they do it ?

Alter database datafile '/path/systemdatafile_1.dbf' autoextend on;
Alter database datafile '/path/systemdatafile_2.dbf' autoextend on;
Alter database datafile '/path/systemdatafile_3.dbf' autoextend on;
...
...

And you can have multiples datafiles for the same tablespace

[Updated on: Tue, 22 August 2006 10:53]

Report message to a moderator

Re: How to designate a file for use [message #188993 is a reply to message #188759] Tue, 22 August 2006 12:45 Go to previous messageGo to next message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
Jack_zhai wrote on Mon, 21 August 2006 10:30

Hi,

Regularly, when I want to use multiple files for one tablespaces, I am going to turn the first few data files autoextensible to "NO".



Then

Quote:

Today, I checked another database, I found there were five files in one tablespace. I am wodering how it is done ?


I don't understand. You first claim you "regularly" use multiple files in on tablespace, then you are confused that another database has multiple files for a tablespace. Huh? Are you asking how to add datafiles to a tablespace?

alter tablespace data_t1 add datafile '/vol00/ORCL/data_t1_2.dbf' size 1000m autoextend on;
Re: How to designate a file for use [message #189487 is a reply to message #188993] Thu, 24 August 2006 15:55 Go to previous messageGo to next message
Jack_zhai
Messages: 12
Registered: February 2006
Junior Member
May be my explanation was not clear.

what I was saying is let us say, there are two files file1 and file2 for tablespace tsp1. If I keep file1 and file2 both as extensible, then when I insert data to the tsp1, all the data will be inserted to file1 which added to the tsp1 first. In order to insert data to file2, I have to change file1 as not extensible. What I am confusing is , I saw file1 and file2 both extensible but both have a certain mount of data in them. How does that happen ?

Thank
Jack
Re: How to designate a file for use [message #189549 is a reply to message #189487] Fri, 25 August 2006 01:37 Go to previous message
aorehek
Messages: 52
Registered: August 2006
Member
You can not control in which datafile the inserted data will go.


Quote:


Mahesh Rajendran

You cannot control the object allocation (table/index) across the datafile.
You can control only on tablespace level. Not in datafile level.




Use this link http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14231/dfiles.htm and search for Enabling and Disabling Automatic Extension for a Datafile
Previous Topic: Move objects between tablespaces
Next Topic: db link
Goto Forum:
  


Current Time: Fri Sep 20 10:31:23 CDT 2024