osql -S 服务器地址 -U user -P pwd -d 数据库 -i "GetAMSL.sql" >>log.txt
C:\Documents and Settings\benben>osql /?
用法: osql [-U login id] [-P password]
[-S server] [-H hostname] [-E trusted connection]
[-d use database name] [-l login timeout] [-t query timeout]
[-h headers] [-s colseparator] [-w columnwidth]
[-a packetsize] [-e echo input] [-I Enable Quoted Identifiers]
[-L list servers] [-c cmdend] [-D ODBC DSN name]
[-q "cmdline query"] [-Q "cmdline query" and exit]
[-n remove numbering] [-m errorlevel]
[-r msgs to stderr] [-V severitylevel]
[-i inputfile] [-o outputfile]
[-p print statistics] [-b On error batch abort]
[-O use Old ISQL behavior disables the following]
<EOF> 正在进行批处理
控制台宽度自动调整
宽消息
默认错误级别为 — 1 对 1
[-? show syntax summary]