Sqlcmd command without username and password in SQL Server 2008?

浪尽此生 提交于 2019-12-23 07:27:27

问题


How can I run commands, passed to sqlcmd, as currently logged on user automatically i.e without having to enter username and password?

I want to use Windows Authentication only. It is a local server.

Thanks,


回答1:


sqlcmd takes the -E argument, which means, "Use Trusted Connection"... IOW, your windows credentials.

http://msdn.microsoft.com/en-us/library/ms162773.aspx



来源:https://stackoverflow.com/questions/15701829/sqlcmd-command-without-username-and-password-in-sql-server-2008

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!