Use sqlcmd with Scripting Variables - SQL Server ...
Implicitly Setting Scripting Variables. When you start sqlcmd with an option that has a related sqlcmd variable, the sqlcmd variable is set implicitly to the value that is specified by using the option. In the following example, sqlcmd is started with the -l option. This implicitly sets the SQLLOGINTIMEOUT variable. c:\> sqlcmd -l 60
DA: 58 PA: 87 MOZ Rank: 62