Set metadata with CCC
Prerequisites
Before setting metadata using CCC, you must first follow the steps outlined in Setting up a CCC node to ensure your scripting node is properly connected to the domain and approved.
Defining metadata
Metadata is defined in a properties-style file. By default, the file used is called metadata.properties
, but this can be changed using an optional argument.
The format of the file is simple key=value pairs separated by line breaks or semicolons. Here is an example:
env=prod
team=finance
costcenter=EU
Executing the script
The metadata update is run using the metadata.script
file found in the CCC script package.
Basic command (using default file):
./ccc.sh metadata.script --instance=mydb01
Command using a custom metadata file:
./ccc.sh metadata.script --instance=mydb01 --file=my_metadata.properties
Parameters supported
Parameter | Description |
---|---|
instance | The name of the instance to assign metadata to (required) |
file | (Optional) Path to a metadata file (default is ‘metadata.properties’) |
If the script completes successfully, the specified metadata will be updated for the instance in the dbWatch Control Center domain.