dbconnection add

The dbconnection add command creates a connection between Spectrum™ Technology Platform and a database.

Usage

dbconnection add --n ConnectionName --d Driver --h Host --o Port --i Instance --u Username --p Password --l "property:value"
Required Argument Description
Yes --n ConnectionName Specifies the name for the connection. The name can be anything you choose.
Yes --d Driver Specifies the driver for the type of database you want to connect to. To view a list of database drivers available on your server, use the dbdriver list command.
Yes --h Host Specifies the host name or IP address of the database server.
No --o Port Specifies the network port to use for communication with the database server.
No --i Instance Specifies the database instance to connect to.
No --u Username The username to use to connect to the database, if required.
No --p Password The password to use to connect to the database, if required.
No --l "property:value" Specifies a comma-separated list of connection property and value pairs for the driver. To view the list of valid properties for a driver, open Management Console, go to Resources > Data Sources, then click the Drivers tab. Select the driver you want then click the Edit button to view its connection properties.

Example

This example creates a connection to a database located on the host MyServer. The name of the connection will be NorthernRegionCustomers. It will use the driver ExampleSQLDriver which takes two connection properties: ExampleProp1, which is given a value of 123, and ExampleProp2, which is given a value of 456.

dbconnection add --n NorthernRegionCustomers --d ExampleSQLDriver --h MyServer --l "ExampleProp1:123,ExampleProp2:456"