A possibility for the poster...
Connor, October 16, 2001 - 12:10 pm UTC
Rather then indexfile, it can sometimes be very useful to use 'strings' (unix) on an "exp rows=n" dump file - mainly because the create commands are not broken over multiple lines. This makes removing the storage clause (with something like sed 's/STORAGE(.*)//g' easier.
good tip
Andrew, November 02, 2001 - 12:38 pm UTC
Connor - thanks for the useful tip
We can generate the script by using powerdesign tools
jacky, June 02, 2003 - 10:48 am UTC
We can generate the script by using powerdesign tools, then import the data imp userid=accela/aaaaa@orcl full=y ignore=y indexes=n
dmt to lmt
karthik, September 17, 2003 - 7:22 am UTC
please tell me what r the thing i should consider before importing data from a dmt to lmt , is it compulsary to remove the storage clause.
thanks in advance
karthik
September 17, 2003 - 8:07 am UTC
compulsary?
no
good idea?
probably
it'll take the storage clause, figure out HOW MUCH would have been allocated in the DMT and allocate the same amount in the LMT. if that is what you want -- thats OK, if not, remove the storage.
For CLOB
Reader, September 17, 2003 - 9:11 am UTC
Is there a link that I can refer to see how to import tables with CLOB datatype? Thanks.
September 17, 2003 - 11:51 am UTC
umm, it is just "imp"
nothing special for import.
the server Utilities guide documents import.
exp dictionary tables to LMT
Jozef, May 12, 2004 - 5:24 pm UTC
Hi Tom, what would be the best scenario to export all objects from DB , about 7,000 of them into LMT.
I need to change to uniform size of LMT and I would like to have storage clause removed from objects(tables,indexes).
I can not afford to edit "indexfile" to 7,000 objects.
Right now DB 40GB, is fragmented and I must reorganize everything. Any tools that will let me create script for create script to create indexes for all tables without storage clause before imp?
May 13, 2004 - 9:36 am UTC
don't use export/import.
use
alter table T MOVE storage (initial 1k next 1k minextents 1 pctincrease 0) tablespace whatever;
alter index i rebuild storage (initial 1k next 1k minextents 1 pctincrease 0) tablespace whatever;
you can do that nologging, parallel, whatever (slightly faster than exp/imp). You won't stand a chance of accidently "losing something". and the alters are pretty trivial to generate right out of the data dictionary itself with a simple select.
reader
A reader, August 16, 2005 - 11:58 am UTC
Here is an exerpt from 9,2 Database Administration Guide:
<>
Specifying Segment Space Management in Locally Managed Tablespaces
When you create a locally managed tablespace using the CREATE TABLESPACE statement, the SEGMENT SPACE MANAGEMENT clause allows you to specify how free and used space within a segment is to be managed. Your choices are:
MANUAL
Specifying MANUAL tells Oracle that you want to use free lists for managing free space within segments. Free lists are lists of data blocks that have space available for inserting rows. This form of managing space within segments is called manual segment-space management because of the need to specify and tune the PCTUSED, FREELISTS, and FREELISTS GROUPS storage parameters for schema objects created in the tablespace.
MANUAL is the default.
AUTO
This keyword tells Oracle that you want to use bitmaps to manage the free space within segments. A bitmap, in this case, is a map that describes the status of each data block within a segment with respect to the amount of space in the block available for inserting rows. As more or less space becomes available in a data block, its new state is reflected in the bitmap. Bitmaps allow Oracle to manage free space more automatically, and thus, this form of space management is called automatic segment-space management.
<>
Is it true that
All LMT segments use bitmap to track to record space
usage in blocks. Then what is the significance of freelist
in manual alloaction (uniform allocation)
Also according to the manual "manual is default". If
allocation type (uniform or autoallocate) is not specified
during tablespace creation, I found LMT defaults to SYSTEM
allocation of extents.
August 17, 2005 - 10:52 am UTC
LMT's use a bitmap at the head of the file to track the EXTENTS in the tablespace.
ASSM (automatic segment space management) uses bitmap blocks in the extents to manage the use of the blocks.
LMTS -> bitmaps to manage extents.
ASSM -> bitmaps to manage blocks in the extents.
Manual Segment Space Management (that is the manual they refer to) is default today - but 10gr2 changes that.
System allocated extents, not UNIFORM (what are not "manual" but uniform) are the default for LMTs if not specified
reader
A reader, August 16, 2005 - 12:32 pm UTC
Never mind about the previous posting
There was a confusion between
EXTENT MANAGEMENT {DICTIONARY |
LOCAL {AUTOALLOCATE | UNIFORM [SIZE int K | M]} }
SEGMENT SPACE MANAGEMENT {MANUAL | AUTO}
reader
A reader, August 17, 2005 - 12:37 pm UTC
Therefore ASSM has bmb which replaces the freelists.
In not ASSM, it has freelists. Am I correct
August 17, 2005 - 1:58 pm UTC
ASSM has bit map blocks and no freelists (there is no such thing as a "bitmap freelist")
Manual segment space management uses freelists and freelist groups.
reader
A reader, August 17, 2005 - 2:04 pm UTC
Thanks
I meant bmb (Bit Map Blocks levels 1,2,3) replaces
freelists
August 17, 2005 - 2:08 pm UTC
correct, i only mentioned "bitmap freelists" because I've seen people using this term which is made up and doesn't make sense.
Not that you used it!
What happens to pctfree/pctused in ASSM
A reader, September 26, 2005 - 5:41 pm UTC
Looking at the default settings in dba_tables for ASSM created tablespaces, Oracle chooses the default 10/40 pctfree/pctused parameters.
Are these settings still used for the BMB fillfactor, and if so, how?
September 27, 2005 - 10:01 am UTC
the only one that counts is pctfree - and it defaults to 10%. pctfree is obeyed as normal (for future updates)
pctused has no meaning for ASSM managed storage. It is a legacy value, maintained in the event you move that segment to manual segment space management.
Question about size of uniform extent
paola, February 08, 2006 - 11:07 am UTC
I want to create a TS that is going to have a big objects. I want to make it local uniform. My quetion is: Is it OK if I make the inform size 300M ? Like I said, I have tables of 10G... so it would have 34 extents. But I donĀ“t know if is there any limit to the size of the uniform eztent, maybe 300M is to big.
I've alredy created the TS (I can still erase it), and I see there is 100M used... but I did not create any object. Can you explain me Why is that?
Thank you.
February 08, 2006 - 11:20 am UTC
are you sure there isn't "300m" used.
when you create the tablespace, you must add 64k (or 128k if you have a 32k blocksize) to the datafile. eg: datafile would be of size N*300mb + 64k
If it is N*300mb, we take 64k for ourselves - but you then have a 299.99mb extent which won't work (you said 300mb) so it is "wasted".
To get it back, grow your datafile by 64k.
By using a 300mb extent, you have to understand that is your MINIMAL unit of allocation. If a table is 300.00001mb it will consume 600mb of space.
If you do parallel 12 operations (say a direct path load), you will have AT LEAST 12 * 300mb of space - regardless of how much data you load. And if you load 300.0001 * 12 mb of data (so each load thread gets 300.0001 mb) you will have 24*300mb of allocated space (with 12 almost empty extents)
If you used system allocated extents, we are able to extent trim - so that the last extent is only as big as it needs to be.
Therefore, it is a tradeoff in space vs number of extents.
using system allocated extents your 10g object would have about 300 or so extents, perfectly reasonable, acceptable, ok, nothing to be afraid of, good, positive, not negative, <any other good ok word you want>.
Question about size of uniform extent
Paola, February 08, 2006 - 11:49 am UTC
You're rigth! I've just recreated the test TS of total size of 7002MB and uniform size extent of 100M. Only 2 MB appears to be used.
You told me: 300 extents is not to much for a table, so How many extents is bad?
I don't want to use autoallocate because I lost control over utilization of space. Do you think a 100M size of extent could it be suit?
February 09, 2006 - 4:11 am UTC
you would have to have many thousands/tens of thousands of extents before I'd say "rethink that" and since a 10g object takes a couple of hundred and beyond 10g I'm thinking about using partitioning anyway.... I don't really hit it.
I gave you the pros and cons - with uniform size, you have uniform size and everything it implies. No extent trimming, expect to waste lots of space in the last extent - especially if you do parallel operations (whereby you have N last extents - where N was the degree of parallelism).
It is entirely your choice.
DMT-LMT
Ranga, March 10, 2006 - 4:55 am UTC
It is very good!!!!!!!!
Stuart, October 26, 2007 - 7:09 am UTC
Hi Tom,
Earlier on in the question, you said use the alter table move syntax for moving between tablespaces, however this doesn't work on table objects with type log or long raw. So I'm going to use exp/imp.
Do I need to worry about the compress argument to exp when moving to a LMT with auto allocation and auto segment management?
Stu
October 29, 2007 - 11:03 am UTC
do not use compress. pre-create the table without a storage clause and let it do it itself.