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

/commandTimeout=<seconds>
/connectionTimeout=<seconds>
/noTransaction
/noWarnings
/parse
/prepare
/trace

Web Request Options

/accept=<accept>
/acceptEncoding=<value>
/contentType=<contentType>
/delay=<milliseconds>
/header=<header>
/method=AUTO | GET | POST | PUT | PATCH | MERGE | DELETE | HEAD
/pages=<pages>
/pageNumberDigits=<integer>
/postData=<string> | <file name>
/referrer=<referrer>
/timeout=<milliseconds>
/userAgent=<useragent>

Authentication Options

/accessToken=<token>
/accessTokenUrl=<URL>
/auth=Auto | None | Basic | Windows | Forms | OAuth1 | OAuth2 | Custom
/authCode=<code>
/authorizationHeader=<value>
/authorizationUrl=<URL>
/authorizationUrlFormat=<URL format>
/authUri=<URL>
/callback=<URI>
/clientId=<clientId>
/clientJson=<filename>
/clientSecret=<clientSecret>
/code=<code>
/consumerKey=<consumerKey>
/consumerSecret=<consumerSecret>
/cookie=<cookie>
/cookieFile=<filename>
/expiresIn=<seconds>
/getTokenBodyFormat=<body format>
/getTokenUrl=<URL>
/getTokenUrlFormat=<URL format>
/grantType=<type>
/interactive=<[true | false]>
/oauthExpiresIn=<seconds>
/oauthSessionHandle=<value>
/oauthToken=<token>
/oauthTokenSecret=<token secret>
/password=<password>
/redirectUri=<URI>
/redirectUris=<URI>
/refreshToken=<token>
/refreshTokenBodyFormat=<body format>
/refreshTokenUrl=<URL>
/refreshTokenUrlFormat=<URL format>
/requestTokenUrl=<URL>
/responseType=<type>
/revokeTokenBodyFormat=<body format>
/revokeTokenUrl=<URL>
/revokeTokenUrlFormat=<URL format>
/scope=<scope>
/serviceJson=<filename>
/tokenFields=<fields>
/tokenJson=<filename>
/tokenType=<type>
/tokenUri=<URL>
/urlParameters=<value>
/username=<username>
/validTo=<datetime>

Execution Options

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

Service Options

/echo
/echoInputFileName
/echoOutputFileName
/echoPostData
/echoUrl
/echoWidth=<width>
/hideWindow
/minimizeWindow
/openOutput

SQL Options

/columnNameQuote=[<quote>]
/[commands=]insert | update | delete | merge | knex
/groupSize=<number of rows>
/insertIdentity
/insertNulls
/keys=<field>[;...]
/objectNameQuote=[<quote>]
/printTotals[=true | false]
/table=<table | view | stored procedure | SQL template file>
/truncate

Parser Options

/asIs
/attributedColumns=<col>.<attr>[;...]
/collapsedNodes=<node>[;...]
/firstRow=<first row>
/firstRowHasNames
/hasRowNum
/ignoredTags=<tag>[;...]
/inputCodepage=<codepage>
/inputDateFormat=DMY | MDY
/inputSeparator=<separator> | Tab
/keptNodes=<node>[;...]
/noSourceHeaders
/numberFields=<field>[;...]
/requiredColumns=<name>[;...]
/rootPath=<path>[;...]
/skippedNodes=<node>[;...]
/stringFields=<field>[;...]

Formatting Options

/add=<header>=<value | function>[;...]
/addRowNum
/dateFormat=<format>
/dateTimeFormat=<format>
/escapeChar=<char>
/lowerCase
/noBOM
/noHeaders
/noRound
/outputCodepage=<codepage>
/outputCulture=<name>
/[outputFormat=]asText | asTxt | asCsv | asHtm | asHtml | asXml | asJson
/[[output]Separator](formatting-options.htm#option-outputSeparator)=<separator> | Tab
/quoteChar=<char>
/relative
/rowNumBase=<integer>
/rowValues
/timeFormat=<format>
/upperCase
/xmlRoot=<name>
/xmlRow=<name>

Template Options

/noTemplate
/placeholder=<placeholder>
/template=<file name>
/title=<title>

HTML Cleaner Options

/autoCorrectedTags=<tag>[;...]
/cleanHtml
/cutAttributes=<attribute>[;...]
/cutComments
/cutIDs=<id>[;...]
/cutScripts
/cutStyles
/cutTags=<tag>[;...]

Exit Codes

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