How to tell which datafile a table is in?


How can I tell which datafile a table is created into...

Can i control this. I hvae windows NT but would like to know the answer for UNIX too.



Ans1:
Join DBA_EXTENTS and DBA_DATA_FILES ...

Torsten

Ans2:
As mentioned in other post, DBA_EXTENTS will list the FILE_ID in which each extent is stored.  Note that subsequent extents may be in different datafiles.  I'm not sure why you'd need to control which datafile a table is created into (if it matters that much, you might consider creating a new tablespace with the desired datafile placement), and I don't think you can do it (at least not in 7.3), but once the table is created, you can place additional extents in whatever datafile you wish using the ALLOCATE EXTENT clause of the ALTER TABLE command.  Again, I don't know quite what you want to achieve, but by creating the table with a very small initial extent, you can at least get most of the data into the preferred datafile.  Hope this helps.
 

Hosted by www.Geocities.ws

1