dbschema [-<option> . . .]
Imports and exports the schema of an existing database.
Options
[-out] <string>
Destination file for the export of the schema
-in <string>
Source file for the import of the schema
-timeout <time-span; e.g. 4:30 for 4 hours and 30 minutes, 2.06:00 for 2 days and 6 hours>
Database commands execution time-out
-recycle <string>
IIS application pools to recycle after having sucessfully imported the schema. It is a comma-separated list of application pool names in the format 'server name'/'pool name' or just 'pool name' (local server)
Example
srv4 dbschema -in ..\Config\Schemas\GN4.xsd
Fixes in version 1.6
•Attempts to use srv4 dbupdate or srv4 dbschema to upgrade systems with old (before December 2011) schemas that did not yet contain the descName attribute failed with an error 147: The object type 'user' does not contain the required attribute 'descName'. Now fixed.
Fixes in version 1.5
•Updating the schema ('srv4 dbupdate' or 'srv4 dbschema') that modifies the key definition of an object type adding one or more non-string attributes or uses an "xs:init" block to re-compute the keys of the object of the type that is changing key definition, messed-up the key digest values of all the deleted object of the type that is changing key definition - basically computing them as they were non-deleted. This resulted in the upgrade operation failing with a 'duplicate key' exception if there were multiple deleted objects with the same values for the old key fields, and could cause problems attempting to spike or un-spike objects even if the upgrade completed successfully.
•Updating the schema ('srv4 dbupdate' or 'srv4 dbschema') failed with an error Object(s) with id XXXXX have been deleted (ERR0229) when then new schema added an automatically compute attribute to an object type that had at least a deleted object in the database. The bug has been introduced by the fix for ticket #GN4-521 (available also in 1.4.1514.1).
•Database upgrade fails with error 'The object type 'object' does not contain the required attribute 'modifiedDate''. In other words, attempts to upgrade the database structure and the schema from versions 43 or earlier to version 48 or later failed with the error The object type 'object' does not contain the required attribute 'modifiedDate'. Now fixed.
Changes in version 1.4.
•When importing a new schema on an existing database, using either "srv4 dbschema" or "srv4 dbupdate", srv4 will compute new automatically computed attributes, and initialize new attributes that have an initialization XSLT (see http://forum.teradp.com/topic.asp?whichpage=1&TOPIC_ID=509). Both these operations can be very time-consuming, and in some cases they can fail due to problems in the existing objects, so now the "dbschema" and "dbupdate" commands have two new 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 this options with caution, they can leave the database in a corrupted state.