Problem In Store Database Backup Restore.

Problem In Store Database Backup Restore.

Problem : 

Unable to Create Store Database from HO Management console. Script.xml is not created in the backup file.


Reason : 

Earlier backups were corrupts because following SQL statement was throwing error as:


Select A.* From InvSerial A With(nolock), InvProduct B With(nolock) Where SerialKey

between '5000000000001' and '5999999999999999' And A.ProductKey = B.ProductKey And B.IsGiftCertificate = 'TRUE'

AND B.GiftCertificateType = 2

AND TRY_CONVERT(NUMERIC(18, 6), SerialNumber) IS NOT NULL


Error Code - Numeric value 'SerialNumber' is not recognized


Resolution - 

We had to change the compatibility level of SQL Server to resolve the issue at iVend Enterprise DB Level and Store DB Level.


Following command was executed as:


alter database [CXSRetail] SET COMPATIBILITY LEVEL = 120