web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
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,894

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
    4,074 on at

    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Prashant Singh Profile Picture

Prashant Singh 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans