Wednesday, May 18, 2011

Microsoft Dynamics GP Database Installation and Upgrade Statuses

I have to admit that to deliver this post I had to dig deep into the bowels of the Microsoft Dynamics GP Utilities. Installation and upgrade statuses don't seem to be anywhere (that I could find anyways) handy and can be very important when looking at a DEXSQL.LOG file for reasons of a failure during any of these processes.

Status ConstantStorage Value
DU_STATUS_DONE
0
DU_STATUS_START
1
DU_STATUS_INSTALL
2
DU_STATUS_UPGRADE
3
DU_STATUS_BIND_DEFAULTS  
7
DU_STATUS_RECOMPILE
8
DU_STATUS_CONVERT
23
DU_STATUS_POST_CONVERT
30

During the installation or upgrade of a database, status codes are recorded in the DYNAMICS..DB_Upgrade table for each Microsoft Dynamics GP dictionary being updated.

Until next post!

MG.-
Mariano Gomez, MVP
IntellPartners, LLC
http://www.IntellPartners.com/

5 comments:

DavidMO said...

I noticed other values while trying to track the progress of our 25 company update using this script I built, below. I was thinking of building in a case statement with the various status.
48, 53, 54, plus some others that flash by pretty fast. Any ideas what the complete list includes?


SELECT db_name, PRODID, db_verMajor, db_verBuild, db_status,
Left(Convert(varchar(11) ,start_time, 0),11)+' ' + right(Convert(varchar ,start_time, 8), 8) as StartTime,
Left(Convert(varchar(11) ,stop_time, 0),11)+' ' + right(Convert(varchar ,stop_time, 8), 8) as StopTime,
Convert(varchar, stop_time - start_time, 8) AS Duration,
Case
When db_status = 0 then '1 - Upgraded'
When db_status <> 0 Then '2 - IN PROCESS'
End as Status
FROM DB_Upgrade WHERE PRODID = 0 and db_verBuild = 1860
Union All
SELECT db_name, PRODID, db_verMajor, db_verBuild, db_status,
'' as StartTime, '' as StopTime,
'' AS Duration,
'3 - Not Upgraded' as status
FROM DB_Upgrade WHERE PRODID = 0 and db_verBuild < 1860
ORDER BY status, StartTime asc

DavidMO said...

Here are the Values I pulled from a Trace ran while performing the 12/21/2011 GP2010 End-of-year upgrade
set [db_status]=0
set [db_status]=1
set [db_status]=6
set [db_status]=7
set [db_status]=8
set [db_status]=9
set [db_status]=10
set [db_status]=11
set [db_status]=12
set [db_status]=13
set [db_status]=14
set [db_status]=15
set [db_status]=16
set [db_status]=17
set [db_status]=23
set [db_status]=30
set [db_status]=47
set [db_status]=48
set [db_status]=49
set [db_status]=50
set [db_status]=51
set [db_status]=52
set [db_status]=53
set [db_status]=54
set [db_status]=55
set [db_status]=56
set [db_status]=59

Mariano Gomez said...

Dave,
Thanks for the additional input! This is a great compilation.

MG.-

JP Davey said...

Here's a link to a script I wrote a while back to see the progress of an upgrade. It's only really useful when there is more than one company database. It doesn't really take into account the db_status column as a description of what is currently happening as much as using it for noting which DB is currently being upgraded. The script gives a fairly good idea of how long the process will take after the first database has been completed. So far it's been pretty accurate.

Upgrade progress script

Dbruni5 said...

Thanks for posting, this enabled me to restart the upgrade of my old company after a reinstall of the database to a new machine.