You can call this operation to query detailed information of databases.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes SearchDatabase

The operation that you want to perform. Set the value to SearchDatabase.

PageNumber Integer Yes 1

The number of the page to return.

SearchKey String Yes testdb

The keyword used to query databases.

Tid Long Yes -1

The ID of the tenant in Data Management (DMS) Enterprise.

DbType String No MySQL

The type of the database. For more information about the valid values, see the description of the RegisterInstance operation.

EnvType String No product

The type of the environment to which the database belongs.

PageSize Integer No 10

The number of entries to return on each page.

SearchRange String No HAS_PERMSSION

The permission on the database. Valid values:

  • HAS_PERMSSION: The current user has the permission for the database.
  • OWNER: The current user is the owner of the database.
  • MY_FOCUS: The current user follows the database.
  • UNKNOWN: No permission is required.
SearchTarget String No SINGLE_DB

The target database to query. Valid values:

  • DB: The database type is not limited.
  • SINGLE_DB: Only single databases are queried.
  • LOGIC_DB: Only logical databases are queried.

Response parameters

Parameter Type Example Description
ErrorCode String UnknownError

The error code.

ErrorMessage String UnknownError

The error message.

RequestId String E0D21075-CD3E-4D98-8264-FD8AD04A63B6

The ID of the request.


The detailed information of databases.


The detailed information of a database.

Alias String test

The alias of the database.

DatabaseId String 1

The ID of the database.

DatalinkName String datalink_name

The name of the data link for the database.

DbType String mysql

The type of the database.

DbaId String 1

The ID of the database administrator (DBA).

Encoding String utf8

The encoding format of the database.

EnvType String product

The type of the environment to which the database belongs.

Host String

The endpoint of the instance to which the database belongs.

Logic Boolean false

Indicates whether the database was a logical database.

OwnerIdList 1

The IDs of database owners.


The ID of a database owner.

OwnerNameList user1

The nicknames of database owners.


The nickname of a database owner.

Port Integer 3306

The connection port of the instance to which the database belongs.

SchemaName String test

The name of the database.

SearchName String

The query name of the database.

Sid String testSid

The system ID (SID) of the instance to which the database belongs.

Success Boolean true

Indicates whether the request was successful.

TotalCount Long 1

The total number of databases that met the query conditions.


Sample requests

http(s)://[Endpoint]/? Action=SearchDatabase
&<Common request parameters>

Sample success responses

XML format

            <OwnerNames>xx[RAM user]</OwnerNames>
        <Alias>xx offline database</Alias>
        <SearchName>[xx offline database]</SearchName>

JSON format

						"xx[RAM user]"
				"Alias":"xx offline database",
				"SearchName":"[xx offline database]",

Error codes

For a list of error codes, visit the API Error Center.