[英]Create table permission denied in database java NetBeans
要创建表,您的用户必须对目标模式具有 ALTER 权限,并且对数据库具有 CREATE TABLE 权限。 这些权限可以由数据库所有者授予。
如果此 SQL 服务器实例正在您的 PC 上运行,请使用带有 Windows 的 SSMS 连接来自提升的 session 的集成身份验证,或使用 SA 帐户并授予目标用户权限。 连接到目标数据库运行
GRANT ALTER ON SCHEMA::DBO TO SomeUser
GRANT CREATE TABLE TO SomeUser
或者使该用户成为数据库级管理员
GRANT CONTROL TO SomeUser
要创建表,您的登录必须具有 db_owner 权限。 这些权限可以由数据库所有者授予。
1. Launch "SQL Server Management Studio"
2. Expand <servername> - 'Security' - 'Logins'
3. Double-click on SQL login 'fastnet' // u have to open your created login
4. Inside the section 'Server Roles' ensure that the ONLY options ticked are 'bulkadmin' and 'public'. Do NOT tick any other options.
5. Inside the section 'User Mapping' highlight the your database
6. Ensure that the option 'Map' is ticked
7. Inside the window 'Database role membership for <databasename>' ensure that 'db_owner' and 'public' are ticked. Do NOT tick any other options.
8. Save changes and exit, login again with your login then test.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.