Upgrade script

The following describes the upgrade command and its parameters.

The full syntax of the command can be obtained from the command line by entering the command without parameters.

*** Usage: upgrade_56.exe –dbase dbasename [-logfile <filename>]
*** [-sid <serverid>]
*** [-dba <dbauser> -dbapwd <dbapassword>]
*** [-S <SQLServerNamedInstance>]
*** [-markforindex <0|1> -solrserver <srvr> <solroptions>]
*** solropts: [-solrprotocol <http|https> (default http)]
*** [-solrport <port number> (default 8983)]
*** [-solrcollection <coll> default "collectionSDL_Contenta_Sample"]
Some upgrade parameters are always required, and some are required only if certain others are specified. Others are always optional. The following table describes the upgrade parameters and their syntax.
ParameterDescription
Basic upgrade parameters:
–dbase databasenameRequired.
The name of the database to be upgraded, in one of the following formats:
  • On Windows: databasename@ODBC_DSN
  • On UNIX: databasename@SID

where ODBC_DSN is the database DSN name and SID is the Oracle Server Identifier.

–sid serveridRequired only for an Oracle database.

Specify the Oracle Server Identifier of the database server.

–logfile pathOptional.

Specify an alternate path and filename for the logfile that is created when you upgrade.

If this parameter is omitted, the log file is created in same directory with utilityname.log.

–dba dbauser and –dbapwd dbapasswordRequired if any Solr parameters are specified and the Crawler tables are not yet created.

Specify the Oracle database administrator username and password.

If these parameters are omitted when required, the upgrade will fail with an error.

–S SQLServerNamedInstanceRequired only for an MSSQL Server database.

Specify the MSSQL Server named instance.

Solr parameters:
–markforindex xOptional.

Specify 1 (true) to mark the database to be indexed, or 0 (false) to mark the database to not be indexed. This value can be changed later using the Contenta AppData editor.

If this parameter or its argument is omitted and the –solrserver switch is used, then:
  • If the MARK_DB_FOR_INDEX AppData value exists, its value remains unchanged.
  • If the MARK_DB_FOR_INDEX AppData value does not exist and one or more Solr parameter is supplied, it is created and its value set to false.
–solrserver servernameRequired if any of the following parameters are specified:
  • –solrprotocol
  • –solrport
  • –solrcollection
Specify the servername, which is the hostname of the server on which Solr is running. You can specify an IP address, server name, or URL. For example:
  • –solrserver 192.168.1.5
  • –solrserver localhost
  • –solrserver YourMachine.example.com
If this parameter or its argument is omitted, then:
  • If the URL AppData value exists, its value remains unchanged.
  • If the URL AppData value does not exist, it is created without a value.

SDL recommends that you specify a value for this parameter even when not required to ensure that the Solr URL is properly configured.

–solrprotocol protocolOptional.

Specify the protocol (http or https) for the Solr URL. The default value is http.

–solrport port numberOptional.

Specify the port number on which Solr is running. The default value is 8983.

–solrcollection collection nameOptional.

Specify the name of the Solr collection. The default value is collectionSDL_Contenta_Sample.

Example

The following is an example of the usage of the upgrade command and its parameters for a database named trucks.

upgrade_55.exe -dbase trucks -logfile trucks.log -dba system -dbapwd D0ntW@atchM3 –markforindex 1 -solrserver localhost -solrprotocol http -solrport 8983 -solrcollection collectionTrucks

Each Contenta database contains a set of AppData configurations that are read by the Contenta Server and programs like Crawler. Some of the upgrade parameters affect these configurations.

Results

Based on the parameters specified in the previous example, the following AppData name/value pairs are set for the for the database named trucks.
AppData Key PathNameValue
{Global} CollectionsMARK_DB_FOR_INDEXtrue
RETRYfalse
{Global} Collections/collectionTrucksURLhttp://localhost:8983/solr/#/collectionTrucks
{Global} Collections/collectionTrucks/All_ConfigsSTATUS_REPORTINGtrue