使用Windows身份验证连接到SQL Server [英] Connect to SQL Server with windows authentication

查看:88
本文介绍了使用Windows身份验证连接到SQL Server的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

简要背景:我正在创建一个Web应用程序,需要此应用程序从SCOM 2012 DB(SQL Server 2012)中提取数据,此数据库仅设置为Windows身份验证,在可预见的将来,由于该公司不愿意这样做,因此不会更改./p>

问题:我已经在这个问题上进行了广泛的探索,但是我找不到解决方案.我需要创建一个与以特定Windows用户身份运行的数据库的连接,以拉回数据.为了清楚起见,我不想假冒最终用户使用Web应用程序.我拥有我要用于此帐户的凭据,但是如果可能的话,我需要一些帮助!

解决方案

如果公司位于域中,并且运行iis的用户在SQL Server上具有权限,那么您所要做的就是使用Windows身份验证,仅此而已

签出: http://msdn.microsoft.com/zh-us/library/2xzyzb0f(v = vs.100).aspx

A brief background: I am creating a web application and need this to pull data from SCOM 2012 DB(SQL Server 2012), this DB is set to Windows Authentication only, this will not be changed in the foreseeable future as the company are unwilling to do this.

Problem: I have looked around extensively on this issue however I am unable to find a solution. I need to create a connection to the DB running as a specific windows user to pull back to data. To make this clear I do not want to impersonate the end user using the web app. I have the credentials for the account I would like to use for this however I need some assistance in doing this if its possible!

解决方案

If the company is inside a domain, and the user running the iis has permisions on the SQL Server, all you have to do is use windows authentication and that's it.

Check out: http://msdn.microsoft.com/en-us/library/2xzyzb0f(v=vs.100).aspx

这篇关于使用Windows身份验证连接到SQL Server的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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