Alter index ... rebuild was failing - getting corrupt blocks
Database: 9.2.0.5
OS: HPUX-ia64
Hello,
i rebuilded a index, announced from UpdatStats in DB13, and get a ORA-01114: IO error writing block to file 2045 (block # 319154) and
ORA-27072: skgfdisp: I/O error in my sqlplus session.
-> i do a alter index SAPR3."xxx~0" rebuild online parallel 4 nologging;
-> System was up and running
After that, the DBVerify marked some blocks corrupt, here one example:
BR0398E DBVERIFY detected corrupted blocks in /oracle/XXX/sapdata22/btabi_95/btabi.data95
We checked all corrupted blocks - all in free space.
So we fixed that with creating a table with next extend size from the corrupted blocksize.
I think we had not enough space in the tablespace where the index is, okay ... and what we also found, the PSAPTEMP datafiles was created as SPARSE files ...!!
-> PSAPTEMP-Datafile: 10GB in the System - 2,5GB maximum on OS-Level, no more space.
But my question is why i am getting corrupt blocks when a "alter index ... rebuild ..." is failing ?!?!
Thank you for your support.
Regards,
Markus
Edited by: Markus Dinkel on Oct 9, 2008 12:56 PM
Edited by: Markus Dinkel on Oct 9, 2008 12:56 PM
Edited by: Markus Dinkel on Oct 9, 2008 12:59 PM
Thany you for the answer.
I cant find any "cor" entries in the last DBVeriy log.
I think (hope) we dont' have anymore corrupted blocks in the system.
We get a response from SAP to update to 9.2.0.8.
My customer wanna do a update to oracle 10 in march/april 2009, so he send me the question if we need a update to 9.2.0.8 ASAP or can we wait for the update to oralce10.
But the important question from my customer and me is, why we get corrupt blocks after failing the alter index rebuild?
Regards,
Markus
Similar Messages
-
Hello, I want to rebuild an index :
SQL> alter index APPLSYS.WF_LOCAL_ROLES_N1 REBUILD ;
alter index APPLSYS.WF_LOCAL_ROLES_N1 REBUILD
ERROR at line 1:
ORA-14086: a partitioned index may not be rebuilt as a whole
What is wrong with my sql instruction ? Should I give partition name may be ? Where can I find partition name for that index ? Many thanks before.[linuxas oracle test10]$ oerr ora 14086
14086, 00000, "a partitioned index may not be rebuilt as a whole"
// *Cause: User attempted to rebuild a partitioned index using
// ALTER INDEX REBUILD statement, which is illegal
// *Action: Rebuild the index a partition at a time (using
// ALTER INDEX REBUILD PARTITION) or drop and recreate the
// entire index
[linuxas oracle test10]$To see partition names for an index :
SQL> select partition_name from USER_IND_PARTITIONS
2* where index_name = '<YOUR INDEX>';Paul -
Alter index rebuild calculates statistics?
Hi
Does anyone know if ALTER INDEX REBUILD gathers statistics on the index automatically? Does it do it at a 100% by default?
Thanks for your help!!!On 10g+ the alter index command defaults to compute statistics which to the best o my knowledge is a 100% sample. With lower versions you need to specify that you want statistics: alter index owner.index_name rebuild compute statistics;
HTH -- Mark D Powell -- -
Alter index rebuild reverse duration
Hi,
I'm working on an Oracle Database 11g Release 11.1.0.6.0 - 64bit Production With the Real Application Clusters option.
I would need to rebuild reverse 2 indexes, 60gb each.
Is it possibile to forecast somehow the opreation duration?
The alter index rebuild is locking (insert on those tables are locked), doesn't it?
Thanks in advance,
SamuelYou can rebuild it online, but it will demand extra temporary space, and can take more time.
ALTER INDEX INDX REBUILD ONLINE -
Question on fragmentation and ALTER INDEX REBUILD/REORGANIZE not effecting it
The problem I ran into was troubleshooting a sporadically slow singleton lookup on a Clustered Index in a table with about 8 million rows, which is a separate issue I may need to submit for help. That aside, during that troubleshooting I noticed fragmentation
on the Unique Clustered Index (it's a VARCHAR(20)), and then noticed the fragmentation in other indexes on this table. See sys.dm_db_index_physical_stats and DBCC SHOWCONTIG results below.
SELECT
substring(OBJECT_NAME(i.object_id),1,30) AS TableName,
substring(i.name,1,40) AS TableIndexName,
i.index_id, phystat.index_level,
phystat.avg_fragmentation_in_percent
FROM
sys.dm_db_index_physical_stats(DB_ID(), NULL, NULL, NULL, 'DETAILED') phystat inner JOIN sys.indexes i
ON i.object_id = phystat.object_id
AND i.index_id = phystat.index_id WHERE
OBJECT_NAME(i.object_id) = 'CONSUMERS'
TableName TableIndexName index_id index_level avg_fragmentation_in_percent
CONSUMERS UNI2K_CONSUMERS 1 0
0.154827346202469
CONSUMERS UNI2K_CONSUMERS 1 1
35.2941176470588
CONSUMERS UNI2K_CONSUMERS 1 2
0
CONSUMERS PK__CONSUMER__7F6B0B8B286302EC 2 0 0.336078590685822
CONSUMERS PK__CONSUMER__7F6B0B8B286302EC 2 1 100
CONSUMERS PK__CONSUMER__7F6B0B8B286302EC 2 2 0
CONSUMERS UNI1K_CONSUMERS 3 0
0.156451316031658
CONSUMERS UNI1K_CONSUMERS 3 1
61.1510791366906
CONSUMERS UNI1K_CONSUMERS 3 2
0
CONSUMERS IDX1_CONSUMERS 4 0
0.215271389144434
CONSUMERS IDX1_CONSUMERS 4 1
40
CONSUMERS IDX1_CONSUMERS 4 2
100
CONSUMERS IDX1_CONSUMERS 4 3
0
CONSUMERS IDX2_CONSUMERS 5 0
0.222614710968834
CONSUMERS IDX2_CONSUMERS 5 1
38.6281588447653
CONSUMERS IDX2_CONSUMERS 5 2
75
CONSUMERS IDX2_CONSUMERS 5 3
0
(17 row(s) affected)
DBCC SHOWCONTIG('CONSUMERS') WITH ALL_INDEXES
DBCC SHOWCONTIG scanning 'CONSUMERS' table...
Table: 'CONSUMERS' (645577338); index ID: 1, database ID: 5
TABLE level scan performed.
- Pages Scanned................................: 70401
- Extents Scanned..............................: 8827
- Extent Switches..............................: 8843
- Avg. Pages per Extent........................: 8.0
- Scan Density [Best Count:Actual Count].......: 99.51% [8801:8844]
- Logical Scan Fragmentation ..................: 0.15%
- Extent Scan Fragmentation ...................: 23.76%
- Avg. Bytes Free per Page.....................: 47.2
- Avg. Page Density (full).....................: 99.42%
DBCC SHOWCONTIG scanning 'CONSUMERS' table...
Table: 'CONSUMERS' (645577338); index ID: 2, database ID: 5
LEAF level scan performed.
- Pages Scanned................................: 27077
- Extents Scanned..............................: 3402
- Extent Switches..............................: 3402
- Avg. Pages per Extent........................: 8.0
- Scan Density [Best Count:Actual Count].......: 99.47% [3385:3403]
- Logical Scan Fragmentation ..................: 0.34%
- Extent Scan Fragmentation ...................: 11.88%
- Avg. Bytes Free per Page.....................: 24.1
- Avg. Page Density (full).....................: 99.70%
DBCC SHOWCONTIG scanning 'CONSUMERS' table...
Table: 'CONSUMERS' (645577338); index ID: 3, database ID: 5
LEAF level scan performed.
- Pages Scanned................................: 54330
- Extents Scanned..............................: 6803
- Extent Switches..............................: 6805
- Avg. Pages per Extent........................: 8.0
- Scan Density [Best Count:Actual Count].......: 99.79% [6792:6806]
- Logical Scan Fragmentation ..................: 0.16%
- Extent Scan Fragmentation ...................: 7.03%
- Avg. Bytes Free per Page.....................: 50.3
- Avg. Page Density (full).....................: 99.38%
DBCC SHOWCONTIG scanning 'CONSUMERS' table...
Table: 'CONSUMERS' (645577338); index ID: 4, database ID: 5
LEAF level scan performed.
- Pages Scanned................................: 54350
- Extents Scanned..............................: 6808
- Extent Switches..............................: 6837
- Avg. Pages per Extent........................: 8.0
- Scan Density [Best Count:Actual Count].......: 99.36% [6794:6838]
- Logical Scan Fragmentation ..................: 0.22%
- Extent Scan Fragmentation ...................: 7.17%
- Avg. Bytes Free per Page.....................: 53.2
- Avg. Page Density (full).....................: 99.34%
DBCC SHOWCONTIG scanning 'CONSUMERS' table...
Table: 'CONSUMERS' (645577338); index ID: 5, database ID: 5
LEAF level scan performed.
- Pages Scanned................................: 54354
- Extents Scanned..............................: 6804
- Extent Switches..............................: 6846
- Avg. Pages per Extent........................: 8.0
- Scan Density [Best Count:Actual Count].......: 99.24% [6795:6847]
- Logical Scan Fragmentation ..................: 0.22%
- Extent Scan Fragmentation ...................: 7.13%
- Avg. Bytes Free per Page.....................: 53.8
- Avg. Page Density (full).....................: 99.33%
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
This fragmentation I found shocking because I reorg nightly and have a weekly rebuild task running that I set up through the Maintenance Plan wizard (which I've verified has been running). So I attempted to reorg these manually (especially index ID: 1)
and to my shock the fragmentation % did not change at all. I then took the SQL provided by the Maintenance Plan for rebuilding the indexes and found that after running that it didn't change the fragementation % at all either (commands run shown below).
ALTER INDEX [IDX1_CONSUMERS] ON [dbo].[CONSUMERS] REBUILD PARTITION = ALL WITH ( PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, ONLINE = ON, SORT_IN_TEMPDB = ON )
GO
ALTER INDEX [IDX2_CONSUMERS] ON [dbo].[CONSUMERS] REBUILD PARTITION = ALL WITH ( PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, ONLINE = ON, SORT_IN_TEMPDB = ON )
GO
ALTER INDEX [UNI1K_CONSUMERS] ON [dbo].[CONSUMERS] REBUILD PARTITION = ALL WITH ( PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, IGNORE_DUP_KEY = OFF, ONLINE = ON, SORT_IN_TEMPDB
= ON )
GO
ALTER INDEX [UNI2K_CONSUMERS] ON [dbo].[CONSUMERS] REBUILD PARTITION = ALL WITH ( PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, IGNORE_DUP_KEY = OFF, ONLINE = ON, SORT_IN_TEMPDB
= ON )
GO
Fragmentation did not change until I performed a "CREATE ... DROP_EXISTING = ON" on the 4 non PK indexes and a manual rebuild of Primary Key offline not specifying any other parameters, which all seemed completely overkill to ensure the defragmentation
actually got done. Final sys.dm_db_index_physical_stats and DBCC SHOWCONTIG results below.
SELECT
substring(OBJECT_NAME(i.object_id),1,30) AS TableName,
substring(i.name,1,40) AS TableIndexName,
i.index_id, phystat.index_level,
phystat.avg_fragmentation_in_percent
FROM
sys.dm_db_index_physical_stats(DB_ID(), NULL, NULL, NULL, 'DETAILED') phystat inner JOIN sys.indexes i
ON i.object_id = phystat.object_id
AND i.index_id = phystat.index_id WHERE
OBJECT_NAME(i.object_id) = 'CONSUMERS'
TableName TableIndexName index_id index_level avg_fragmentation_in_percent
CONSUMERS UNI2K_CONSUMERS 1 0
0.0213458562356583
CONSUMERS UNI2K_CONSUMERS 1 1
11.2426035502959
CONSUMERS UNI2K_CONSUMERS 1 2
0
CONSUMERS PK__CONSUMER__7F6B0B8B286302EC 2 0 0.0460971112476951
CONSUMERS PK__CONSUMER__7F6B0B8B286302EC 2 1 14.2857142857143
CONSUMERS PK__CONSUMER__7F6B0B8B286302EC 2 2 0
CONSUMERS UNI1K_CONSUMERS 3 0
0.0225314031431307
CONSUMERS UNI1K_CONSUMERS 3 1
10.6194690265487
CONSUMERS UNI1K_CONSUMERS 3 2
0
CONSUMERS IDX1_CONSUMERS 4 0
0.0225318262045139
CONSUMERS IDX1_CONSUMERS 4 1
10.7296137339056
CONSUMERS IDX1_CONSUMERS 4 2
0
CONSUMERS IDX1_CONSUMERS 4 3
0
CONSUMERS IDX2_CONSUMERS 5 0
0.0225314031431307
CONSUMERS IDX2_CONSUMERS 5 1
12.0171673819742
CONSUMERS IDX2_CONSUMERS 5 2
0
CONSUMERS IDX2_CONSUMERS 5 3
0
(17 row(s) affected)
DBCC SHOWCONTIG('CONSUMERS') WITH ALL_INDEXES
DBCC SHOWCONTIG scanning 'CONSUMERS' table...
Table: 'CONSUMERS' (645577338); index ID: 1, database ID: 5
TABLE level scan performed.
- Pages Scanned................................: 56217
- Extents Scanned..............................: 7029
- Extent Switches..............................: 7028
- Avg. Pages per Extent........................: 8.0
- Scan Density [Best Count:Actual Count].......: 99.99% [7028:7029]
- Logical Scan Fragmentation ..................: 0.02%
- Extent Scan Fragmentation ...................: 0.44%
- Avg. Bytes Free per Page.....................: 32.4
- Avg. Page Density (full).....................: 99.60%
DBCC SHOWCONTIG scanning 'CONSUMERS' table...
Table: 'CONSUMERS' (645577338); index ID: 2, database ID: 5
LEAF level scan performed.
- Pages Scanned................................: 26032
- Extents Scanned..............................: 3256
- Extent Switches..............................: 3255
- Avg. Pages per Extent........................: 8.0
- Scan Density [Best Count:Actual Count].......: 99.94% [3254:3256]
- Logical Scan Fragmentation ..................: 0.05%
- Extent Scan Fragmentation ...................: 0.31%
- Avg. Bytes Free per Page.....................: 11.1
- Avg. Page Density (full).....................: 99.86%
DBCC SHOWCONTIG scanning 'CONSUMERS' table...
Table: 'CONSUMERS' (645577338); index ID: 3, database ID: 5
LEAF level scan performed.
- Pages Scanned................................: 53259
- Extents Scanned..............................: 6659
- Extent Switches..............................: 6658
- Avg. Pages per Extent........................: 8.0
- Scan Density [Best Count:Actual Count].......: 99.98% [6658:6659]
- Logical Scan Fragmentation ..................: 0.02%
- Extent Scan Fragmentation ...................: 0.35%
- Avg. Bytes Free per Page.....................: 40.5
- Avg. Page Density (full).....................: 99.50%
DBCC SHOWCONTIG scanning 'CONSUMERS' table...
Table: 'CONSUMERS' (645577338); index ID: 4, database ID: 5
LEAF level scan performed.
- Pages Scanned................................: 53258
- Extents Scanned..............................: 6659
- Extent Switches..............................: 6658
- Avg. Pages per Extent........................: 8.0
- Scan Density [Best Count:Actual Count].......: 99.98% [6658:6659]
- Logical Scan Fragmentation ..................: 0.02%
- Extent Scan Fragmentation ...................: 0.53%
- Avg. Bytes Free per Page.....................: 40.3
- Avg. Page Density (full).....................: 99.50%
DBCC SHOWCONTIG scanning 'CONSUMERS' table...
Table: 'CONSUMERS' (645577338); index ID: 5, database ID: 5
LEAF level scan performed.
- Pages Scanned................................: 53259
- Extents Scanned..............................: 6659
- Extent Switches..............................: 6658
- Avg. Pages per Extent........................: 8.0
- Scan Density [Best Count:Actual Count].......: 99.98% [6658:6659]
- Logical Scan Fragmentation ..................: 0.02%
- Extent Scan Fragmentation ...................: 0.59%
- Avg. Bytes Free per Page.....................: 40.5
- Avg. Page Density (full).....................: 99.50%
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
For the record, here's the version I'm running:
select @@VERSION
Microsoft SQL Server 2008 R2 (SP1) - 10.50.2500.0 (X64)
Jun 17 2011 00:54:03
Copyright (c) Microsoft Corporation
Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)
In summary my question is - why didn't ALTER INDEX ... REBUILD/REORGANIZE modify the index_level 1 fragmentation as reported by sys.dm_db_index_physical_stats, nor would it correct the Extent Scan Fragmentation as reported by DBCC SHOWCONTIG?Hi Brian.cs ,
SQL Server will not rebuild indexes that are not large enough. Could you please have a look a the
fragment_count which is one of the fields in the
sys.dm_db_index_physical_stats view to check whether it is low or not ?
Best Regards,
Peja
Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Peja, here's the information you requested, and of course this was after I dropped/recreated because rebuild didn't seem to actually address the fragmentation - the index I was most concerned about at index_level = 0 showed a fragment_count = 8922. FYI this
table has over 8 million rows. And apologies for the delayed response, was on vacation over the near year.
SELECT
substring(OBJECT_NAME(i.object_id),1,30) AS TableName,
substring(i.name,1,40) AS TableIndexName,
i.index_id, phystat.index_level,
phystat.avg_fragmentation_in_percent, fragment_count
FROM
sys.dm_db_index_physical_stats(DB_ID(), NULL, NULL, NULL, 'DETAILED') phystat inner JOIN sys.indexes i
ON i.object_id = phystat.object_id
AND i.index_id = phystat.index_id WHERE
OBJECT_NAME(i.object_id) = 'CONSUMERS'
TableName TableIndexName index_id index_level avg_fragmentation_in_percent
fragment_count
CONSUMERS UNI2K_CONSUMERS 1 0
0.259780818806428 8922
CONSUMERS UNI2K_CONSUMERS 1 1
39.4190871369295 86
CONSUMERS UNI2K_CONSUMERS 1 2
0 1
CONSUMERS PK__CONSUMER__7F6B0B8B286302EC 2 0 0.240887634434766
5182
CONSUMERS PK__CONSUMER__7F6B0B8B286302EC 2 1 80.3738317757009
84
CONSUMERS PK__CONSUMER__7F6B0B8B286302EC 2 2 0
1
CONSUMERS UNI1K_CONSUMERS 3 0
0.0661472879611936 8532
CONSUMERS UNI1K_CONSUMERS 3 1
53.4883720930233 86
CONSUMERS UNI1K_CONSUMERS 3 2
0 1
CONSUMERS IDX1_CONSUMERS 4 0
0.192426334498663 8598
CONSUMERS IDX1_CONSUMERS 4 1
31.5315315315315 95
CONSUMERS IDX1_CONSUMERS 4 2
85.7142857142857 7
CONSUMERS IDX1_CONSUMERS 4 3
0 1
CONSUMERS IDX2_CONSUMERS 5 0
0.189494094835184 8613
CONSUMERS IDX2_CONSUMERS 5 1
31.8840579710145 97
CONSUMERS IDX2_CONSUMERS 5 2
85.7142857142857 7
CONSUMERS IDX2_CONSUMERS 5 3
0 1 -
Alter index rebuild with online option
I created a spatial index with the following statement:
SQL> create index A3_IX1_A on A67(GEOMETRIE) indextype is mdsys.spatial_index parameters ('sdo_non_leaf_tbl=TRUE; sdo_dml_batch_size =
2 1000');
I want to rebuild the index with the next statement:
SQL> alter index ttnl.A3_IX1_A rebuild online parameters ('index_status=cleanup;sdo_dml_batch_size=1000');
the result is the next error message:
alter index ttnl.A3_IX1_A rebuild online parameters ('index_status=cleanup;sdo_dml_batch_size=1000')
ERROR at line 1:
ORA-29871: invalid alter option for a domain index
Can some one help me?Hi,
This is only supported in the next release (11.x).
In the release upto 10.2, this functionality is not supported for Spatial indexes.
siva
Message was edited by:
sravada -
Hello experts,
I have a simple question regarding rebuilding indexes...
First, I am running 11.2.0.2 on Solaris 10.
My reason for rebuilding is to relocate the indexes to their own tablespace, and while I recognize this is a subjective reason as far as performance is concerned, it makes administration easier.
That being said, my question is in regards to use of "compute statistics" and also "online", and "nologging".
Since I do want to minimize he impact to our users, and this table is one of the most used tables in the database, my syntax was going to be as follows:
alter index <schema>.<index> rebuild online nologging tablespace <ts_idx> compute statistics;
Questions:
1. does doing the rebuild online preclude queries against the table during the duration of the rebuild?
2. does use of nologging improve speed of rebuilding
3. is it advisable to include the "compute statistics". I believe I read on Jonathan Lewis' page that statistics are gathered automatically and to include "compute statistics" was not necessary when rebuilding an index.
And I guess one final question is whether I can include all the options in the same rebuild statement as I have shown above?
I've tested the above in our test database, but it seems to hang when using the online option (with all the other options).
Thanks in advance.Excellent resource. Thanks for the link. While I've read most of those discussions on either Jonathan's or Richard's web sites already, it is a good presentation and reference.
Unfortunately, it does not answer either of the questions that I asked. The reason I asked those questions is because the answers you gave contradict what i read in Oracle documentation (although it might be version specific).
Also, it does seem to be slightly faster to rebuild using nologging (in my test environment).
I've tested this with multiple indexes and the timing is slightly improved consistently.
{quote}
SQL> ALTER INDEX ARADMIN."T2179_C1_0944_1037" REBUILD LOGGING TABLESPACE REMEDY_IDX;
Index altered.
Elapsed: 00:00:10.68
SQL> ALTER INDEX ARADMIN."T2179_C1_0944_1037" REBUILD nologging TABLESPACE REMEDY_IDX;
Index altered.
Elapsed: 00:00:08.50
{quote}
The use of online, however, seems to "hang" for some reason, even in my test database while no one else is logged into the database except me.
Referencing Oracle's documentation, it says that rebuilding an index online does not allow queries against the base table. This is why I asked this question, but your answer is different than Oracle's. In this case, however, it is for Oracle 10.2, so not sure if this is still true for 11.2.
Ref. Oracle Text SQL Statements and Operators
[ONLINE]
ONLINE enables you to continue to perform updates, inserts, and deletes on a base table; it does not enable you to query the base table.
You cannot use PARALLEL with ONLINE. ONLINE is only supported for CONTEXT indexes.
Now, regarding the use of "compute statistics", I am pretty sure I recall reading either in Jonathan's papers, or in Richard's papers, that this is not necessary and/or is redundant. But then why would Oracle include this as an option. This is counter intuitive, which again is why I'm asking. Do you know if any reference that can clear this up? -
'alter index rebuild' paralellism problem
Hi,
I have this problem described in example. I am using interMedia Text version 8.1.7 on Win32 platform ,
Imagine two tables with the same structure, but in first there are big pdf files(size more than 1MB, lot of files) and in the second there are small files(less than 10KB, imagine few files).
There are same preferences used for indexing( file_datastore, inso_filter..).
If I run the alter index for first table, it usually takes long time. Than if I run the alter index for the second table, it always begin after the first will finish.
Other combination work correctly :
Running create index for first table and create index for second is done paralelly, runnig combination of create index and alter index (no matter for which table) is done paralelly too.
The only problem is with runnig two alter indexes at the same time.
The problem is about to index around 100 GB of documents by small steps - documents are added and indexed using alter index. Using create index is not possible, because whole system is backed up and switched off during night.
So indexing process is interrupted.
Thanks for every reply..
MilanPlease put your question in the Oracel text forumn for a quicker, more expert answer.
-
ALTER INDEX .. REORGANIZE vs.REBUILD
What is the difference between ALTER INDEX .. REORGANIZE and ALTER INDEX .. REBUILD ?
Thanks, Christine & DannyAre you talking about Oracle here?
There is no REORGANIZE with ALTER INDEX. Its valid command for SQLServer.
If you are talking about SqlServer here, then, read the article from the below link:
http://msdn2.microsoft.com/en-us/library/ms189858.aspx
If you are concerned about Oracle's ALTER INDEX REBUILD, read my blog about functionality/machanism of rebuilding index online and normally, Part 1 and Part 2.
http://jaffardba.blogspot.com/search/label/Indexes -
Hi Team,
Please tell me any difference b/w alter index <index> rebuild or alter index <index> rebuild move.
Is there any difference that more space will be released if I move index to diffrenet tablespace and move move back to orginal tablespace.
I know that if we use move option we can move index to different tablespace,
Regards,
jitEven if you would do lots of dml's, that's not certainly means that you need the rebuilding of the index. If your assertion is based on this that there would be some "holes" within the leaf blocks which wont be reused and would require a rebuild, it's wrong then since Oracle would take care of these things on its own. So again, what criteria, other than an OLTP db you used to conclude that you need rebuilding of indexes?
But I just wanted to know If I go for alter index rebuild or alter index rebuild move and move back the indexes, which option will be best for me mean by which option I can reclaim more space.Well, I am sorry to say but I think you really don't know very well both the commands. The commands don't differ in the space reclaim given by them but in the way they do the rebuild. Please read the documentation to know what both commands do and how? BTW, from where you picked the command alter index rebuild move since I am not sure that such command exists?
Aman.... -
Index rebuild - temporary segment
Hi,
I am getting an error while rebuilding the indexes, like unable to allocate extents in temporary segment. Kindly help me to solve this.
Regards,
Mathew CollinsYou should never drop an index with the intention of recreating it without first checking the size of the index against the size of the available temp tablespace sort area.
If you are using an alter index rebuild to reorganize the index then unless you specify a new tablespace in the command the existing tablespace must have enough free space to hold the entire original index and the rebuilt index. An alter index rebuild also uses temporary (sort) tablespace so you still need to ensure that your index has not outgrown your temp tablespace.
HTH -- Mark D Powell -- -
Hi,
on 10g R2, Win server 2003, I have this error :
Corrupt Block Found
TSN = 2, TSNAME = SYSAUX
RFN = 3, BLK = 36473, RDBA = 12619385
OBJN = 150506, OBJD = 150506, OBJECT = MGMT_METRICS_RAW_PK, SUBOBJECT =
SEGMENT OWNER = SYSMAN, SEGMENT TYPE = Index SegmentHow to identify this corrupted block ?
How to remedy ?
Thank you.There're many solutions to resolve block corruption. One of them is by using DBMS_REPAIR
Look at this link http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/repair.htm#i1006090
Kamran Agayev A. (10g OCP)
http://kamranagayev.wordpress.com -
I am getting following error when index rebuild
SQL> ALTER INDEX VECTORMAPLIN_IXS REBUILD;
ALTER INDEX VECTORMAPLIN_IXS REBUILD
ERROR at line 1:
ORA-14086: a partitioned index may not be rebuilt as a whole
i have given alter index VECTORMAPLIN_IXS REBUILD partition;
but i am getting error
plseas suggest how to proceedVECTORMAPARE_IXS P0
VECTORMAPARE_IXS P1
VECTORMAPARE_IXS P2
VECTORMAPARE_IXS P3
VECTORMAPARE_IXS P4
VECTORMAPARE_IXS P5
INDEX_NAME PARTI
VECTORMAPARE_IXS P6
VECTORMAPARE_IXS P7
VECTORMAPARE_IXS P8
VECTORMAPARE_IXS P9
VECTORMAPARE_IXS P10
VECTORMAPARE_IXS P11
VECTORMAPARE_IXS P12
VECTORMAPARE_IXS P13
VECTORMAPARE_IXS P14
VECTORMAPARE_IXS P15
VECTORMAPARE_IXS P16
INDEX_NAME PARTI
VECTORMAPTXT_IXS P0
VECTORMAPTXT_IXS P1
VECTORMAPTXT_IXS P2
VECTORMAPTXT_IXS P3
VECTORMAPTXT_IXS P4
VECTORMAPTXT_IXS P5
VECTORMAPTXT_IXS P6
VECTORMAPTXT_IXS P7
VECTORMAPTXT_IXS P8
VECTORMAPTXT_IXS P9
VECTORMAPTXT_IXS P10
INDEX_NAME PARTI
VECTORMAPTXT_IXS P11
VECTORMAPTXT_IXS P12
VECTORMAPTXT_IXS P13
VECTORMAPTXT_IXS P14
VECTORMAPTXT_IXS P15
VECTORMAPTXT_IXS P16
VECTORMAPPNT_IXS P0
VECTORMAPPNT_IXS P1
VECTORMAPPNT_IXS P2
VECTORMAPPNT_IXS P3
VECTORMAPPNT_IXS P4
INDEX_NAME PARTI
VECTORMAPPNT_IXS P5
VECTORMAPPNT_IXS P6
VECTORMAPPNT_IXS P7
VECTORMAPPNT_IXS P8
VECTORMAPPNT_IXS P9
VECTORMAPPNT_IXS P10
VECTORMAPPNT_IXS P11
VECTORMAPPNT_IXS P12
VECTORMAPPNT_IXS P13
VECTORMAPPNT_IXS P14
VECTORMAPPNT_IXS P15
INDEX_NAME PARTI
VECTORMAPPNT_IXS P16
VECTORMAPROA_IXS P0
VECTORMAPROA_IXS P1
VECTORMAPROA_IXS P2
VECTORMAPROA_IXS P3
VECTORMAPROA_IXS P4
VECTORMAPROA_IXS P5
VECTORMAPROA_IXS P6
VECTORMAPROA_IXS P7
VECTORMAPROA_IXS P8
VECTORMAPROA_IXS P9
INDEX_NAME PARTI
VECTORMAPROA_IXS P10
VECTORMAPROA_IXS P11
VECTORMAPROA_IXS P12
VECTORMAPROA_IXS P13
VECTORMAPROA_IXS P14
VECTORMAPROA_IXS P15
VECTORMAPROA_IXS P16
VECTORMAPLIN_IXS P0
VECTORMAPLIN_IXS P1
VECTORMAPLIN_IXS P2
VECTORMAPLIN_IXS P3
INDEX_NAME PARTI
VECTORMAPLIN_IXS P4
VECTORMAPLIN_IXS P5
VECTORMAPLIN_IXS P6
VECTORMAPLIN_IXS P7
VECTORMAPLIN_IXS P8
VECTORMAPLIN_IXS P9
VECTORMAPLIN_IXS P10
VECTORMAPLIN_IXS P11
VECTORMAPLIN_IXS P12
VECTORMAPLIN_IXS P13
VECTORMAPLIN_IXS P14
INDEX_NAME PARTI
VECTORMAPLIN_IXS P15
VECTORMAPLIN_IXS P16
i am getting as follows
INDEX_NAME INDEX_TYPE
TABLE_NAME
VECTORMAPLIN_IXS DOMAIN
VECTORMAPLINE
VECTORMAPROA_IXS DOMAIN
VECTORMAPROADCLINE
VECTORMAPPNT_IXS DOMAIN
VECTORMAPPOINT
INDEX_NAME INDEX_TYPE
TABLE_NAME
VECTORMAPTXT_IXS DOMAIN
VECTORMAPTEXT
VECTORMAPARE_IXS DOMAIN
VECTORMAPAREA
VML_MASK_SID DOMAIN
OSVECTORMAPLOCALM
thase are the outputs
which shows above
my requirement is to build only 6 indexes
so
ALTER INDEX TEST_IDX REBUILD PARTITION INDX_2012 ONLINE COMPUTE STATISTICS
do ii need to give partion name or shall i give indx_2012
please let me know
thanks for help -
I am trying to download Firefox 3.6 to use on my Mac OS X version 10.3.9. Three attempts and I continue to get "mounting failed" and "corrupt image". Help please?
Firefox 3.6 requires at least OS X 10.4, the last version of Firefox that worked on OS X 10.3.9 was Firefox 2.0.0.20 which is available from ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/2.0.0.20/mac/
-
Envelope or Indexing keeps getting corrupt even after mutliple imports
Similar to the Mail has Gone Nuts post, the indexing for Mac Mail 2.1 on Tiger 10.4.10 keeps getting corrupt although I am not using a .mac account which is what most of that particular post is centered on. I say corrupt as my inbox will say it has several hundred messages but will only show a few messages. I am trying to clean the mailbox up by moving email, deleting, etc. After awhile I cannot move messages out of the inbox to another folder - even when I try to move one email. I can create a new mailbox for archiving but I still cannot move. I ran the disk permission utility to make sure it was not a permission error. After a bit all the mail in the inbox disappears. I delete the envelope file, import to create a new one, and everything is fine for awhile. Then same cycle. Is anyone seeing the same issue or have any clues as to how to fix?
I got on the phone with Apple. We created a test user account and established an identical mailbox with our ISP. The email was downloaded and then it disappeared again when I clicked on the sent email box. Nothing else was loaded. So I was told it was an OSX issue. Reloaded that and mail seems to work now. Have a few other issues now but making some progress.
Maybe you are looking for
-
OS command working but file not moved
HI All, I am facing an issue with receiver File adapter OS command. OS command will move file from folder A to B and after remove It was working previously fine.But now it is not moving file. In CC logs it is showing as successfull ececution of OS co
-
Installing microsoft system on mac pro problem
i install to point where it burns disk and then comes to stext saying hit enter to continue. i can get no keyboad actions. help.
-
All the time slips in the working environment, how to fix this error?
All the time slips in the working environment, how to fix this error?
-
Adobe Premier Editing for a Class of High School Students
I am a high school film teacher, and would like to get Creative Cloud with Adobe Premiere on four computers at school as well as about four of my students' personal computers. Is there aneducators' student discount for that? What would be the best w
-
Esqueci minha senha desbloqueio ipod
como faço para desbloquear o ipod se eu esqueci a senha ?