开发者社区> 问答> 正文

數據庫帳戶的權限

如何在RDS中讓帳戶有Grant的權根?
在i.aliyun.com中所建立的數據庫帳號是怎樣的權限或角色?

展开
收起
foxtester01 2012-07-05 20:55:51 10435 0
2 条回答
写回答
取消 提交回答
  • Re數據庫帳戶的權限
    很抱歉,出于安全考虑,目前限制grant权限。但之后会考虑在时机成熟后放开。
    2012-07-06 10:19:37
    赞同 展开评论 打赏
  • Re數據庫帳戶的權限

    主要是遇到了這樣的錯誤訊息
    請問有人知道原因嗎?
    謝謝


    安装失败。


    异常:
    执行 SQL 文件“UninstallMembership.sql”时发生错误。SQL 错误号为 50000,SqlException 消息为: Current user foxtester01 have no permission .
    The transaction ended in the trigger. The batch has been aborted.
    Changed database context to 'sp4ff196a927cf8'.
    Cannot grant, deny, or revoke permissions to sa, dbo, entity owner, information_schema, sys, or yourself.


    ----------------------------------------
    故障的详细信息
    ----------------------------------------


    SQL Server:
    数据库: [sp4ff196a927cf8]
    加载的 SQL 文件:
    UninstallMembership.sql


    命令失败:


    USE [sp4ff196a927cf8]


    DECLARE @command nvarchar(4000)
    DECLARE @RemoveAllRoleMembersExits bit
    SET @RemoveAllRoleMembersExits = 0
    IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[aspnet_UnRegisterSchemaVersion]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
    BEGIN
        SET @command = 'GRANT EXECUTE ON [dbo].aspnet_UnRegisterSchemaVersion TO '   QUOTENAME(user)
        EXEC (@command)
    END
    IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[aspnet_Setup_RemoveAllRoleMembers]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
    BEGIN
        SET @RemoveAllRoleMembersExits = 1
        SET @command = 'GRANT EXECUTE ON [dbo].aspnet_Setup_RemoveAllRoleMembers TO '   QUOTENAME(user)
        EXEC (@command)
    END


    IF EXISTS ( SELECT * FROM sysusers WHERE issqlrole = 1 AND name = N'aspnet_Membership_FullAccess'  )
    BEGIN
      IF (@RemoveAllRoleMembersExits = 1)
         EXEC [dbo].[aspnet_Setup_RemoveAllRoleMembers] N'aspnet_Membership_FullAccess'
      EXEC sp_droprole N'aspnet_Membership_FullAccess'
    END


    IF EXISTS ( SELECT * FROM sysusers WHERE issqlrole = 1 AND name = N'aspnet_Membership_BasicAccess'  )
    BEGIN
      IF (@RemoveAllRoleMembersExits = 1)
         EXEC [dbo].[aspnet_Setup_RemoveAllRoleMembers] N'aspnet_Membership_BasicAccess'
      EXEC sp_droprole N'aspnet_Membership_BasicAccess'
    END


    IF EXISTS ( SELECT * FROM sysusers WHERE issqlrole = 1 AND name = N'aspnet_Membership_ReportingAccess'  )
    BEGIN
      IF (@RemoveAllRoleMembersExits = 1)
         EXEC [dbo].[aspnet_Setup_RemoveAllRoleMembers] N'aspnet_Membership_ReportingAccess'
      EXEC sp_droprole N'aspnet_Membership_ReportingAccess'
    END


    IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[aspnet_Membership_CreateUser]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
    DROP PROCEDURE [dbo].[aspnet_Membership_CreateUser]


    IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[aspnet_Membership_GetUserByName]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
    DROP PROCEDURE [dbo].[aspnet_Membership_GetUserByName]


    IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[aspnet_Membership_GetUserByEmail]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
    DROP PROCEDURE [dbo].[aspnet_Membership_GetUserByEmail]


    IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[aspnet_Membership_GetPassword]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
    DROP PROCEDURE [dbo].[aspnet_Membership_GetPassword]


    IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[aspnet_Membership_GetPasswordWithFormat]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
    DROP PROCEDURE [dbo].[aspnet_Membership_GetPasswordWithFormat]


    IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[aspnet_Membership_UpdateUserInfo]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
    DROP PROCEDURE [dbo].[aspnet_Membership_UpdateUserInfo]


    IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[aspnet_Membership_SetPassword]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
    DROP PROCEDURE [dbo].[aspnet_Membership_SetPassword]


    IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[aspnet_Membership_ResetPassword]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
    DROP PROCEDURE [dbo].[aspnet_Membership_ResetPassword]


    IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[aspnet_Membership_UpdateUser]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
    DROP PROCEDURE [dbo].[aspnet_Membership_UpdateUser]


    IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[aspnet_Membership_ChangePasswordQuestionAndAnswer]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
    DROP PROCEDURE [dbo].[aspnet_Membership_ChangePasswordQuestionAndAnswer]


    IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[aspnet_Membership_GetAllUsers]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
    DROP PROCEDURE [dbo].[aspnet_Membership_GetAllUsers]


    IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[aspnet_Membership_GetNumberOfUsersOnline]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
    DROP PROCEDURE [dbo].[aspnet_Membership_GetNumberOfUsersOnline]


    IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[aspnet_Membership_FindUsersByName]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
    DROP PROCEDURE [dbo].[aspnet_Membership_FindUsersByName]


    IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[aspnet_Membership_FindUsersByEmail]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
    DROP PROCEDURE [dbo].[aspnet_Membership_FindUsersByEmail]


    IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[aspnet_Membership_GetUserByUserId]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
    DROP PROCEDURE [dbo].[aspnet_Membership_GetUserByUserId]


    IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[aspnet_Membership_UnlockUser]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
    DROP PROCEDURE [dbo].[aspnet_Membership_UnlockUser]


    IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[aspnet_Membership]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
    DROP TABLE [dbo].[aspnet_Membership]


    IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[vw_aspnet_MembershipUsers]') AND OBJECTPROPERTY(id, N'IsView') = 1)
    DROP VIEW [dbo].[vw_aspnet_MembershipUsers]


    IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[aspnet_UnRegisterSchemaVersion]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
    BEGIN
        EXEC [dbo].aspnet_UnRegisterSchemaVersion N'Membership', N'1'
        SET @command = 'REVOKE EXECUTE ON [dbo].aspnet_UnRegisterSchemaVersion FROM '   QUOTENAME(user)
        EXEC (@command)
    END
    IF (@RemoveAllRoleMembersExits = 1)
    BEGIN
        SET @command = 'REVOKE EXECUTE ON [dbo].aspnet_Setup_RemoveAllRoleMembers FROM '   QUOTENAME(user)
        EXEC (@command)
    END


    PRINT '----------------------------------------------'
    PRINT 'Completed execution of UninstallMembership.SQL'
    PRINT '----------------------------------------------'




    SQL 异常:
    System.Data.SqlClient.SqlException: Current user foxtester01 have no permission .
    The transaction ended in the trigger. The batch has been aborted.
    Changed database context to 'sp4ff196a927cf8'.
    Cannot grant, deny, or revoke permissions to sa, dbo, entity owner, information_schema, sys, or yourself.
       在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
       在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
       在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
       在 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
       在 System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
       在 System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
       在 System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
       在 System.Web.Management.SqlServices.ExecuteFile(String file, String server, String database, String dbFileName, SqlConnection connection, Boolean sessionState, Boolean isInstall, SessionStateType sessionStatetype)

    -------------------------

    回2楼nono20011908的帖子
    目前還在試用中,售後能支持嗎?
    正試著把系統裝上去但遇到不少問題,
    還在評估中……
    2012-07-05 21:02:20
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
DTCC 2022大会集锦《云原生一站式数据库技术与实践》 立即下载
阿里云瑶池数据库精要2022版 立即下载
2022 DTCC-阿里云一站式数据库上云最佳实践 立即下载