使用c#创建SQL Server用户 [英] create SQL Server users using c#

查看:263
本文介绍了使用c#创建SQL Server用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否可以使用C#创建SQL用户。如果可能的话,我将如何做到这一点。

解决方案

是 - 连接到服务器,并使用SQL 创建登录 [ ^ ]创建它们,然后创建用户 [ ^ ]以授予权限

I would like to know if it is possible to create a SQL user using C#. If this is possible how would i go about doing this.

解决方案

Yes - connect to the server, and use SQL CREATE LOGIN[^] to create them, then CREATE USER[^] to give the permissions.


这篇关于使用c#创建SQL Server用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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