SQL Sever 2000 中未登录 Windows 的帐户的 Windows 身份验证

发布于 2024-07-07 02:53:38 字数 231 浏览 3 评论 0原文

使用 Windows 身份验证的一个优点是,我不需要提供用户名和密码来登录服务器,就像当前登录 Windows 的用户一样。 但在特定情况下,我想使用相同的 Windows Authenticated ODBC 连接以另一个用户身份登录 SQL Server。

那么,问题是:是否可以使用 Windows 身份验证登录 SQL Server,但不能以当前登录 Windows 的用户身份登录(没有询问用户名和密码的对话框)?

An advantage by using Windows Authentication is that I do not need to provide a username and password to log into the server as the user currently logged into Windows. But in a specific case I would like to log into the SQL Server as another user, using the same Windows Authenticated ODBC connection.

So, the question: Is it possible to log into an SQL Server using Windows Authentication, but not as the user currently logged into Windows (without a dialog asking for username and password)?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

悲凉≈ 2024-07-14 02:53:38

您的问题的简单答案是否定的,如果不显示对话框,则无法使用其他 Windows 帐户登录 SQL Server。

稍微复杂一点的答案是; 您可以通过右键单击查询分析器图标并选择“运行方式”以其他用户身份登录(显示一个对话框)(可能需要按住 CTRL 或 SHIFT 键才能显示“运行方式”。

还有 RUNAS 命令行可执行文件您可以查看它,这样您就可以创建一个包含 RUNAS 命令、凭据和查询分析器路径的快捷方式,这样就无需在执行时要求输入用户名或密码。

The simple answer to your question is no, without a dialog being presented, it's not possible to login to SQL Server using another Windows account.

The slightly more complex answer is; You can login as another user (WITH a dialog being presented) by right-clicking the Query Analyser icon and choosing "Run As" (Might require a CTRL or SHIFT key held down to make RUN AS appear.

There's also the RUNAS command line executable which you could look at, so you could create a shortcut that contains the RUNAS command, the credentials and the path to Query Analyser. That would eliminate being asked for a username or password on execution.

不一样的天空 2024-07-14 02:53:38

无论如何,如果您不使用登录用户的凭据,则需要传递其他凭据 - 除了直接请求它们之外,唯一的其他选择就是存储它们。

一旦您这样做了,对于这种特定情况,可能值得考虑混合模式身份验证并使用 SQL 登录/密码。

No matter what, if you are not using the credentials of the logged in user, you will need to pass other credentials--short of asking for them directly, the only other option is to store them..

And once you are doing that, it may be worth considering mixed-mode authentication and use SQL login/pw for this specific situation.

婴鹅 2024-07-14 02:53:38

Runas 不允许您在命令行上提供密码,并且会生成一个弹出窗口来收集密码。 但不是其预期用途。

稍微搜索一下,我就可以找到一篇关于 technet 的文章,该文章可能会有所帮助, noreferrer">http://technet.microsoft.com/en-us/library/bb727155.aspx
http://blogs.msdn.com/oldnewthing/archive/ 2004/11/29/271551.aspx

Runas does not let you provide a password on the command line and will produce a popup to gather it. A little searching let me to an artical on technet that may help out while not it's intended use..

http://technet.microsoft.com/en-us/library/bb727155.aspx
http://blogs.msdn.com/oldnewthing/archive/2004/11/29/271551.aspx

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文