在SQL Server 2008中没有用户名和密码的Sqlcmd命令? [英] Sqlcmd command without username and password in SQL Server 2008?

查看:328
本文介绍了在SQL Server 2008中没有用户名和密码的Sqlcmd命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何以当前登录用户的身份自动运行传递给sqlcmd的命令,即无需输入用户名和密码?

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

我只想使用Windows身份验证.这是本地服务器.

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

谢谢

推荐答案

sqlcmd采用-E参数,这意味着使用受信任的连接" ... IOW,您的Windows凭据.

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

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

这篇关于在SQL Server 2008中没有用户名和密码的Sqlcmd命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆