How to connect to SQL Server database using windows authentication remotely?

纵然是瞬间 提交于 2019-12-25 05:15:07

问题


I have a simple question, I was granted to a SQL Server database using windows authentication on my local machine, I need to know how to use this access on hosting server as well.

For example I am in the middle of writing some C# code that pulls data from this database, I can run this code on my local machine with my windows authentication no problem, but I can't run it on expected hosting server because that server obviously can't connect to that database.

I was just wondering how can I use windows authentication access remotely?

Thanks


回答1:


Windows authentication must be enabled on the remote server to do this. This can be enabled in server properties > Security and by selecting SQL Sever and Windows Aucthentication radio button. Providing your windows credentials are added to the server then you should be able to login.

On your SSMS right click the database name select properties and select Security from the left hand menu and there you should see the "SQL Sever and Windows Aucthentication" option.

Obviously if your database is not on the same domain then this might not work.



来源:https://stackoverflow.com/questions/11545252/how-to-connect-to-sql-server-database-using-windows-authentication-remotely

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