Segment organization within tablespace
Hi There,
I was trying to organize objects within the tablespaces and moving things around when I got up to this:
I needed to get rid of the PROD_T3 tablespace so I moved everything out of it apart from the below
SQL> select owner,segment_name,segment_type, TABLESPACE_NAME,bytes/1024/1204 from dba_Segments where tablespace_name='PROD_T3' order by 3;
OWNER SEGMENT_NAME SEGMENT_TYPE TABLESPACE_NAME BYTES/1024/1204
PROD PK_VOTER_REG_DOC INDEX PROD_T3 122.471761
PROD SYS_IL0000186869C00026$$ LOBINDEX PROD_T3 .053156146
PROD SYS_LOB0000186869C00026$$ LOBSEGMENT PROD_T3 .053156146
PROD PLAN_TABLE TABLE PROD_T3 .106312292
PROD BIN$IEDOLJmsSj6isKTb5Z2cOQ==$0 TABLE PROD_T3 .053156146and so I started investigating each segment in the tablespace:
SQL> select owner, index_name, table_name, tablespace_name, status from dba_indexes where index_name='PK_VOTER_REG_DOC';
OWNER INDEX_NAME TABLE_NAME TABLESPACE_NAME STATUS
PROD PK_VOTER_REG_DOC VOTER_REG_DOC PROD_T3 VALID
SQL> select owner, table_name, tablespace_name, status from dba_tables where table_name='VOTER_REG_DOC';
OWNER TABLE_NAME TABLESPACE_NAME STATUS
PROD VOTER_REG_DOC VALIDI'm a bit surprised form the above that there isn't a tablespace?!! I can describe the table and get a count for the number of rows in there:
SQL> desc prod.VOTER_REG_DOC
Name Null? Type
VOTER_ID NOT NULL NUMBER(10)
CARD_NO NOT NULL CHAR(9)
SQL> select count(*) from prod.VOTER_REG_DOC;
COUNT(*)
3656468But when I look at dba_segments, I can't see it:
SQL> select owner,segment_name, segment_type , tablespace_name from dba_segments where owner='PROD' and segment_name='VOTER_REG_DOC' order by 1,2
no rows selected
SQL>
SQL> select owner,segment_name, segment_type , tablespace_name from dba_segments where owner='PROD' and segment_name like '%VOTER_REG%' order by 2,3;
OWNER SEGMENT_NAME SEGMENT_TYPE TABLESPACE_NAME
PROD PK_VOTER_REG_DOC INDEX PROD_T3
SQL>Where am I going wrong with this? Also, I was surprised to see an object or a segment called "BIN$IEDOLJmsSj6isKTb5Z2cOQ==$0" ? I thought any BIN* would be sitting in DBA_RECYCLEBIN as the object(s) been deleted or am I wrong?
Appreciate the help.
Cheers
>
I believe you will find that you are looking at the definition entry for an index organized table.
select IOT_TYPE from dba_tables where table_name = 'VOTER_REG_DOC'
if it returns 'IOT' then that is what you have.
>
Bingo..
SQL> select owner, IOT_TYPE from dba_tables where table_name = 'VOTER_REG_DOC';
OWNER IOT_TYPE
PROD IOTNow that's that sorted; how about the BIN$ item? can I drop this item? How can go on about investigating it?
SQL> r
1* select owner,segment_name,segment_type, TABLESPACE_NAME,bytes/1024/1204 from dba_Segments where tablespace_name='PROD_T3' order
by segment_type
OWNER SEGMENT_NAME SEGMENT_TYPE TABLESPACE_NAME BYTES/1024/1204
PROD SYS_IL0000186869C00026$$ LOBINDEX PROD_T3 .053156146
PROD SYS_LOB0000186869C00026$$ LOBSEGMENT PROD_T3 .053156146
PROD PLAN_TABLE TABLE PROD_T3 .106312292
PROD BIN$IEDOLJmsSj6isKTb5Z2cOQ==$0 TABLE PROD_T3 .053156146Edited by: rsar001 on Mar 19, 2010 1:37 PM
Similar Messages
-
how do i re-organize a tablespace.
For example,
Extent
Tablespace Segment Segment Block size
name Status name type number (blocks)
TASK1 Space allocated for T1 TABLE 9 8
TASK1 Space allocated for T1 TABLE 17 8
TASK1 Free space 25 16
TASK1 Space allocated for T1 TABLE 41 8
how to i move T1 to occupy the first 4 extents?
do i have to use DBMS_ROWID.ROWID_ROW_NUMBER(ROWID) etc?
Edited by: user11298107 on Nov 15, 2009 8:18 PM
Edited by: user11298107 on Nov 15, 2009 8:19 PMALTER TABLE t1 MOVE TABLESPACE task;to move t1 to another extent(s) within the same tablespace.
However, once you move a table, you HAVE to rebuild all indexes on that table.
ALTER INDEX indexname REBUILD TABLESPACE indextablespace;for every indexname on table t1.
Generally, there shouldn't be reason to do this within the same tablespace. You could be moving tables and indexes to new or other tablespaces eg
ALTER TABLE t1 MOVE TABLESPACE other_tbs;
ALTER INDEX indexname REBUILD TABLESPACE other_index_tbs;Hemant K Chitale -
Can segment spread across tablespace?
can segment spread across tablespace?
I guess not cuz segement derive from extent, right?
please elaborate?
thanksA segment is created in a tablespace and can only remain (i.e. allocate extents) within the same tablespace. It cannot span to another tablespace. The extents allocated may be on different datafiles in the same tablespace.
A table with multiple partitions may have each partition in a different tablespace because each partition is a seperate segment. Partitioned indexes also can be managed likewise.
A LOBSEGMENT for a LOB column of a table can be created in a tablespace different from the table itself.
Hemant K Chitale
http://hemantoracledba.blogspot.com -
Creation of the organization within SIM
Hello!
How i can automatically сreate several organizations within SIMs Top?
I can create CSV file with organization parameters (or database table), but i don't know how it is possible to load this file to IDM.
May be there are some instructions how to realize it? Or some practices to perform this?
I am using IDM 8.0
Thanks for your advices!It's difficult to convert CVS to XPRESS xml, because of encrypted parameters within the tags.
For example:
I try to create organization. The XML source of this object contains fields such as:
<ObjectGroup id='#ID#FA16-:EC602865C11:22B63D32-:5365FFED9DFE7765' name='5677EFD9DEFF5635:-23D36B22:11C568206CE:-61B0' displayName='entry_3' creator='Configurator' createDate='1221637646703' lastModifier='Configurator' lastModDate='1221646146984' lastMod='4' primaryObjectClass='ObjectGroup'>Do you know how parameters id and name generates ? May be there is a specification of this structure somewhere?
Edited by: DmitryG on Sep 17, 2008 7:36 AM
Edited by: DmitryG on Sep 17, 2008 7:36 AM -
ORA-01652: unable to extend lob segment . by in tablespace .
Hello.
We have 2 application servers 10.1.2.2. Each have its own infrastrusture.
We run report from form. On one AS report works fine.
On the second AS we get error:
ORA-01652: unable to extend lob segment . by in tablespace .
Exactly the same message with dots.
What do we need to extend? Tablespace of second AS infrastructure? But which tablespace?
Thanks.Maybe the problem is in this procedure (procedure loads data from file system into database):
create or replace PROCEDURE load_document
(P_ID IN document.ID%TYPE
,P_doc_name IN document.name%TYPE
IS
source BFILE := BFILENAME('source_map', p_doc_name);
where_to BLOB;
BEGIN
SELECT file INTO source
FROM document
WHERE id = p_id
FOR UPDATE;
DBMS_LOB.OPEN(source, DBMS_LOB.LOB_READONLY);
DBMS_LOB.OPEN(where_to, DBMS_LOB.LOB_READWRITE);
DBMS_LOB.LOADFROMFILE(where_to, source, dbms_lob.getlength(source));
DBMS_LOB.CLOSE(where_to);
DBMS_LOB.CLOSE(source);
COMMIT;
END;
If we remove this procedure from form, we don't get any error from both application servers.
Why does this code works with one AS and not with the second one?
Thanks. -
Manual segment space managed tablespaces , How tune?
I use Manual segment space managed tablespaces.
How I can tuning for high performance?
What's advantage and disavantage of Manual segment space managed tablespaces and Auto segment space managed tablespaces?
if I used more data.
I'll use Auto or manual?
Please introduce me.ASSM deal with freelist, freelist group(RAC) storage parameters. If you use ASSM you dont need to worry about adjusting freelist and group, oracle will automatically deal with it. If you are using manual storage segment management there would no problem unless you you see heavy buffer busy waits on your tables. You may also play with freelist value for tables which have concurrent inserts and access to avoid buffer busy waits.
From oracle 9i Rel 2 onwards, you have segment level statistics to find out which segments causing more buffer busy waits and tune them accordingly. There are other meaning for buffer busy waits, check v$event_name for buffe busy waits and find out the reason code for the cause of buffer busy waits event.
Jaffar -
Difference Between Rollback Segments and UNDO Tablespace
Hi guys,
Can you tell difference between Rollabck segments and UNDO Tablespaces.
I think that rollback Segemnts and UNDO tablespaces are similar both are used for storing before imags of data, which is going to be modified.
but my question still both the rollback abck segments and UNDO tablespaces exists.
why and what is the reason of both existing and at what time, we can use..them at which scenarios's
Regards,
Pavan Kumar NUndo segments in undo tablespaces, introduced in 9i, are the successor of rollback segments.
They are automatically managed by Oracle.
Rollback segments exist for reasons of backwards compatibility.
That said, you should switch to undo segments and stop using rollback segments.
Other than that: could you please avoid rehearsing the complete documentation in this forum?
Sybrand Bakker
Senior Oracle DBA -
How to move segments from one tablespace to another tablespace?
I have created new tablespace now i want to move the old tablespace segments to new one but how?
Please guide
Thanks,
Waheed.If it is Oracle 10g you might consider expdp and impdp and use remap_tablespace. After that you can purge the objects from the old tablespace.
Throught PL/SQL scripting also it is possible.
tables
declare
cursor cursor1 is select table_name from dba_tables where tablespace_name in ('USERDATA1');
begin
for cur1_rec in cursor1 loop
execute immediate 'alter table '||cur1_rec.table_name||' move tablespace userdata2';
end loop;
end;
indexes
declare
cursor cursor1 is select index_name from dba_indexes where tablespace_name in ('USERDATA1');
begin
for cur1_rec in cursor1 loop
begin
execute immediate 'alter index '||cur1_rec.index_name||' rebuild tablespace userdata2';
exception
when others then
null;
end;
end loop;
end;
/ -
Rollback segments using UNDO Tablespace?
First, I created a database for a vendor with an Undo Tablespace UNDOTBS. Then the vendor requested me to create rollback segments instead. So I created a new tablespace RBSTBS just to hold these segments. When I tried to create the rollback segment using the newly created tablespace RBSTBS, it complained that I am not allowed to use non-system tablespaces.
So instead, I used the Undo tablespace UNDOTBS to hold the rollback segment. It worked.
Am I really allowed to use the UNDO tablespace to hold rollback segments? Can't I use normal tablespaces for rollback segments?
Another thing, the vendor wanted me to create rollback segments of 200MB each. Where do I set this while creating the rollback segment? Is this the INITIAL, NEXT, or OPTIMAL size?
I know that Oracle recommends using UNDO rather than rollback segments. Is there any advantage in using traditional rollback segments?
Thanks for any help!Advantage with rollback segment is you can force your transaction to use any specific rollback segment, where as with undo you don't have any control. Oracle does it for us.
Thanks and Regards,
Satheesh Babu.S
Bangalore. -
Tablespace, Rollback segments and Undo tablespace
hi,
we are frequently getting an error on tablespaces, rollback segments and undo tabelspaces during the ETL load. This was really distrubing us to go further, is there any best practice how to avoid the tablespace errors or any precautions to be taken, we are very new to this ETL loads, pls advice
KishanHello Kishan
Yes. Make tablespaces bigger. However, the proper way to do it is optimizing your queries. If you don't have experience with Oracle DB, consult your DBA.
Hope this helps
Mate -
ORA-30036: unable to extend segment, our UNDO TABLESPACE grow to 500 GB
Our client report that when they run their batch job the error "ORA-30036: unable to extend segment..." came into their log file.
I have checked with alert log but nothing there. We use Oracle 11g on Solaris 10 SPARC.
Any suggestion ?
Thanks & RegardsRefer to
Troubleshooting ORA-30036 - Unable To Extend Undo Tablespace [ID 460481.1]
ORA-30036: unable to extend segment by <N> in undo tablespace '<tname>' [ID 271664.1] -
Unable to extend temp segment in permanent tablespace
Dear all,
I have a tablespace where I have set all the datafiles to autoextend on.. I have enough storage on the file system.. but even then, am getting error :
ORA-1652: unable to extend temp segment by 128 in tablespace EMPTBS
Moreover, this is a permanent tablespace , why it is giving me the error : temp segment ?
Any idea ?
KAIKai,
Pl see if the explanation in ML Doc 19047.1 (OERR: ORA 1652 unable to extend temp segment by %s in tablespace %s) helps
HTH
Srini -
Unable to extend temp segment in diffrent tablespace
Hi
Even no user has default temp tablespace other than 'TEMP'
I sometimes get the following error in alert log.
Any idea?
ORA-1652: unable to extend temp segment by 1280 in tablespace PCSYST_DATA_INXORA-1652: unable to extend temp segment by 1280 in tablespace PCSYST_DATA_INXYou need to increase the size of the present datafile or add another datafile to tablespace PCSYST_DATA_INX
From metalink:-
>
# symptom: ORA-1652 out of space errors in the PERMANENT Tablespace.
# symptom: ORA-01652 : Unable to extend temp segment by %s in tablespace %s
# cause: Some session creates large object but there is not space enough. Object exists as TEMPORARY during creation.
>
Refer to Doc ID: 106717.1 and Doc ID: 19047.1
Anand
Edited by: Anand... on May 13, 2009 3:31 AM -
I have many stacks of multiple photos. Often due to pre-Aperture methods of created various versions for high res, printing, low res,b&w,email,web use, etc.
Is there a way in AP2 to open a stack and arrange it by file size with the largest file being the pick automatically? Or by pixel size or any other metadata for that matter. Thanks.And to be a little more specific, say I have a stack with 20 images. There may be 2 large color TIFF files, three large JPeg files, afew GIFFs and some smaller jpeg files of various sizes. Since Aperture generates lower res and other options from a Master file depending on how I am going to use it, I no longer need all these versions of the same image for different purposes. I like this. I want to trash all the low res versions and only work with the high res image. In the end, I want to compare the two large TIFF files (likely two scans of the same image) and see which is the better image to work with. If I could organize my stacks by file size automatically, this will make quick work of weeding out the, well, weeds I guess. The library is 10,000+. Lots of stacks.
By the way, is there a way to create a smart album with the search criteria "image is in a stack".
Thanks -
I created a lovely site using iWeb, but it is not searchable because it doesn't seem to have meta tags. I need to recreate it in Dreamweaver, but I don't know where iWeb puts the files, in particular graphics and images. Can someone help with this?
iWeb stores all the objects in the domain.sites2 file in
~/Library/Application Support/iWeb/
It's a package. You open it with Right-Click > Show package content.
There are no HTML files inside.
The only HTML files are in the iDisk/Web/Sites/Sitename folder or in the folder you publish to from the filemenu.
Maybe you are looking for
-
Hi Guys, I am trying to do a query that shows all the Invoices and Credit Notes Posted from a specific Date. So far I have come up with this, however It is not returning the correct Information and I need to show the document type as either an Invoic
-
Different pricing for same material in 2 line items
Dear All , In a sales order i have two line items of same material . One with the item category TAN and another REN . line item with TAN is the normal sale item while as second line item is for Return of same materail . . Now i want Different pri
-
How to hide/remove a menu item in Acrobat X
Hi, I have a plugin created in acrobat sdk 9, running on acrobat x. I want to hide/remove the "Manage Trusted Identities" menu item, found under "Sign & certify (panel) > more sign & certify menu." How can i achieve this using javascript? thanks in a
-
Audio not in sync with footage.
I batch captured a tape full of clips only to find that the audio didn't properly sync. Is there a way to adjust the clips all at once to avoid recapturing? Audio is off by about -23 frames or 1 second (shot 24PA). Thanks
-
I rented 2 movies that are on my iPad. In iTunes I can see them under rentals but I can't see them or view them on my iPad. Help, thanks!