terça-feira, 25 de outubro de 2011

Executar OSQL utilizando autenticação do Windows

osql -E -SSERVERNAME


-E = trusted authentication (your current windows user account)-S = Servername
OSQL -E -SSQLDB1
be aware that the osql is case sensitive
[BOL] "Running the osql Utility"
ps just for giggles i copied osql.exe into %systemroot%\system32 on a windows xp client in my home network (this client has no SQL Installation).i then used the above command to connect to my other pc(with SQL).works like a champ!


Fonte: http://www.dbforums.com/microsoft-sql-server/990644-win-nt-authentication-mode-sql-server-using-osql.html

Nenhum comentário: