Logo
Use of License in DBPlusEngine-Driver

Use of License in DBPlusEngine-Driver #

Background #

Function of LicenseDescription
limit durationLimit the duration of DBPlusEngine.
limit resourcesLimit the number of storage nodes created by the DBPlusEngine.
limit ProxyLimit the number of instances created by DBPlusEngine-Proxy in a single cluster.
limit DriverLimit the number of instances created by DBPlusEngine-Driver in a single cluster.
limit versionsLimit the version of the DBPlusEngine instance in a stand-alone or cluster.
MAC address of the hardware deviceLimit the MAC address of the hardware device on which the computing nodes in the cluster.

Configuration Method #

JAVA API #

Import Maven Dependency #

<dependency>
    <groupId>com.sphere-ex</groupId>
    <artifactId>shardingsphere-jdbc-core</artifactId>
    <version>${dbplusengine.version}</version>
</dependency>

Configuration Example #

Class name: com.sphereex.dbplusengine.license.config.LicenseRuleConfiguration

Attributes:

NameDataTypeDescription
licenseStringlicense registration code

YAML #

Import Maven Dependency #

<dependency>
    <groupId>com.sphere-ex</groupId>
    <artifactId>shardingsphere-jdbc-core</artifactId>
    <version>${dbplusengine.version}</version>
</dependency>

Configuration Example #

databaseName:

mode:

dataSources:

rules:

license: xxx

SpringBoot #

Import Maven Dependency #

<dependency>
    <groupId>com.sphere-ex</groupId>
    <artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
    <version>${dbplusengine.version}</version>
</dependency>

Configuration Example #

spring.dbplusengine.rules.license: xxx

Spring Name Space #

Import Maven Dependency #

<dependency>
    <groupId>com.sphere-ex</groupId>
    <artifactId>shardingsphere-jdbc-core-spring-namespace</artifactId>
    <version>${dbplusengine.version}</version>
</dependency>

Configuration Example #

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:license="https://www.sphere-ex.com/schema/dbplusengine/license"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
                           http://www.springframework.org/schema/beans/spring-beans.xsd
                           https://www.sphere-ex.com/schema/dbplusengine/license
                           https://www.sphere-ex.com/schema/dbplusengine/license/license.xsd
                           ">
    <license:license id="license" license="xxx"/>
</beans>

Post-processing #

If the following error occurs, please obtain the latest license and update the license.

  • No license prompt
FATAL:  License not registered
  • Incomplete license prompt
FATAL:  Incomplete license
  • License expiration prompt
FATAL:  License is expired
  • Illegal license prompt
ERROR:  The xxx exceeds the limit of the license

No License or Performance After License Overrun #

  • Can start cluster unable to execute RDL, RUL, and RAL, can execute a small amount of RQL
  • DistSQL with the global release
  1. SHOW STORAGE UNITS
  2. SHOW *
  3. COUNT * RULES
  4. EXPORT DATABASE CONFIGURATION
  5. CONVERT YAML CONFIGURATION
  6. REGISTER LICENSE
  7. Transaction-related standard statements
  • The number of instances exceeds the limit and can be executed
  1. SET INSTANCE STATUS
  • DB’s SQL statement cannot be executed