title: There is already an object named I_XXXRECID in the database
body: <p>This error is coming while synchronizing the DataDictionary.</p>
  
  <blockquote>
    <p>SQL error description: [Microsoft][SQL Server Native Client 11.0][SQL
    Server]There is already an object named 'I_100013RECID' in the
    database.</p>
    
    <p>SQL statement: ALTER TABLE "DBO".ACOCOSTCENTERATTRIBUTEVALUE_BR ADD
    CONSTRAINT I_100013RECID PRIMARY KEY NONCLUSTERED (RECID)</p>
  </blockquote>
  
  <p>I copied entire business and code database and created new AX Env. I am not sure if this error is there on source Env as well, but I want to resolve this on the new Env.</p>
  
  <p>What I tried already:</p>
  
  <ul>
  <li><p><strong>Deleted the table from SQL Server Management Studio and then
  Synchronize from AOT but the error persists.</strong></p></li>
  <li><p><strong>Tried to drop the index name from SSMS:</strong></p>
  
  <pre><code>DROP INDEX I_100013RECID ON [ACOCOSTCENTERATTRIBUTEVALUE_BR]
  </code></pre>
  
  <p>But getting this error:</p></li>
  </ul>
  
  <blockquote>
    <p>Cannot drop the index 'ACOCOSTCENTERATTRIBUTEVALUE_BR.I_100013RECID',
    because it does not exist or you do not have permission.</p>
  </blockquote>
  
  <p>But on querying the indexes, it's showing the correct table:</p>
  
  <pre><code>select object_name(object_id) from sys.indexes WHERE name =  'I_100013RECID'
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>   dbo.ACOCOSTCENTERATTRIBUTEVALUE_BR
  </code></pre>
  
  <ul>
  <li><strong>On checking sys.indexes there is an index by this name:</strong></li>
  </ul>
  
  <p><a href="https://i.stack.imgur.com/q3Rue.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/q3Rue.png" alt="enter image description here"></a></p>
  
  <ul>
  <li><strong>But the index is not visible in the table:</strong></li>
  </ul>
  
  <p><a href="https://i.stack.imgur.com/D7UGg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/D7UGg.png" alt="enter image description here"></a></p>
  
  <h1>EDIT 1: Additional Info</h1>
  
  <h2>No conflict in table ID:</h2>
  
  <p><a href="https://i.stack.imgur.com/1h5VW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1h5VW.png" alt="enter image description here"></a></p>
  
  <h2>Table from SSMS:</h2>
  
  <p><a href="https://i.stack.imgur.com/wPulk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wPulk.png" alt="enter image description here"></a></p>
  
  <h2>Deleting table from SSMS:</h2>
  
  <p><a href="https://i.stack.imgur.com/qHvcB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qHvcB.png" alt="enter image description here"></a></p>
  
  <p>Out of 3 indexes why are the 2 indexes not getting deleted when I delete the table from SSMS? Why only 1 gets deleted? Check below for the 3 indexes after synchronization. How to get rid of these? SSMS won't let me delete it telling ' Catalog cannot be modified'. Can I try to delete it by changing the settings on master data? I'm not sure what all tables related to this table are populated in the catalog.</p>
  
  <h2>Synchronizing again from AOT:</h2>
  
  <p><a href="https://i.stack.imgur.com/DIVAU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DIVAU.png" alt="enter image description here"></a></p>