如何创建SQL数据库用户(对于来自一个订阅的多个用户)Microsoft azure [英] How can I create SQL database user (for multiple user from one subscription) Microsoft azure

查看:112
本文介绍了如何创建SQL数据库用户(对于来自一个订阅的多个用户)Microsoft azure的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何创建SQL数据库用户(适用于多个用户的一个订阅)Microsoft Azure



我尝试过:



我如何创建SQL数据库用户(针对多个用户来自一个订阅)Microsoft Azure

How can i create SQL Database User (for Multiple User from One Subscription) Microsoft Azure

What I have tried:

How can i create SQL Database User (for Multiple User from One Subscription) Microsoft Azure

推荐答案

您可以为此目的创建登录或用户。

如果创建登录,则登录可以访问该服务器上的所有数据库。

您可以使用此T-SQL语句创建登录

You can either create Login or users for the purpose.
If you create a Login, then the login can access all the databases across that server.
You can use this T-SQL statement to create a Login
CREATE LOGIN readonlylogin WITH password='1234567';





或者您可以为数据库创建用户。 TSQL是



Or you can create a user for the database. The TSQL is

CREATE USER readonlyuser FROM LOGIN readonlylogin; 





您还可以使用以下T-SQL为用户设置权限



You can also set permission to the user by using following T-SQL

EXEC sp_addrolemember 'db_datareader', 'readonlyuser';


这篇关于如何创建SQL数据库用户(对于来自一个订阅的多个用户)Microsoft azure的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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