sql run-sql
Run SQL Query
Description
run sql query in the given host MySQL, PostgreSQL, or SQL Server instanc
Synopsis
Arguments
site
- (string)
Site where this command will be executed
Example: --site "site-1"
Default: input.site
Attributes: required
host
- (string)
Host name for database instance
Example: --host "host-1"
Default: _None_
Attributes: required
query
- (string)
Sql Query
Example: "select * from accounts"
Default: _None_
Attributes: required
Examples
sql run-sql --host "host-1" "select * from accounts"
Access Control
To use this command, you need access to the following:
Field | Value |
---|---|
Action | "read" |
Service Type | "sql" |
Service Instance | host |
Namespace | |
Object Type | "query" |
Object ID |
Please see Access Control for details.