SQLCMD Import Big Data files
SQLCMD allows you to run scripts from a command-line prompt in the Windows command window.
The syntax is as follows:
sqlcmd
[
{-U <login id> [-P <password>]} |-e}
]
[-S <server> [\<instance >]] [-H <workstation>] [-D <database>]
[-L <time out>] [-t <time out>] [-H [-S <col separator>] [-W <col width>] [-A <packet size>]
[-E] [-I.]
[-C <cmd end>] [-l [C]] [-Q "<query>"] [-Q "<query>"]
[-M <error level>] [-V] [-W] [-u] [-R [0 | 1]]
[-I <input file>] [-O <output file>]
[-F <codepage> | i:<codepage> [<, O: <codepage>]
[-K [1 | 2]]
[-y <display width>] [-y <display width>]
[-P [1]] [-R] [-B] [-V] [-A] [-X [1]] [-X]
[ -? ]
]
Sqlcmd-usa-pmypassword-q "SELECT * from DatabaseName. TableName
Where-Q uppercase and-Q lowercase are distinguished, queries are executed, but the former will exit sqlcmd when the query is completed, while the latter will not.
Execute SQL Script:
D:\install>sqlcmd-usa-p123456-i Testsql.sql
SQLCMD Import Big Data files