应用程序和SQL Server之间的通信层 [英] Communication Layer between Application and SQL Server

查看:108
本文介绍了应用程序和SQL Server之间的通信层的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我只是想知道我正在寻找的术语,所以我可以对其进行进一步的研究.

说我有一个连接到SQL Server的C#应用​​程序通过连接字符串位于网络中的某个位置.两者之间发生的通信层/协议是什么?确保将连接字符串中指定的计算机名称首先转换为IP地址,因此肯定事先发生了DNS查询.它怎么知道应用程序被允许访问数据库?是代表用户登录到正在运行该应用程序的计算机吗?

有人可以帮我一下吗?


谢谢.

Hi,

I just wanted to know the term I am looking for what it is called so I can research further.

Say I have an C# application that connects to an SQL server located somewhere in a network via connection string. What is the communication layer/protocol that happens in between? For sure the machine name specified in the connection string is converted to an IP address first so there definitely is a DNS query happening beforehand. How does it know that the application is allowed to access the database? Is it in behalf of the user logged in to the machine where the application is being run?

Can anyone shed some light for me on this?


Thank you.

推荐答案



有趣的好问题,答案又是如何进行客户端/服务器通信的??,当您想与SQL Server进行默认通信时,它将在tcp/ip端口1433上侦听...以及是否将sql server配置为允许远程连接. ..then客户端可以通过在框中指定实例的名称来与sql server通信...

从连接字符串中...如果提供的凭据有效,则将授予他使用数据库的权限,否则他将不会.

希望对您有所帮助!.

问候,
-Vinayak
Hi,

Good interesting question, The answer again lies how client/Server communication happens?, when you want to communicate to SQL server by default it listens on tcp/ip port 1433...and if you configure your sql server for allow remote connections....then the client can communicate to the sql server by specifying the name of the instance on a box .....

From the connection string...if the provided credentials are valid then he will be given access to use the database else he wont.

I hope this helps!.

Regards,
-Vinayak


您指的是数据访问层(DAL),DAL有许多不同的样式和类型,包括Microsoft的模式.

我通常为每个应用程序(数据库)创建一个标准的SQL ID(用户名和密码),这使您可以管理应用程序内部的用户并扩展凭据功能,而不必涉及活动目录.我发现这是个人喜好.
You are referring to a Data Access Layer (DAL), there are many different styles and types of DAL including a pattern from Microsoft.

I usually create a standard SQL ID (userid and password) for each application (database), this allows you to manage your users internal to the app and extend the credential functionality without having to involve active directory. This is a personal preference I have found useful.






这篇关于应用程序和SQL Server之间的通信层的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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