Sql server镜像登录创建 [英] Sql server mirror login creation

查看:87
本文介绍了Sql server镜像登录创建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在服务器中有一个数据库列表,我有一个登录名为Testuser。 Testuser对每个数据库都有不同的权限集。

我需要在数据库中创建一个具有与Testuser相同权限的用户Testuser2。在sql sevrer中是什么特定的sql脚本?



我尝试过:



I have a list of databases in the server and one i have one login as "Testuser". Testuser have different set of privilege for every database.
I need a user Testuser2 to be created in the database with the same privilege as Testuser. Is thr any specific sql script in sql sevrer ?

What I have tried:

I have a list of databases in the server and one i have one login as "Testuser". Testuser have different set of privilege for every database.
I need a user Testuser2 to be created in the database with the same privilege as Testuser. Is thr any specific sql script in sql sevrer ?

推荐答案

也许最简单的方法是在Management Studio中使用Object Explorer

- 连接到您的数据库

- 在安全/登录分支中选择您想要的登录并打开上下文菜单

- 选择脚本登录为/创建到/新的查询编辑器

- 扩展您使用的数据库

- 在您的数据库中选择安全/用户

- 并再次编写脚本用户



如果您需要使用脚本来转移登录,您可以在脚本所有登录/用户/和角色 - SQLServerCentral [ ^ ]
Perhaps the easiest way is to use Object Explorer in Management Studio
- Connect to your database
- In Security / Logins branch select the login you want and open the context menu
- Select Script login as / Create to / New query editor
- Expand the database you use
- In your database select Security / Users
- and again Script the user

If you need to use a script to transfer login, you can find one for example at Script All Logins / Users / and Roles - SQLServerCentral[^]


如何克隆SQL Server L ogin,第1部分,共3部分 [ ^ ]


这篇关于Sql server镜像登录创建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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