有没有一个简单的工具可以将用户添加到 SQL Server 数据库?
我正在寻找一种简单的工具,最好是可以与我的应用程序一起重新分发的工具,非技术最终用户可以使用该工具将用户(以及必要时的登录名)添加到特定的 SQL Server(快递)数据库。
显然 SSME 会完成这项工作,但我不想要求用户安装如此重量级的东西。
我很清楚如何使用 SQL 管理对象自己编写此内容,但是我正在寻找预先构建的东西。
有任何想法吗?
I'm looking for a simple tool, preferably one that I can redistribute with my application, that non-technical end-users can use to add users (and logins if necessary) to a particular SQL Server (Express) database.
Obviously SSME will do the job, but I don't want to require users to install something so heavy-weight.
I have a good idea how I would write this myself using SQL Management Objects, but I'm looking for something pre-built.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
老实说,我不希望您能够找到这样的工具 - 它的范围太窄 - 您想要具有创建和编辑登录名/用户的功能的东西,但对于外行来说足够简单。 你愿意在这样的人手中拥有如此强大的工具吗? 除了 SSMS 之外,还有许多用于 SQL Server 的第 3 方客户端,但您需要一些易于使用和锁定的东西 - 我只是没有看到它发生。
然而,我可能是错的——仅仅因为我没有遇到过这样的事情,并不意味着它们不存在。
我不明白为什么您不能在应用程序中构建简单的功能来添加新用户/登录名。 这似乎是最明智的建议。 除了 SMO 之外,还有什么原因导致您无法使用 CREATE LOGIN/CREATE USER T-SQL 命令吗?
创建用户
创建登录
To be honest, I wouldn't expect you to be able to find such a tool - the scope of it is too narrow - you want something with the power to create and edit Logins/Users, but be simple enough for laymen. Would you want such a powerful tool in the hands of such people? Apart from SSMS, there will be a number of 3rd Party clients for SQL Server, but you need something simple to use and locked down - I just don't see it happening.
However, I might be wrong - just because I haven't come across such a thing, it doesn't mean they don't exist.
I don't see why you can't build simple features into your application to add new users/logins. It seems the most sensible suggestion. Apart from SMO, is there any reason why you couldn't use CREATE LOGIN/CREATE USER T-SQL commands?
Create User
Create Login
您可以使用托管 .NET 库SQL Server 管理对象(简称 SMO)。 我认为它们是随 .NET Framework 2.0 一起提供的。 所以依赖关系应该没有问题。
SMO 使您可以完全控制 SQL Server。 MS SQL Server Management Studio 也是基于这些库编写的。
You can write you own tool using the managed .NET Libraries SQL Server Management Objects (short SMO). They are shipped with .NET Framework 2.0 i think. So it should be no problem with dependencies.
SMO gives you full control over SQL Server. MS SQL Server Management Studio is also written based on these libraries.
编辑:据我所知,什么也没有。 人们通常将其构建到他们的应用程序中。
edit: There is nothing, from what I can see. People normally build it into their application.