gsqlcmd Command-Line Reference

gsqlcmd Command-Line Reference

Modes and Positional Parameters

gsqlcmd [help [chm | online]]

gsqlcmd [exec]       <connection>  [<input> [<output>]]
gsqlcmd import       <connection>  [<input> [<output>]]
gsqlcmd make         <connection>  [<input> [<output>]]
gsqlcmd convert                    [<input> [<output> [<output2>]]]
gsqlcmd download                   [<input> [<output>]]

where <input>:
  exec      <table> | <view> | <query> | <file> | <mask> | @[<task>] | <command>
  import       [<connection>::]<query> | <file> | <mask> | @[<task>] | <url>
  make         [<connection>::]<query> | <file> | <mask> | @[<task>] | <url>
  convert                      <query> | <file> | <mask> | @[<task>] | <url>
  download                                               [@][<task>] | <url>

gsqlcmd make-fmt+          <input csv file>
gsqlcmd make-fmt          [<input csv file>    [<output>]]
gsqlcmd make-create       [<input csv file>    [<output>]]
gsqlcmd make-select       [<input csv file>    [<output>]]
gsqlcmd make-ace           <input csv file>    [<output>]
gsqlcmd make-bulk          <input csv file>    [<output>]
gsqlcmd make-ini           <input csv file>    [<output>]

gsqlcmd get-token         [<output>]
gsqlcmd refresh-token     [<output>]
gsqlcmd revoke-token      [<output>]
gsqlcmd get-authcode      [<output>]

gsqlcmd get-schema         <connection> [<query | file | collection> [<output>]]

gsqlcmd create-database    <connection>

gsqlcmd edit-connections
gsqlcmd show-connections
gsqlcmd show-connection    <connection> [<connection property>]
gsqlcmd show-providers

gsqlcmd show-roots        [<input file | mask> [<output>]]
gsqlcmd show-html-tables  [<input file | mask> [<output>]]
gsqlcmd clean-html        [<input file | mask> [<output>]]

gsqlcmd del-if-html        <input file | mask>
gsqlcmd del-if-empty       <input file | mask>

gsqlcmd sleep              <milliseconds>
gsqlcmd stamp             [<datetime format>]

gsqlcmd version           [<minimal version>]

gsqlcmd hide-window
gsqlcmd show-window
gsqlcmd minimize-window
gsqlcmd restore-window

gsqlcmd auto-update
gsqlcmd register

SQL Request Options


Web Request Options

/postData=<string> | <file name>

Authentication Options

/auth=Auto | None | Basic | Windows | Forms | OAuth1 | OAuth2 | Custom
/authorizationUrlFormat=<URL format>
/getTokenBodyFormat=<body format>
/getTokenUrlFormat=<URL format>
/interactive=<[true | false]>
/oauthTokenSecret=<token secret>
/refreshTokenBodyFormat=<body format>
/refreshTokenUrlFormat=<URL format>
/revokeTokenBodyFormat=<body format>
/revokeTokenUrlFormat=<URL format>

Execution Options

/formatFile=<format file>
/limit=<number of rows>
/[location=]local | user | app
/offset=<number of rows>
/[serverType=]mssql | sqlce | mysql | oracle | db2 | nuodb | pgsql | snowflake | sqlite | foxpro | dbf | excel | csv
/set=<parameter>=<value | function>[;...]
/taskFile=<file name>

Service Options


SQL Options

/[commands=]insert | update | delete | merge | knex
/groupSize=<number of rows>
/printTotals[=true | false]
/table=<table | view | stored procedure | SQL template file>

Parser Options

/firstRow=<first row>
/inputDateFormat=DMY | MDY
/inputSeparator=<separator> | Tab

Formatting Options

/add=<header>=<value | function>[;...]
/[outputFormat=]asText | asTxt | asCsv | asHtm | asHtml | asXml | asJson
/[[output]Separator](formatting-options.htm#option-outputSeparator)=<separator> | Tab

Template Options

/template=<file name>

HTML Cleaner Options


Exit Codes

Exit CodeDescription
1Incomplete command line parameters
2Invalid command line parameters
3Application exception
4Data source error
>200HTTP status code