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"
RequiredArgumentDescription
Yes--n ConnectionNameSpecifies the name for the connection. The name can be anything you choose.
Yes--d DriverSpecifies 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 HostSpecifies the host name or IP address of the database server.
No--o PortSpecifies the network port to use for communication with the database server.
No--i InstanceSpecifies the database instance to connect to.
No--u UsernameThe username to use to connect to the database, if required.
No--p PasswordThe 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"