--@ master
CREATE LOGIN [newuser] WITH PASSWORD=N'*****'
--@ database
CREATE USER [newuser] FOR LOGIN [newuser] WITH DEFAULT_SCHEMA=[dbo]
GO
EXEC sp_addrolemember N'db_owner', N'newuser'
sp_addrolemember 可以再調整成當前加入的帳號要給什麼權限,譬如唯讀等等REF
https://azure.microsoft.com/en-us/blog/adding-users-to-your-sql-azure-database/
沒有留言:
張貼留言