How can we help you?
Force Sync
Datical DB includes a forceSync
command that can be executed from the CLI and GUI. The forceSync
command refreshes the DMC DB with the version of the changelog that is available on the client from which the command is executed.
You can use the forceSync
command to force the resynchronization to DMC DB using the files that are currently active in the workspace. The command will help to resynchronize the changelog with the DMC backend and to correct the status of issues that may arise when an old or non-standard version of the changelog has been used to determine the status.
Prerequisites for using Force Sync
- The
forceSync
command must be in the context of a project that is already registered with the Deployment Monitoring Console. See Configuring a Project to Use the DMCDB.
- If the project is configured to use Runtime Credentials, ensure that the appropriate environment variables are set with credentials for the DMC DB DMC environment variables
DDB_DMCDB_USER=<DMCDB username>
DDB_DMCDB_PASS=<DMCDB password>
Executing the forceSync
command in the CLI
To run the forceSync
command, open your CLI and enter the following:
# Change to the project directory
cd /path/datical/myProject
# Execute the Command
hammer forceSync
or use the --project
CLI parameter to indicate the project for which you want to run the command without changing directory:
hammer --project=<path to your project> forceSync
Using Force Sync in the GUI
To use the Force Sync capability in the Datical DB GUI, perform the following:
- Choose the needed pipeline and go to Settings located above the Console tab.
-
Select DMC Database, and then select Force Sync.
Note: If your DMC database is not configured and the project is not registered, the Force Sync
button will be inactive. Thus, select Configure DMC DB, and after configuring it, select Register Project. You can also configure your DMC database and register your project by referring to Install and Register your Project with DMC documentation.
dbDef
, dmcDbDef
, and Force Sync
dbDef
and dmcDbDef
are XML tags in the datical.project
file. Each dbDef
tag defines the connection information to one database. See the example:
<dbDefs xsi:type="dbproject:SqlServerDbDef" name="DEV"
driver="com.microsoft.sqlserver.jdbc.SQLServerDriver"
hostname="demo.datical.net" port="1433" username="DATICAL_USER"
password="xxxxxxx" contexts="DEV" storageOptionCollectedAtSnapshot="true"
labels="release" dbDefsId="eded7b74-25be-3ef4-bd03-c85a7a98f7a9"
databaseName="DEMO" integratedSecurity="false" applicationName="Datical DB"/>
dmcDbDef
defines the connection information to the DMC database, which is related to a PostgreSQL database in the following example:
<dmcDB xsi:type="dbproject:PostgresqlDbDef" name="DMCDB"
driver="org.postgresql.Driver" hostname="postgres.datical.net" port="5432"
username="postgres" password="xxxxxxx" dbDefType="dmcdb"
database="datical_dmc"/>
When running the forceSync
command, the information from dmcDbDef
is used to first connect to the DMC database. Once the connection is established, then the information from all dbDef
tags is sent to the DMC database. This new information is now used to build the DMC dashboards where blocks represent each dbDef
: