Database Credentials

The command descriptions assume that database credentials are stored in the project (the default) or in environment variables.

If you have runtimeCredentials set and the credentials are not stored in environment variables, then you need to specify the database credentials on the command line.

We strongly recommend to use runtime credentials because it is more secure than stored credentials (due to the possibility of the stored password being decoded).

See Database Credential Management

Single-credential

Commands that work on a single database (dbdef) require the -un <username> and -pw <password> options to specify the database credentials.

Two-credential

Commands that work on two databases require credentials for the reference (desired state) and target (changed) databases

Getting Help

To get a list of available commands, run hammer help at a system command prompt. 

USAGE: hammer [OPTION]... [COMMAND] [OPTIONS]...
Use 'hammer help options' for available options
Use 'hammer help [COMMAND] for more help on a command

AVAILABLE COMMANDS:
     add-to-property: Add a path to a property.
         addContexts: Add contexts to change sets.
           addLabels: Add labels to change sets.
      assignMetadata: Assign metadata information to a label.
       changelogSync: Mark all changes as executed in the database.
        checkDrivers: Check that JDBC driver jars are installed or on the specified paths.
          checkRules: Compiles rules and reports any errors.
      clearCheckSums: Delete the checksums used to detect altered change sets from the tracking tables.
              dbshow: List all databases for a project, along with extra info about each.
              deploy: Deploy the changelog, updating the target database's schema to the latest version.
 deploy-autoRollback: Deploy the changelog to the target database; if an error occurs, rollback to the revision before the command was given.
                diff: Compares two databases and produces a report.
       diffChangelog: Compares two databases and produces a changelog.
      findChangeSets: Locates changesets based on label expression and script checksum
           forceSync: Force a re-sync/re-base to DMC DB using the files currently active in the workspace available to hammer.
            forecast: Simulate unexecuted change sets against the specified database.
              groovy: Run a script that can use Datical DB REPL commands using the Groovy script engine.
                help: Print help on available commands.
             history: Show the applied change set history of a database.
insertSavedAuditData: Insert all audit entries temporarily saved in the project into the user-configured DMC DB.
      installDrivers: Run the custom script 'installDrivers.groovy'.
      installLicense: Install a license file to allow continued use of Datical DB.
     modifyChangeSet: Modify changeset attributes.
            newDbDef: Creates a new dbDef based on the key/value pairs specified as arguments.
registerProjectWithDMCDB: Register project with DMC database
        releaseLocks: Unlock a locked environment so that Datical/Liquibase commands can be run against it.
      removeContexts: Remove contexts from change sets. 
        removeLabels: Remove labels from change sets.
            rollback: Roll the target database back to a previous state, using a variety of methods.
            runRules: Runs rules from the SQLRules folder on the specified SQL file or folder of SQL files.
         schemaStats: Display summary schema info.
                 set: Set properties, database definitions, etc. See 'set help' for more information and sub commands.
                show: Display project properties, database definitions, etc. See 'show help' for more information and sub commands.
            snapshot: Captures a snapshot of a database as either a persistent object file or as a Liquibase changelog.
              status: Show the deployment status of a database.
       statusDetails: Show detailed status for each of the changesets in the changelog.
         testConnect: Test the connection for one or more databases.
    uninstallDrivers: Run the custom script 'uninstallDrivers.groovy'.
 validateStoredLogic: Compiles stored logic and reports any validation errors.
    versionChangeLog: Upgrades project changelog to the current version.



add-to-property

Add a path to a property

USAGE

add-to-property <property> <path>

EXAMPLE

add-to-property drivers /home/user/newdrivers

NOTES

This command appends a new path to an existing property that expects path values.



addContexts

Add contexts to changesets. Adds context attributes to a set of changesets in the changelog. The attributes are selected using a label expression. This command is used by the Deployment Packager to indicate that a group of changesets is ready to be deployed to a new environment.

Starting with v4.32, please use the modifyChangeSet command. The addContexts command is deprecated and support may be removed in the future. 

USAGE

addContexts --lookupChangesets=<label-expression> --context=<contexts> [--scriptChecksum=<checksum>] [--matchAll=true|false]

OPTIONS

NOTES

The value of the scriptChecksum parameter can be used to further qualify change sets that match the label expression. This is used primarily in the Deployment Packager to confirm that the change set was generated by the expected version of a script.

The value of the matchAll parameter impacts the matching behavior of the scriptChecksum parameter.




addLabels

Add labels to changesets. Adds label attributes to a set of changesets in the changelog that are selected using a label expression.

Starting with v4.32, please use the modifyChangeSet command. The addLabels command is deprecated and support may be removed in the future. 

USAGE

addLabels --lookupChangesets=<label-expression> --context=<contexts> [--scriptChecksum=<checksum>] [--matchAll=true|false]

OPTIONS

NOTES

The value of the scriptChecksum parameter can be used to further qualify change sets that match the label expression. This is used primarily in the Deployment Packager to confirm that the change set was generated by the expected version of a script.

The value of the matchAll parameter impacts the matching behavior of the scriptChecksum parameter.



assignMetadata

Assign metadata information to a label. Used to associate more information with a label than could be expressed in the label itself. The metadata is stored in the project’s associated DMC database, so this command requires that an DMC database has been configured for the project.

USAGE

assignMetadata --metdataLabel=<label name> --metadataFile=<path to file>

OPTIONS



changelogSync

Mark all change sets as executed in the database. Marks all changesets as applied to the specified database.

USAGE

changelogSync <dbdef> <options>

EXAMPLE

changelogSync myAppDev --mergeLabels=merge --pipeline=Feature1

OPTIONS

NOTES

USE CAUTION! Before running changelogSync, verify that the specified database is up to date!

Running changelogSync against a database that is not complete can lead to future deployment failures.




checkDrivers

Check that JDBC driver jars are installed or on the specified path. Scans the path(s) specified by the 'drivers' property for accessible JDBC drivers.

USAGE

checkDrivers

EXAMPLE OUTPUT

Found installed driver: com.ibm.db2.jcc.DB2Driver driver: (v3.63) jar: (v1.0.11.20181126111708)
Found installed driver: com.datical.jdbc.oracle.DaticalOracleDriver jar: (v0.0.60.20181126114644)
Found installed driver: com.microsoft.sqlserver.jdbc.SQLServerDriver driver: (v6.3) jar: (v1.0.11)
Found installed driver: oracle.jdbc.OracleDriver driver: (v18.3) jar: (v1.0.11)

NOTES

There are several ways to configure Datical DB to use the JDBC drivers that communicate with the databases being managed. The preferred method is to install the drivers into the OSGi environment using the installDrivers command. Drivers can also be found by creating a properties file in the project and then either

For more information on setting the drivers property, see the help: help set property

For backward compatibility, checkdrivers (all lowercase) also works. 



checkRules

Compiles rules and reports any errors.

USAGE

checkRules [PreForecast|Forecast|PostForecast|SqlRules]

EXAMPLE

checkRules PreForecast

OPTIONS

NOTES

Run the command from a valid Datical DB project directory.



clearCheckSums

Delete the checksums used to detect altered change sets from the tracking tables.

USAGE

 clearCheckSums <dbdef>

EXAMPLE

clearCheckSums myAppDevDB

OPTIONS

NOTES

Use only under the direction of a Datical Support Engineer or if you are very experienced with Datical DB.

This command is helpful when you need to respond to a change to an existing object that is made outside of Datical DB. For example, someone uses a SQL script to change a database directly.  It allows you to update the change set that creates this object and clear the existing checksums to avoid validation errors. The checksums are recreated on the next deploy or changeLogSync command. 




create

Create various project artifacts.

USAGE

create <object> <options>

OBJECTS

{
"DbDefClass":"OracleDbDef",
"name":"MyNewOracleDB",
"hostname":"127.0.0.1",
"port":"1521",
"username":"orclUser",
"password":"hammer01@",
"sid":"ORCLSID",
"contexts":"DEV,QA"
}


Keys



dbshow

List all databases for a project, along with extra info about each. 

USAGE

dbshow

dbshow <dbdef>...

EXAMPLE

dbshow DEVdb QAdb STAGEdb

NOTES

If you use the command without specifying a database, information for all dbdefs is shown.

To obtain information on a subset of database definitions, use their names as command line parameters.

OUTPUT

Lists the name, URL, database name, alternate schema, and default context.



debug export

Export and scrub sensitive data from files to be sent to Datical support for debugging or troubleshooting.

USAGE

debug export [--scrub=true|false] [--include=<searchstring>[,<searchstring>,...][--exclude=<searchstring>[,<searchstring>,...]] [--lastmodified=<N>] [--report=<path/file>]

EXAMPLE

debug export 


OPTIONS

NOTES

Run the command at the root of a project directory, <project>

For use case scenarios and examples, see Assembling Data for Datical Support

To include an external file, place it in the project directory, preferably in the root, <project>.

Do not use : or / characters in <searchstring>. If you search for a URL, do not include the prefix (http://, https://)

OUTPUT

Creates a zip file of the specified project files. The zip file is placed in <project>/Reports/debug/<project>.zip by default. 



deploy

Deploy the changelog, updating the target database schema to the latest version. Deploys all change sets that have not been applied to the indicated database in the project.

USAGE

deploy <dbdef> [–log=] [--enableRowCount=exact|approximate|disabled] [--pipeline=<name>] [--report=<path>] [--context=context1,context2] [--labels=<label expression>][--mergeLabels=override|merge|append][--immutableProject=<true|false>][--invalidsAction=<warn|fail>]

EXAMPLE

deploy myAppDevDb --log=/home/user/dbadmin/daticallogs/ --report=/home/user/dbadmin/daticalreports --context=dev,integration --labels="JUN AND (poolApp or beachApp)" --invalidsAction=fail

DATICAL SERVICE OPTIONS

Use these options to access a project that is stored on Datical Service. 

OPTIONS



diff

Compare two databases and produce a report. Compares two database definitions in a project and produces a text report of the differences.

USAGE

diff <referenceDB> <targetDb> [--output=/path/to/report]

EXAMPLE

diff myAppDevDB myAppQaDB --output=<path>

OPTIONS



diffChangelog

Compares two database definitions in a project and produces the change sets necessary to synchronize the databases.

USAGE

diffChangelog <referenceDB> <targetDb> [--output=<path>] [--assignLabels=<labels>] [--assignContexts=<contexts>] [–-scriptChecksum=<checksum>]

EXAMPLE

myAppDevDB myAppQaDB --output=/home/user/diffChangeLogsdir/diffChangeLog.xml --assignLabels=label1,label2 --assignContexts="(contextOne and contextTwo)" 

OPTIONS


forceSync

The forceSync forces a re-sync/re-base to DMC DB using the files currently active in the workspace available to hammer.  Note that some warning messages refer to this forcesync command as "the resync command in the CLI".

USAGE

forceSync

EXAMPLE

forceSync



forecast

Simulate unexecuted change sets and run rules against the specified database.

USAGE

forecast <dbdef> [--log=/path/to/log]  [--enableRowCount=exact|approximate|disabled] [--report=/path/to/report] [--context=context1,context2] [--labels=<label expression>][--mergeLabels=override|merge|append][--limitForecast=true|false][--immutableProject=<true|false]

EXAMPLE

forecast myAppDevDb --log=/home/user/logs/ --report=/home/user/reports --context=dev,qa --labels="JUN AND (poolApp or beachApp)" --limitForecast=true

DATICAL SERVICE OPTIONS

Use these options to access a project that is stored on Datical Service. 

OPTIONS



groovy

Run a Groovy script. Runs a script of Datical DB commands using the Groovy script engine.  

USAGE

groovy <script-name> <script-options>

EXAMPLE

groovy myScript.groovy show(project, ["dbprop", "myProject", "enableStorageOptions"])

OPTIONS

NOTES

To access Datical DB commands through the script, access them through the DaticalDb object. The parameters for a command are (project, List<String> <[parameters]>). Use the word "project" as shown below.

Exceptions: add-to-property is accessed by addToProperty and deploy-autoRollback is accessed by deploy-AutoRollback.

Examples:

help(project, [])

help(project, ["groovy"])

show(project, ["dbprop", "myProject", "enableStorageOptions"])



help

Show help on Datical DB commands.

USAGE

help

help <command>|options

set help

show help

EXAMPLE

help diff

OPTIONS

NOTES

When run without a command option, lists all available commands and a brief description of each.

SEE ALSO

The set and show commands. 




history

Show the applied changeset history of a database. Shows all changesets that have been applied to the specified DbDef.

USAGE

history <dbdef>

EXAMPLE

history QAdb

OPTIONS



insertSavedAuditData (deprecated)

Insert all audit entries temporarily saved in the project into the user-configured DMC DB.

USAGE

insertSavedAuditData --project=<path>
insertSavedAuditData

OPTIONS

NOTES

If run without an option, the command runs in the current directory. The command fails if the directory is not a valid project directory.

Sometimes an operation (like deploy) encounters a condition that prevents information from being written to the DMC database. In that case, the information is saved to a temporary on-disk database. Use this command to move the on-disk data to the configured DMC database once connectivity to the DMC database has been restored.



installDrivers

Run the custom script installDrivers.groovy. Installs OSGi packaged JDBC drivers from the specified update site

USAGE

hammer installDrivers <driver_update_site>

EXAMPLE

hammer installDrivers http://update.datical.com/latest/thirdparty

NOTES

Update sites can be either HTTP URLs (as shown above) or directories on a file system.

Examples of <driver_update_site>:



installLicense

Install a license file to allow continued use of Datical DB. Once a license is installed on a machine once, it does not typically need to be installed again.

USAGE

installLicense <path>

EXAMPLE

installLicense /home/datical/datdb.lic

OPTIONS

NOTES

If you need to obtain or renew a license please contact our Technical Support team.



licenseCounter

Count the DbDefs in use for licensing validation.

USAGE

hammer licenseCounter <projects_dir> [ showDebug=true ]

EXAMPLE

Linux: hammer licenseCounter ~/datical
Windows: hammer.bat licenseCounter C:\Datical\Projects



OPTIONS

NOTES

Output is sent to stdout. Redirect to a file to save it. 



modifyChangeSet

Modify changeset attributes


USAGE

modifyChangeSet --action=<action> --<modify-option>[=<value>, ...]... [--<search-option>=<value>, ...]...

EXAMPLE

hammer modifyChangeSet --action=ADD --modifyLabels=history --searchIgnore=true

hammer modifyChangeSet --action=ADD --modifyLabels=abandoned --searchLabels=MyProcedureName123.sql

hammer modifyChangeSet --action=REMOVE --modifyContexts=QA4 --searchContexts=QA4

hammer modifyChangeSet --action=ADDALL --modifyContexts=DEV,PATCH01

hammer modifyChangeSet --action=REMOVEALL --modifyContexts=PATCH01

hammer modifyChangeSet --action=ADD --modifyIgnore --searchLabels=MyScriptName123.sql

hammer modifyChangeSet --action=ADD --modifyContexts=DEV,NEWCONTEXT

OPTIONS

Action

Modify Option

At least one modify option is required. It specifies what change to make. It can be one of the following:

When a value is added to an attribute, it is added at the end of the existing list and the order of the list is preserved. If the value already exists, it is not added again. 

When a value is removed from an attribute, the order of the remaining values is preserved. 

When you specify more than one modify option, all modifications of the same type (context, ID, label) are put together and applied at one time. 

Search Option

The search options determine which changesets to modify. They select a list of changesets for the modify options to work on. 

Searches are not case-sensitive. 

Search option statements take one or a comma-separated list of values. They are provided for changeset attributes as follows: 


OUTPUT

The command reports the number of changesets that met the search criteria. If no changesets meet the criteria, the command succeeds and reports that no changesets met the search criteria. 

ERRORS

The command fails and reports an error when:


NOTES

The modifyChangeSet command is intended to make it easier to work with labels and contexts.

Context expressions and label expressions are not currently supported. Use comma-separated lists for multiple values. 

Starting with version 4.32, Use this command rather than the following commnds, which are deprecated and may be removed in a future release:




newDbDef

Creates a new dbDef based on the key/value pairs specified as arguments.

  • Oracle
    • Inline Credentials:  OracleDbDef
    • Run-Time Supplied Credentials:  DelayedCredentialOracleDbDef
  • SQL Server
    • Inline Credentials:  SqlServerDbDef
    • Run-Time Supplied Credentials:  DelayedCredentialSqlServerDbDef
  • Postgres Enterprise DB
    • Inline Credentials:  PostgresqlDbDef
    • Run-Time Supplied Credentials:  DelayedCredentialPostgresDbDef
  • DB2
    • Inline Credentials:  Db2DbDef
    • Run-Time Supplied Credentials:  DelayedCredentialDb2DbDef
  • (deprecated) MySQL Inline Credentials:  MysqlDbDef


USAGE

newDbDef DbDefClass <value> name <value> hostname <value> port <value> username <value> password <value> database <value> ... <key> <value>

AVAILABLE KEYS

  • DbDefClass - Database Type. (OracleDbDef|Db2DbDef|MysqlDbDef|SqlServerDbDef|PostgresqlDbDef|DelayedCredentialOracleDbDef|DelayedCredentialSqlServerDbDef|DelayedCredentialPostgresDbDef|DelayedCredentialDb2DbDef)

  • name - The name for the dbDef. Used in the repl and UI as an alias for this connection.

  • hostname - The hostname/ip of the target database server.

  • port - The port number for JDBC connections to the target database server.

  • username - The database user name to use for the connection.

  • password - The password for the database user specified.

  • database - (only applies to MySQL|DB2|Postgres) The name of the database you wish to manage.

  • databaseName - (only applies to SQLServer) The name of the database you wish to manage.

  • instanceName - (only applies to SQLServer) The name of the instance you wish to manage.

  • dbType - (only applies to SQLServer) The type of SQLServer.

    • Available values: mssql (default), az_sqlmi, az_sqldb.

  • authentication - (only applies to SQLServer) The type of authentication for Azure Databases.

    • Available values: none (default), activeDirectoryIntegrated, activeDirectoryPassword, activeDirectoryMSI.

  • msiClientId - (only applies to SQLServer) Managed identity for Azure resources.

  • multiSubnetFailover - (only applies to SQLServer) allows you to connect to the availability group listener of a SQL Server availability group or a SQL Server Failover Cluster Instance.
  • applicationName - (only applies to SQLServer) The name of the database application you wish to manage.

  • azureClientId - (Azure SQL MI RefDB Only) Application (client) id of service principles.

  • azureTenantId - (Azure SQL MI RefDB Only) Id of tenant on Azure.

  • azureClientSecret - (Azure SQL MI RefDB Only) Secret key of service principles on Azure.

  • azureResourceGroup - (Azure SQL MI RefDB Only) Name of resource group on Azure

  • azureSubscriptionId - (Azure SQL MI RefDB Only) Id of subscription on Azure.

  • azureRestAuthenticationOption - (Azure SQL MI RefDB Only) Azure REST API authentication type. Available Values: certificate, clientSecret (default)
  • sid - (only applies to Oracle) The name of the Oracle SID to which you wish to connect.

  • serviceName - (only applies to Oracle) The name of the Oracle Service to which you wish to connect.

  • defaultSchemaName - The name of the schema you wish to manage.

  • defaultCatalogName - The name of the catalog you wish to manage.

  • contexts - A comma separated list of contexts to associate with the new dbDef.

  • labels - A comma separated list of labels to associate with the new dbDef.

  • dbDefType - One of either 'standard' or 'dmcdb' to specify whether this is a standard dbDef or the dbdef for the DMC Web Application. Defaults to 'standard'.

  • storageOptionCollectedAtSnapshot - whether the system will pay attention to storage options on table, indexes, etc.

  • tnsName - (only applies to Oracle) The TNS name for the Oracle host and service you wish to manage. Requires tnsnames.ora to be appropriately configured on the client.

  • kerberos - (only applies to Oracle) true or false. Set to true if using Kerberos authentication to connect. If true, tnsName must also be specified. Requires additional client configuration.



newProject

Creates a new empty project in the current directory.

USAGE

newProject [projectName]

EXAMPLE

newProject myProject

OPTIONS

  • projectName - Specifies the project name. If not specified, the name newProject is used.

NOTES

Create the project directory before creating the project. This command does NOT create a new directory for the project. 



registerProjectWithDMCDB

Registers the project with the DMC database.  This command is for DMC versions 7.0 and higher.

USAGE

        registerProjectWithDMCDB

EXAMPLE

        registerProjectWithDMCDB

NOTES

        You may need to run the hammer newDbDef command first if the dbDef for DMC hasn't been created yet.




releaseLocks

Reset the lock Datical creates in an environment to prevent concurrent Datical operations (DATABASECHANGELOGLOCK table) for all supported database platforms.

With versions 7.3 or higher, if the target is an Oracle database this command will also look for the DATICAL_SPERRORLOG table and attempt to drop it if it's found.  The DATICAL_SPERRORLOG table is used to capture output for scripts executed using sqlplus during a deployment.

USAGE

        hammer releaseLocks <dbDef>

EXAMPLE

        hammer releaseLocks PROD_DB 

NOTES

        Typically this lock is cleared at the end of a deployment but a deployment that ends prematurely may leave this lock in place. Subsequent deployments to such an environment will fail until the lock is released.



removeContexts

Remove contexts from changesets. 

Starting with v4.32, please use the modifyChangeSet command. The removeContexts command is deprecated and support may be removed in the future. 

USAGE

removeContexts --lookupChangeset=<label-expression> --context=<contexts> [--scriptChecksum=][--matchAll=true|false]

OPTIONS

NOTES

The value of the scriptChecksum parameter can be used to further qualify change sets that match the label expression. This is used primarily in the Deployment Packager to confirm that the change set was generated by the expected version of a script.

The value of the matchAll parameter impacts the matching behavior of the scriptChecksum parameter.



removeLabels

Remove labels from changesets. 

Starting with v4.32, please use the modifyChangeSet command. The removeLabels command is deprecated and support may be removed in the future. 

USAGE

removeLabels --lookupChangeset=<label-expression> --context=<contexts> [--scriptChecksum=][--matchAll=true|false]

OPTIONS

NOTES

The value of the scriptChecksum parameter can be used to further qualify change sets that match the label expression. This is used primarily in the Deployment Packager to confirm that the change set was generated by the expected version of a script.

The value of the matchAll parameter impacts the matching behavior of the scriptChecksum parameter.



rollback

Roll back the target database to a specified revision, date or by number of steps.

USAGE

rollback <dbdef> lastlabel
rollback <dbdef> changeid:<changesetId>
rollback <dbdef> count:<num>
rollback <dbdef> date:<date>
rollback <dbdef> tag:<tag_name>
rollback <dbdef> lastDeploy
rollback [--report=<path/file>]


If you are using a current packaging methodology (Deployment Packager with SCM), use only the lastDeploy option. Other options support older methodologies. 


EXAMPLE

rollback <dbdef> lastDeploy --pipeline=FeatureA
rollback <dbdef> lastDeploy --pipeline=FeatureA --report=/home/user/dbadmin/daticalreports


OPTIONS

OPTION VALUES


runRules

Execute the project's 'sqlRules' against an individual SQL script, a list of scripts or a folder of scripts.

USAGE

runRules [SQL file | List of SQL files | SQL files folder]

EXAMPLES

runRules git/sql/ddl/create_user_table.sql
OR
runRules git/sql/ddl/create_user_table.sql,git/sql/ddl/add_user_index.sql,git/sql/ddl/create_co_table.sql

OR
runRules "git/sql/ddl/create_user_table.sql;git/sql/ddl/add_user_index.sql;git/sql/ddl/create_co_table.sql"

OR
runRules git/sql/ddl

NOTES

Deployment Packager runs the runRules command as part of packaging and in preview mode.  You can use it to check SQL files before checking them in for packaging. 

The command must be run from a project directory: datical/<project>.

In the workspace (datical), the SQLRules directory is under the Rules directory in a project: datical/<project-name>/Rules/SQLRules.

Use commas or semicolons to separate lists of files passed to the command.  If semicolons are used, the list should surrounded by double quotes.


schemaStats

Display summary schema info. Shows summary info about the database model represented by the changelog.

USAGE

schemaStats



set

Set properties for the project and database. 

The set command provides help for the subcommands.

USAGE

set <property> <values>

set help

PROPERTIES

USAGE: set alternateSchema <schema name>

USAGE: set autoGenSQL true|false

USAGE: set dbprop [dbdef] [propertyName] [propertyValue]

EXAMPLE: set dbProp QDdb enableStorageOptions true

USAGE: set deployMode quick|full

USAGE: set deployThreshold stopOnError|stopOnWarn|deployAlways>

USAGE: set enableSqlParser true | false

USAGE: set externalStoredLogic <true|false>

USAGE: set forecastDML true | false 

USAGE: set invalidsCheck disabled|limited|local|global

USAGE: set limitForecast true|false

USAGE: set nlsLang <String>
EXAMPLE: set nlsLang SPANISH_SPAIN.WE8ISO8859P1

USAGE: set property [propertyName] [propertyValue]

EXAMPLE: set property drivers /path/to/driver/dir

USAGE: set requireOptions true|false

USAGE set runtimeCredentials true|false 

USAGE: set scriptExecutionTimeout <dbdefName> <seconds> 

USAGE: set storageOptionsScope <arg>

SEE ALSO

show command



show

Display properties of the project and Datical DB.

USAGE

show <property>

PROPERTIES

USAGE: show dbprop [dbdef] [propertyName]

USAGE: show property <propertyName>

USAGE: show scriptExecutionTimeout [dbdef] 

SEE ALSO

set command 



snapshot

Capture a snapshot of a database as either a persistent object file or a changelog

USAGE

snapshot <deploymentStep> [--format=dbobject|changelog][--output=][--ddlExcludeList=<object-list>][--snapshotSchemaList=<schema-list]

EXAMPLE

snapshot DEVdb --output=/home/user/snapshots/

OPTIONS

NOTES

If the current project is set to externalize stored logic, the stored logic is written to a Resources subdirectory. See the set command for a subcommand to see the values for a subcommand. within the date stamped directory created by the snapshot process.




status

Show the deployment status of a database.

USAGE

status [dbdef]

EXAMPLE

status QAdb

hammer --daticalServer=dmc_server_url --daticalUsername=user_name status datical_project_name

DATICAL SERVICE OPTIONS

Use these options to access a project that is stored on Datical Service. 

OPTIONS

OUTPUT

For each dbdef, the status reported is one of the following.

NOTES

The status command reports on all dbdefs (databases) in the project unless you specify an individual dbdef. 

Status is determined by comparing the changesets in the REF database (the changelog) to the changesets listed in the tracking tables for each database. 



statusDetails

Show the detailed status for each of the changesets in the changelog

USAGE

statusDetails <DbDef>

EXAMPLE

statusDetails QAdb

NOTES

If you run statusDetails without a DbDef, a message prompts you to provide one and lists the available DbDefs.

Changesets are shown in three categories: Deployed, Undeployed, Ignored. The total number if changesets in each state is shown. 

OUTPUT

Database:  Source

Deployed Change Sets: (1)
   ______________________________________________________________________________________
   | Change Set   | Contexts| Labels| DBMS| Date Run                    | Comments       |
   |=====================================================================================|
1. | BBB_Table1_id|         | table1|     | Fri Sep 29 17:21:40 CDT 2017| createTable    |
2. |              |         |       |     |                             | tableName=BBB_1|

Undeployed Change Sets: (1)
   ________________________________________________________________
   | Change Set   | Contexts| Labels| DBMS| Reason| Comments       |
   |===============================================================|
1. | BBB_Table2_id|         | table2|     | New   | createTable    |
2. |              |         |       |     |       | tableName=BBB_2|

Ignored Change Sets: (0)
  NONE




testConnect

Test the database connection for one or more databases.

USAGE

testConnect <DbDef>

EXAMPLE

testConnect QAdb

NOTES

If run without a DbDef, it tests the connections to all DbDefs in the project.



uninstallDrivers

Run the custom script uninstallDrivers.groovy. Removes JDBC drivers. 

USAGE

uninstallDrivers



uninstallLicense

Removes any installed DaticalDB licenses. 

USAGE

uninstallLicense



validateStoredLogic

Compile stored logic and report any validation errors.

USAGE

validateStoredLogic <dbdef>

OPTIONS




versionChangeLog

Upgrade project changelog to the current version.

USAGE

versionChangeLog [--force]

OPTIONS

NOTES

Required: the current directory is a valid project directory.

Output tells you the current version and upgraded version of the project changelog. 

You can only upgrade the changelog  version. Downgrading the version is not supported.