NAV 2017 Upgrade Error: Invalid column name ‘Session Unique ID’


Invalid column name: ‘Session Unique ID’ error

I’ve found some posts on this topic and some info requests in forums, this sync problem has been solved in the latest CUs of NAV 2017, but if someone tries to upgrade NAV to a smaller version of CU 8, the problems may occur (I saw it happen once migrating from NAV 4.0 to NAV 2017).

“The field “arrived” in latest CUs.. caused much pain for me in a recent upgrade.”

‘Session Unique ID’ errors

At this link, you will find a post on the topic (explaining how to solve the problem directly from NAV);

Source https://dynamicsuser.net/nav/b/peik/posts/the-following-sql-error-was-unexpected-invalid-column-name-39-session-unique-id-39

PLEASE… DON’T PANIC!

WORKAROUND #1

“The simple work-around is to take the table 2000000110 “Active Session” and 2000000111 “Session Event” from a database with CU07 or higher and restore the table objects into your database with the issue. Then start the development client as administrator and compile all tables with validation.”

  • Recompile 2000000110 and 2000000111 tables, Synch Schema from Development Environment
  • Sync Schema from Powershell in Admin mode (Sync-NAVTenant Command)

PS: If there are any destructive changes in the objects the synchronization will fail. Just make sure that you use the “Later” option when saving and compiling the object.

However, if the problem persists (for various reasons of incorrect synchronization, etc.), the only solution is to force it from SQL Server.

WORKAROUND #2

SQL Server

STEP #1

The problem is that during the upgrade process the table [Object Metadata Snapshot] contains a structure that does not know the new “Session Unique ID” fields in the metadata base.

SELECT * FROM [dbo].[Object Metadata Snapshot]

WHERE (Name like ‘Active Session’ or Name like ‘Session Event’)

You can delete these two objects from this table.

DELETE [dbo].[Object Metadata Snapshot]

WHERE (Name like ‘Active Session’ or Name like ‘Session Event’)

AFTER THIS

STEP #2

You can

Rename “Active Session” table to “Active Session2” Table, rename also the Clustered Index Active Sesssion$0 to Active Sesssion2$0, same thing for “Session Event” table (more secure)

OR

Delete the tables from SQL Server (not more secure but works, I tested this)

After Syncro

LAST THING… “CLEAR ALL RECORDS IN THESE TABLE !! (you can have bad sessions with LOST ID or “UNKNOW CLIENT” etc. etc.)

delete [dbo].[Active Session]
delete [dbo].[Session Event]

NAV Server rebuild Sessions after service restart.

BINGO! System Works Fine!

Annunci

Rispondi

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione / Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione / Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione / Modifica )

Google+ photo

Stai commentando usando il tuo account Google+. Chiudi sessione / Modifica )

Connessione a %s...