Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

How can I edit the methods that perform table actions during a database sync/upgrade?

(0) ShareShare
ReportReport
Posted on by 2,890

Hi, I'm in the middle of an upgrade process, and one of the checklists includes a database sync, I'm getting some errors that I'd like to solve by checking the queries/stored procedures involved, the error is:

SQL error description: [Microsoft][SQL Server Native Client 10.0][SQL Server]Conversion failed when converting the nvarchar value 'CP' to data type int.

It's an insert into X167X from ReqParameters; according to the normal behavior, the X167X is a temp table before re-creating the ReqParameters table isn't?

So, I'd like to know where to check this query and modify it according to my needs, thanks in advanced.

*This post is locked for comments

  • Andy Adamak Profile Picture
    Andy Adamak 4,070 on at
    RE: How can I edit the methods that perform table actions during a database sync/upgrade?

    I've run into this before, and in the end it was because of LegacyID issues.  

    In the course of your upgrade (after you took a shapshot of your live environment and put in on your update server), did you add or change anything in your live environment?

    Your correct, the XyyyX table is a temp table for storing data during table upgrade.  The number between the X's is the legacy ID of the table in question.  I would start by looking into that table and see what field is having an issue.  As I said, If you're putting your on the "upgrade the live server" step, this error could be because of changes made to the live server during the course of the upgrade.  

    I would verify the legacy id of the table & field in question is the same on your live & upgrade server.  I ended up exporting then deleting all changes made on the live server, then upgrading it and importing any changes I needed back in.  This way your id's stay in sync.  

    If all else fails, if you open up SQL and go to your AX database, open the table dbo.SQLDICTIONARY and select * where TABLEID = 167.  This will show you all the fields and expected types in the table.  It is safe to delete where tableid = 167 and the records will be re-created during your database sync.  HOWEVER, doing this with legacy Id issues (like I did), will give you even more of a headache.  Be sure everything is correct before deleting and regenerating the records.  

    See me work through the issue in this post: community.dynamics.com/.../209692.aspx

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,391 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans