Get Database Information by Id or Name
Name
get_database
Description
Gets a database by its Id. [API reference]
Related Tables
Parameters
Parameter | Label | Required | Options | Description |
---|---|---|---|---|
Id | Database Name (keep blank to use default) Case-Sensitive | YES | Leave blank to use default DB set on connection screen |
Output Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Raw | Description |
---|---|---|---|---|---|
Id |
DT_WSTR
|
nvarchar(255)
|
255 | False |
The unique name that identifies the collection. |
ResourceId |
DT_WSTR
|
nvarchar(2000)
|
2000 | False |
System generated property. The resource ID is a unique identifier that is also hierarchical per the resource stack on the resource model. It is used internally for placement and navigation of the permission resource. |
LastUpdated |
DT_I4
|
int
|
False |
System generated property. Specifies the last updated timestamp of the resource. | |
ETag |
DT_WSTR
|
nvarchar(4000)
|
4000 | False |
System generated property representing the resource etag required for optimistic concurrency control. |
Collections |
DT_WSTR
|
nvarchar(4000)
|
4000 | False |
|
Users |
DT_WSTR
|
nvarchar(4000)
|
4000 | False |
Input Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Raw | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
There are no Static columns defined for this endpoint. This endpoint detects columns dynamically at runtime. |
Examples
SSIS
Use Cosmos DB Connector in API Source component to read data or in API Destination component to read/write data:
Lookup a row in SysDatabases table using API Destination
This Endpoint belongs to SysDatabases table, therefore you cannot work with it directly. Use this table and table-operation pair instead:

ODBC application
Use these SQL queries in your ODBC application data source:
Get database information by id or name
SELECT * FROM get_database
WHERE Id = 'abcd-1234-id'
get_database
endpoint belongs to
SysDatabases
table(s), and can therefore be used via those table(s).
SQL Server
Use these SQL queries in SQL Server after you create a data source in Data Gateway:
Get database information by id or name
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM get_database
WHERE Id = ''abcd-1234-id''';
EXEC (@MyQuery) AT [LS_TO_COSMOS_DB_IN_GATEWAY];
get_database
endpoint belongs to
SysDatabases
table(s), and can therefore be used via those table(s).