There are three commands to manage datasources.
cfconfig datasource listcfconfig datasource list from=serverNamecfconfig datasource list from==/path/to/server/home
To receive the data back as JSON, use the --JSON
flag.
cfconfig datasource list --JSON
Add a new datasource or update an existing datasource. Existing datasources will be matched based on the name. Valid dbdriver options are
MSSQL -- SQL Server driver
MSSQL2 -- jTDS driver
PostgreSql
Oracle
Other -- Custom JDBC URL
MySQL
cfconfig datasource save name=myDSN dbdriver=mysql host=localhost port=3306 database=myDB username=brad password=foobarcfconfig datasource save name=myDS ... to=serverNamecfconfig datasource save name=myDS ... to=/path/to/server/home
Identify the datasource uniquely by the name.
cfconfig datasource delete foocfconfig datasource delete foo serverNamecfconfig datasource delete foo /path/to/server/home