You can use the ALTER DATABASE
syntax to change attributes or add new attributes for a LindormTSDB database.
Applicable engines and versions
The ALTER DATABASE syntax is applicable only to LindormTSDB. The ALTER DATABASE syntax is supported by all versions of LindormTSDB.
Syntax
alter_database_statement ::= ALTER DATABASE database_identifier [ WITH attribute_statement ]
attribute_statement ::= '(' attribute_definition (',' attribute_definition)* ')'
attribute_definition ::= attr_identifier '=' attr_val
Parameters
The ALTER DATABASE syntax can be used to change only the attributes but not the name of a database.
Database attributes (attribute_definition)
You can use the WITH
keyword in the ALTER DATABASE statement to specify the attributes that you want to change. Example: WITH (ttl=60, cold_boundary=30)
.
For more information about the attributes that you can change, see the description of the attribute_definition parameter in CREATE DATABASE.
Examples
Change the TTL of the database DB1 to 40 days.
ALTER DATABASE DB1 WITH (ttl=40);