Upgrade database

Build 1501 on 14/Nov/2017  This topic last edited on: 25/Aug/2014, at 10:39

Execute, from the Command prompt window, in the bin folder, and wait until it finishes. Look also if there are error messages.

c:\tera\gn4\bin\srv4 dbupdate -config c:\tera\gn4\config\Editorial_UpdateConfig.xml -yes

Note

Computation of auto-computed attributes and initialization of new attributes, that by default happen during database upgrade, can be very time-consuming, and in some cases they can fail due to problems in the existing objects, so the 'srv4 dbschema' and 'srv4 dbupdate' commands have options '-nocompute' and '-noinit' that disable the computation and the initialization respectively - e.g.

srv4 dbschema -in ..\config\schemas\gn4.xsd -nocompute

will import the gn4.xsd schema without computing new automatically computed attributes (if there are any in the schema).

WARNING: use these options with caution, they can leave the database in a corrupted state.

In the case of the upgrade that adds the 'modifiedDate' to object, that requires the re-computation of ALL objects in the database it is possible to execute the schema import with '-nocompute' and then fix things with the SQL query:

update 

    s_ObjectTable 

  set

    s_modifiedDate = (select max(gn_time) from gn_AuditTable where gn_ObjectId=s_id and gn_Action in (2,3,6,19))

  where

    s_modifiedDate is null

(assuming that the objects have the corresponding entries in the audit table).

Next

Restart services