Command Reference > infacmd sql Command Reference > ExecuteSQL


Runs SQL statements that access an SQL data service.
Run infacmd sql ExecuteSQL in interactive or non-interactive mode. When you run ExecuteSQL in interactive mode, you can enter SQL statements without writing a script. When you use the interactive mode, enter the connect string without the -Sql option. You can run subsequent SQL statements without entering the connection information for each statement.
The infacmd sql ExecuteSQL command uses the following syntax:

<-ConnectString|-cs> connection_string

[<-Sql> sql_statement]
The following table describes infacmd sql ExecuteSQL options and arguments:
Required. Enter an SQL data service connect string with the following syntax:
<optional security domain\>
<optional user name>/
<optional user password>@
<domain host name>:
<domain HTTP port>?dis=
<Data Integration Service name>&sqlds=
<runtime SQL data service name>
Optionally, add options in the following format:
... &<option_name>=<option_value>
The connect string has the following option and value:
Disables result set caching for a SQL data service query when the SQL data service is configured to cache the result set.
Optional. Enter an SQL statement if you do not want to run in interactive mode.