SBX - Search With Button

SBX - Forum Post Title

Table synchronize error. Cannot drop the index because it does not exist or you do not have permission.

Microsoft Dynamics AX Forum

MYGz asked a question on 10 Aug 2018 7:56 AM
My Badges

Question Status

Verified

Hi,

I added a field to this table: STG_INVOICE_SUP_VW

But then I wasn't able to synchronize the table so I deleted it. Now if I'm trying to synchronize any table it's throwing this error below:

Cannot execute a data definition language command on ().
The SQL database has issued an error.

SQL error description: [Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot drop the index
'STG_INVOICE_SUP_VW._dta_index_STG_INVOICE_SUP_VW_25_692157136__K7_1_2_3_4_5_6_8_9_10_11_12_13_14_15_16_17_1',
because it does not exist or you do not have permission.

SQL statement: DROP INDEX
STG_INVOICE_SUP_VW._dta_index_STG_INVOICE_SUP_VW_25_692157136__K7_1_2_3_4_5_6_8_9_10_11_12_13_14_15_16_17_1

Problems during SQL data dictionary synchronization.
The operation failed.

Synchronize failed on 1 table(s)

Any tips on how to resolve this?

Reply
Nikolaos Mäenpää responded on 10 Aug 2018 8:05 AM
Verified Answer

You could try to manually remove the index directly on the SQL Server side.

Then synchronize the table again from AX.

Reply
D Feely responded on 10 Aug 2018 8:19 AM
My Badges
Verified Answer

Looks like the AOT and SQL could have got out of SYNC.

Login directly onto SQL Server and check the table manually.

If the index exists try and delete it manually.

Synchronizing the table again should then get you int sync

Reply
Denis Macchinetti responded on 10 Aug 2018 5:06 PM
My Badges
Suggested Answer

Hi,

it seems you are using the Sql DTA Tool for the tuning task.

however, take a look to the link below that explain better your scenario.

intoax.blogspot.com/.../database-engine-tuning-advisor-dta.html

Reply
MYGz responded on 11 Aug 2018 2:54 AM
My Badges

Thank you Nikolaos.

Deleted the index from SSMS and then synchronize worked perfectly.

It also solved one more issue. Incremental CIL was throwing an error below:

Cannot create a record in SysXppAssembly (SysXppAssembly). The record already exists.

For incremental CIL issue I had already done the steps pointed here but it didn't fix it:

https://community.dynamics.com/ax/b/axhari/archive/2016/08/18/cannot-create-a-record-in-sysxppassembly-sysxppassembly-the-record-already-exists

 

After fixing the table sync issue, Incremental CIL ran without issue.

Reply
Nikolaos Mäenpää responded on 10 Aug 2018 8:05 AM
Verified Answer

You could try to manually remove the index directly on the SQL Server side.

Then synchronize the table again from AX.

Reply
D Feely responded on 10 Aug 2018 8:19 AM
My Badges
Verified Answer

Looks like the AOT and SQL could have got out of SYNC.

Login directly onto SQL Server and check the table manually.

If the index exists try and delete it manually.

Synchronizing the table again should then get you int sync

Reply
Denis Macchinetti responded on 10 Aug 2018 5:06 PM
My Badges
Suggested Answer

Hi,

it seems you are using the Sql DTA Tool for the tuning task.

however, take a look to the link below that explain better your scenario.

intoax.blogspot.com/.../database-engine-tuning-advisor-dta.html

Reply

SBX - Two Col Forum

SBX - Migrated JS