Do you have a registered account configured as a user on SQL Server?
I usually work with certain accounts and SQL Server logins instead of trusted logins, and then I simply specify the database coordinates on the command line with the -S, -D, -U and -P options:
osql -S %SERVERNAME% -U %USERNAME% -P %PASSWORD% -d %DBNAME%
, - MyServer\SQL2008, - Foo, - Bar, - MyDB, :
osql -S MyServer\SQL2008 -U Foo -P Bar -d MyDB
.
, SQL Server Management Studio , Widows ..
SSMS (, ), "" node . Windows , , .
.