I have a MSSQL Server 2008 R2 system that updates various tables on various systems during a nightly process. I have a MySQL linked server that has an Auto_Increment on one of it's tables. This tables contents are deleted and replaced each night. This of course does not reset the increment. I have tried:
ALTER TABLE REMOTEMYSQL...[TableWithAI] AUTO_INCREMENT = 1
And I get:
Incorrect syntax near 'AUTO_INCREMENT'
I can successfully:
delete from REMOTEMYSQL...[TableWithAI]
But obviously that doesn't reset the increment on the MySQL side
I tried:
Truncate TABLE REMOTEMYSQL...[TableWithAI]
and I get:
Cannot find the object "TableWithAI" because it does not exist or you do not have permissions.
But the MySql user that is used in the link has full permissions. How can I ether delete the contents and zero the increment, or zero the increment by itself?