Dropping index gives ORA-29861
Hello
We have an application which reads data from MapInfo Spatialware using MapInfo Professional and upload this data into Oracle Spatial tables using MapInfo Easy Loader utility.
The constraint is that tables in oracle spatial must not be dropped. So we have written a stored procedure which queries unique and spatial indexes of a feature table, then it drops them and truncates the table.
Easy loader then uploads fresh data into these truncated tables and re creates spatial and unique indexes.
This solution is working fine except for 1 feature table "ZONE". The stored procedure is unable to drop the indexes and error log shows error "ORA-29861: domain index is marked LOADING/FAILED/UNUSABLE".
I looked into discussion forums and they say to drop the indexes specifying keyword "FORCE" but how can i query whether index is corrupt and i must force drop it. Index state is all VALID which i check them...
below is the stored procedure....
CREATE OR REPLACE
PROCEDURE Spa_Initializetables
( TNAME IN VARCHAR2,
SPATIALCOL IN VARCHAR2,
ERROR_CODE OUT NUMBER,
ERROR_MESSAGE OUT VARCHAR2
IS
CURSOR c1 IS
SELECT * FROM user_sdo_index_info WHERE table_name LIKE UPPER(TNAME) AND column_name LIKE UPPER(SPATIALCOL);
BEGIN
--Truncate the given table
EXECUTE IMMEDIATE 'TRUNCATE TABLE ' || TNAME;
--Loop through all the indexes found and drop them one by one
FOR cur_ts IN c1 LOOP
--DBMS_OUTPUT.PUT_LINE(cur_ts.index_name);
EXECUTE IMMEDIATE 'DROP INDEX '|| cur_ts.index_name;
END LOOP;
ERROR_CODE := 0;
EXCEPTION
WHEN OTHERS THEN
ERROR_CODE := 1;
ERROR_MESSAGE := SQLERRM;
END Spa_Initializetables;
please let me know what best i can do
Regards
Sam
Sorry, but I can't simulate this troulbe. look:
create table a (id number, lmao mdsys.sdo_geometry)
INSERT INTO mdsys.sdo_geom_metadata_table (SDO_OWNER,SDO_TABLE_NAME,SDO_COLUMN_NAME,SDO_DIMINFO,SDO_SRID)
VALUES ('GIS','A','LMAO',SDO_DIM_ARRAY(
SDO_DIM_ELEMENT('X', -180,180, 5e-4),
SDO_DIM_ELEMENT('Y', -180,180, 5e-4)), NULL);
create index a_g_idx on a(lmao) indextype is mdsys.spatial_index;
insert into a values (1,SDO_geometry(2003,NULL,NULL,SDO_elem_info_array(1,1003,3),SDO_ordinate_array(1,1, 2,2)));
commit;
truncate table a;
insert into a values (2,SDO_geometry(2003,NULL,NULL,SDO_elem_info_array(1,1003,3),SDO_ordinate_array(1,1, 2,2)));
drop table a;
No errors :(
I have 10.2.0.3
May be i didn't understood you ?
Similar Messages
-
EXCEPTION: ORA-29861: domain index is marked LOADING/FAILED/UNUSABLE
Hello,
I'm getting the exception when I go to run the following update statement (via PreparedStatement using JDBC):
UPDATE my_table SET my_column_1 = ? WHERE my_column_ID = ?
I searched google and couldn't determine the proper fix for this:
http://ora-29861.ora-code.com/
What I do know from SQL Developer:
my_table has several indexes of which all have a status of "valid"
my_column_ID has an index on it. the column type for this column is NUMBER(10,0)
my_column_1 is a VARCHAR2(40 BYTE)
So I'm uncertain where to go from here and any help would be great.
Thanks,
Jim
Edited by: Jim Atharris on Jun 3, 2009 4:54 PMI guess its a problem with the index on my_table. I guess you can first drop the specific index using my_column_id and then try updating the table. After your updates are successful, you can create the index again. I may not be right, but just trying my hand.
-
Party Merge ORA-29861: domain index is marked LOADING/FAILED/UNUSABLE
Hi gurus,
i am using 11.5.10.2 on linux.
while running the party merge concurrent program , we are getting below error, please help.
Errors in Merge :
Application: Receivables_
Error: Merge failed in Receivables (HZ_STAGED_PARTY_SITES ) with the following error message:
This unexpected SQL error occurred during the merge process :
ORA-29861: domain index is marked LOADING/FAILED/UNUSABLE
The following record was being handled when the error occurred :
Thanks
RBThanks Hussain, this is similer to the error i got, i will run the steps and get back to you, once again thanks for your prompt responce.
Thx
RB
Edited by: R12DBA on Jul 23, 2010 4:36 PM
Edited by: R12DBA on Jul 23, 2010 4:50 PM -
ORA-29861 Error while editing or adding search keywords in a File Item
Hi,
We are getting the following error while editing or adding search keywords to a file item:
ORA-29861: domain index is marked LOADING/FAILED/UNUSABLE
DAD name: portal30 PROCEDURE : PORTAL30.wwv_edit_tab.edititem
Can you please tell us what went wrong.
ThanksVikas,
From the server error messages reference:
Cause: An attempt has been made to access a domain index that is being built or is marked failed by an unsuccessful ODCIIndexCreate or is marked unusable by a DDL operation.
Action: Wait if the specified index is marked LOADING Drop the specified index if it is marked FAILED Drop or rebuild the specified index if it is marked UNUSABLE.
It's possible you were loading the document while the index was being rebuilt. Search all_indexes where DOMIDX_STATUS <> 'VALID' OR DOMIDX_OPSTATUS <> 'VALID' to find the offending index and rebuild it.
Regards,
Jerry
null -
Dropping Index taking too much time
Hi, I am trying to drop an index. Its not yet finished... why its taking too much time to drop?
Please put your suggestions..
RgdsSQL> drop index QS_TEXT_MST_IXCON force;its taking too much time ... after 2 hours i terminated the session.
When i check that index status ...
SQL> select index_name,status,DOMIDX_OPSTATUS,DOMIDX_STATUS from user_indexes where table_name='QS_TEXT_MST';
INDEX_NAME STATUS DOMIDX DOMIDX_STATU
QS_TEXT_MST_IXCON VALID FAILED VALID
QS_TEXT_MST_PK VALID
SQL> create index MAMPROD.QS_TEXT_MST_IXCON on MAMPROD.QS_TEXT_MST(UPD_FLG) indextype is ctxsys.context
parameters(' datastore QS_TEXT_MST_IXCON_DST'); 2
create index MAMPROD.QS_TEXT_MST_IXCON on MAMPROD.QS_TEXT_MST(UPD_FLG) indextype is ctxsys.context
ERROR at line 1:
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-20000: Oracle Text error:
DRG-10507: duplicate index name: QS_TEXT_MST_IXCON
ORA-06512: at "CTXSYS.DRUE", line 160
ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 364wot to do? -
Hi,
As David A. King suggested, HypersonicSQL requires the following syntax:
DROP INDEX table.index
Is the update of HSQLDictionary already scheduled/done?
Regards --LOTLINE is the table name?
It appears to be version-disabled since it's state is DV..
See:
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14253/long_views.htm#ADWSM03060
and perhaps querying ALL_WM_VT_ERRORS will give you more clues. -
Hi, ladies and gentlemen!
I have used oracle database 11.1.06 + WebLogice Server 10.3.0 + Agile PLM 9.3 to setup a product management system, but i can't upload attachments! It told me it was an error ORA-29861 there.
Who can tell me how to resolve this problem?
PS: I am a noob in this applification field.Hi, below is the error tips i met.
ORA-29861: domain index is marked LOADING/FAILED/UNUSABLE
java.sql.SQLException: ORA-29861: domain index is marked LOADING/FAILED/UNUSABLE
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
:125)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.
java:185)
at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedS
tatement.java:633)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStateme
nt.java:1086)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePrep
aredStatement.java:2984)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStat
ement.java:3076)
at weblogic.jdbc.wrapper.PreparedStatement.execute(PreparedStatement.jav
a:98)
at com.agile.pc.cmserver.attachment.AttachmentDAO.appendFileRow(Attachme
ntDAO.java:258)
at com.agile.pc.cmserver.attachment.AttachmentServiceFiles.saveAdd(Attac
hmentServiceFiles.java:548)
at com.agile.pc.cmserver.attachment.AttachmentServiceFiles.saveRow(Attac
hmentServiceFiles.java:608)
at com.agile.pc.cmserver.attachment.AttachmentService.addFile(Attachment
Service.java:2111)
at com.agile.pc.cmserver.base.BaseServiceAttachment.addFile(BaseServiceA
ttachment.java:896)
at com.agile.pc.cmserver.base.BaseService.addFile(BaseService.java:4424)
at com.agile.pc.cmserver.base.BaseService.addFiles(BaseService.java:4501
at com.agile.pc.cmserver.base.CMSessionBean.addFiles(CMSessionBean.java:
3842)
at com.agile.pc.cmserver.item.ItemSessionBean_v9sfth_EOImpl.addFiles(Ite
mSessionBean_v9sfth_EOImpl.java:9611)
at com.agile.ipa.pc.CMObjectBase.wCmaddFiles(CMObjectBase.java:4460)
at com.agile.ui.pcm.common.ObjectViewHandler.uploadFileAttachments(Objec
tViewHandler.java:13480)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.agile.ui.web.action.ActionServlet.invokeMethod(ActionServlet.java
:1062)
at com.agile.ui.web.action.ActionServlet.handleRequest(ActionServlet.jav
a:667)
at com.agile.ui.web.action.ActionServlet.doPost(ActionServlet.java:309)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run
(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecuri
tyHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
a:292)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
va:42)
at com.agile.ui.pcm.common.filter.RemoteFSRequestFilter.doFilter(RemoteF
SRequestFilter.java:143)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
va:42)
at com.agile.ui.web.filter.LoggingFilter.doFilter(LoggingFilter.java:108
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
va:42)
at com.agile.ui.pcm.common.filter.WebClientLog.doFilter(WebClientLog.jav
a:78)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
va:42)
at com.jspbook.GZIPFilter.doFilter(GZIPFilter.java:21)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
va:42)
at com.agile.ui.pcm.common.filter.SSOTicketFilter.doFilter(SSOTicketFilt
er.java:84)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
va:42)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
n.run(WebAppServletContext.java:3496)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppS
ervletContext.java:2180)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletC
ontext.java:2086)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.j
ava:1406)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173) -
What is the lock machanisim when we drop the index in oracle?
Let us say, i am dropping index, while dropping index, another process writing the data in index segment. In this scenario, drop index will wait for another process to complete? Please let me know.I am using oracle11g.
I opened two sessions and run insert statement in one sesson. In another session, dropped the index. Drop index was waiting to complete the insert process in another session. Hence, drop index will throw error ORA-0054.
Drop index will wait. -
9.0.1: select on dba_users as sys gives ORA-03106
Hi,
Select username from dba_users logged as sys gives
ORA-03106: fatal two-task communication protocal error.
Install done from zipped OTN files, server 9.0.1, OS Linux SuSe 7.2. Character set UTF8. Is UTF8 incompatible with 9i?
Any treatment ideas are greatly appreciated.
Thanks
Anatoliy Smirnovresolved
thanks -
How to include Drop index in PL/SQL
Hi,
In my PL/SQL, I put a drop index statement in between, but it gave me an error of
"PLS-00103: Encountered the symbol "DROP" when expecting one of the following:
begin declare exit for goto if loop mod null pragma raise
return select update while <an identifier>
<a double-q"
My statement is structured as:
DECLARE
BEGIN
DROP INDEX index_name;
COMMIT;
END;
Why is this error occuring? When I execute the drop index statement seperately it is ok. When i put it in the PL/SQL it gave me error.
Do I need special syntax to include a Drop index statement in a PL/SQL?
ThanksAny DDL commands in PL/SQL must be executed using dynamic SQL:
execute immediate 'drop index index_name'; -
Publish: dropping index when it is used for foreign key constraint enforcement
Hi,
I'm trying to update a target schema from a reference database via Publish. Among the changes to apply, there's an index that needs to be dropped. Since it's linked to a foreign key constraint, it cannot be deleted unless the foreign key is temporarily dropped
(I saw somewhere that disabling the foreign key should be enough but it doesn't seem to work either).
Since there are other changes to be made on the same table, this foreign key also has to be dropped before the script can delete the table and re-create it. This part of the script is correctly generated. The problem is that this part appears after the 'DROP
INDEX' instruction.
So when generating the update script, SSDT tries to drop the index BEFORE dropping the foreign key. And I can't drop the foreign key in my custom pre-deployment script, otherwise the update script would fail when trying to delete it again.
Shouldn't SSDT be smart enough to drop the constraint before the index? Is it a bug or did I forget to set an option? If it's not a bug, what can I do apart from doing it manually?
Thank you for your helpHi Elsa,
That sounds like a bug. Could you please file a Connect issue for this at
https://connect.microsoft.com/SQLServer/feedback/CreateFeedback.aspx using the category "Developer Tools (SSDT, BIDS, etc.)"? We're trying to track all bugs through
Connect so that you can tell when we have fixed the issue and we can request more information.
A workaround for this issue might be to write a pre-deployment script for your project to drop the foreign key prior to deployment. A pre-deployment script can be added to your project by right-clicking on the
project in solution explorer and then clicking on Add > Script... and selecting Pre-Deployment Script from the list.
Thanks! -
Hi all,
Is there any function module which drop index of cube, as that we have a function module to drop the index of ods (SSM_PROCESS_ODS_DROP_INDEXES).
Any kind of tips will be appreciated.
Thanks in advance.
Regards,
BabuHi,
Try this 'RSDU_INFOCUBE_INDEXES_DROP'.
Hope this helps.
PB -
DAC - drops indexes in the task but does not create them back
DAC is dropping indexes for a task but not recreating them. The execution plan drop/create checkbox is checked and other tasks' index drop/create is working correctly. Index setup is checked for drop/create as well.
Is there somewhere within DAC that controls this function?
Any suggestions are appreciated.
Thanks.You want a "Drop Box" style folder. You should be able to achieve this by creating a folder and giving it permissions similar to the "Drop Box" folder in your users Public Folder (i.e. write only permissions.)
-
Gives ORA-12560: TNS: protocol adapter error when installing oracle 10g
I tried to install oracle 10g r2 in server 2008. but it gives ORA-12560: TNS: protocol adapter error when installing. how I can fix this issue??? please help me ASAP. because its urgent.
thanks in advance.
chamaraWelcome to the forums !
Pl indicate which version of 10g you are installing and on which version of Win 2008. Neither 10gR1 nor 10gR2 are certified to be installed on Win 2008 R1, AFAIK.
For 10gR2, only 10.2.0.5 is certified for Win 2008 R2 - see MOS Doc 1173433.1 (How to Install Oracle 10.2.0.5 on MS Windows 7 / Windows 2008R2)
Also see MOS Doc 740926.1 (Where can I find the Database / Client software to download for Microsoft Vista, or Windows 2008R1?).
Both 10gR1 and 10gR2 are now in extended support - is there a reason you are not using 11gR2 ?
HTH
Srini -
I am provisioning for automated database schema upgrades in a Windows Forms Application (VS2010/VB) which uses SQL Server Compact 3.5 SP2. A portion of the schema upgrade procedure uses TSQL commands passed to SQLCE like the following:
cmd.CommandText = "DROP INDEX [SaleComps$ProjID]"
cmd.ExecuteNonQuery()
However, when this command is processed by the SQLCE engine, I get the following error:
Command: DROP INDEX [SaleComps].[ProjID]
Error: The specified index does not exist. [ ProjID ]
But, if I try to recreate the index (or try to change the index column) I get the following errors which indicate that the index is still there:
Command: ALTER TABLE [SaleComps] ALTER COLUMN [ProjID] nvarchar(20) NULL
Error: Cannot alter a column that is part of a key or an index. [ Index Name = SaleComps$ProjID,Column = ProjID ]
Command: CREATE INDEX "SaleComps$ProjID" ON "SaleComps" ("ProjID" ASC)
Error: The specified index already exists. [ SaleComps$ProjID ]
Any ideas why this would not be working? Thanks!
-BGoodNo, I was guessing at the syntax from reviewing other web postings, some of which were in different SQL dialects.
While your SQLCE Toolbox did not provide the DROP INDEX command, it did provide most of the "Schema Diff" scripting commands. In hindsight, maybe SQLCE Toolbox should recognize when schema differences involve a Column which is used in an index, and
DROP the index before executing the ALTER COLUMN command, then re-CREATE the index with the modified column.
Despite this shortcoming, I am very thankful for the help provided by SQLCE Toolbox, and learned a little more about SQL scripting in the process.
Thanks, ErikEJ!
-BGood
Maybe you are looking for
-
Connect to VPN but can't ping past inside interface
Hello, I've been working on this issue for a few days with no success. We're setting up a new Cisco ASA 5515 in our environment and are trying to get a simple IPSec VPN setup on it for remote access. After some initial problems, we've gotten it to
-
After taking over an hour to backup and restore my iPhone to iOS 5 iTunes gave me that error: An error occurred while restoring this iPhone (-35). Anyone know what this is? None of my apps have been restored, or settings.
-
Save Invoice copy in Hard Disk in PDF format
Dear friends, Here is the requirement to save a copy of billing document in hard disk in pdf format at the time of creation of billing document. Kindly suggest. Regards, Praveen Lobo
-
House bank information on f110 form
I am working with the f110 printing of the "collective order" form. on our form, the user wants to see the house bank. the developer before created text variants (so10) to hold the house bank data and used an include in the form. My question that why
-
Can't make external screen go Full anymore
Previous to Mavericks, I could have a program (EVE) go Fullscreen and of course this would adversely affect the Macbook Pro screen. Upgraded because new info suggested in Mavericks one could change one screen while leaving the other unaffected. NOT t