本文介紹了AWS RDS - MsSql - 在“master"中創建架構、用戶或角色或“msdb"數據庫的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
限時送ChatGPT賬號..
我使用的是 AWS RDS MsSql express V13.我正在嘗試使用我在 RDS 設置期間創建的 root 用戶創建架構、用戶和角色,但不能.我正在使用 SQL 客戶端.
I'm using AWS RDS MsSql express V13. I'm trying to create a schema, user and role using the root user I created during the RDS setup but can't. I'm using SQL client.
例如:
use [master]
CREATE USER [my_user] FOR LOGIN [my_login] WITH DEFAULT_SCHEMA=[dbo]
返回:用戶無權執行此操作."
returns: "User does not have permission to perform this action."
推薦答案
AWS RDS 限制對 master
數據庫的權限,因此您無法在那里創建架構、角色、用戶或登錄名.
AWS RDS restricts permissions on the master
database, so you can't create schemas, roles, users, or logins there.
您需要創建第二個數據庫,然后才能按預期創建架構、用戶和角色.
You need to create a second database, which will then allow you to create schemas, users, and roles as expected.
-- use the master database to create your new database:
USE master;
CREATE DATABASE db_test;
-- then, use your new database to create your schema, login, and user:
USE db_test;
CREATE SCHEMA yourschema;
CREATE LOGIN [youruser] WITH PASSWORD = '<PASSWORD>';
CREATE USER [youruser] FOR LOGIN [youruser] WITH DEFAULT_SCHEMA = [yourschema];
這篇關于AWS RDS - MsSql - 在“master"中創建架構、用戶或角色或“msdb"數據庫的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!