Thursday, 2 February 2017

Error while synchronizing AOT

 Error: While doing Synchronization system throw below error
SQL error description: [Microsoft][SQL Server Native Client 11.0][SQL Server]Error: The new name ” is already in use as a COLUMN name and would cause a duplicate that is not permitted.


Solution: By doing followed steps the error got resolve for me:

1) Renamed the table name "PAYMENTTYPE_ES" to "PAYMENTTYPE_ES_Old" in SQL server.

2) Switched to AX and synchronized the "PAYMENTTYPE_ES" table.

3) Switched to SQL Server and refreshed the database, this will pop up two tables with names- i) PAYMENTTYPE_ES and ii) PAYMENTTYPE_ES_Old

4) Now renamed both the tables PAYMENTTYPE_ES to PAYMENTTYPE_ES_New and PAYMENTTYPE_ES_Old to PAYMENTTYPE_ES

5) Again switched to AX and synchronized the PAYMENTTYPE_ES table, error got resolved.

6) Dropped table "PAYMENTTYPE_ES_New" from SQL server.

Friday, 16 December 2016

When was the last time your SQL Server database was restored

Select Destination_database_name, restore_date, database_name as Source_database, Physical_device_name as Backup_file_used_to_restore, bs.user_name, bs.machine_name from msdb.dbo.restorehistory rh inner join msdb.dbo.backupset bs on rh.backup_set_id=bs.backup_set_id inner join msdb.dbo.backupmediafamily bmf on bs.media_set_id =bmf.media_set_id ORDER BY [rh].[restore_date] DESC