Shi*_*tar 5 security ssrs sql-server-2012
我有多个服务器,其中 4 个安装了ReportServer
&ReportServerTempDB
数据库的报告服务。
几天前,我正在为新登录设置安全性,我发现RSExecRole
我的开发服务器(在reportserver
数据库中)中缺少该角色。它存在于ReportServerTempDB
, master
&msdb
数据库中。
我找到了一种在msdn上的master
&msdb
数据库上创建它的方法,
但它并没有帮助我使用与我运行的其他环境类似的所有安全和属性来创建它。reportserver
有没有人遇到过这个问题?任何人都可以帮我写一个脚本并解释一下这个角色吗?
打开“Reporting Services 配置管理器”--> 数据库,验证[当前报表服务器数据库凭据]下的登录是否是 RSExecRole 中的用户之一,如果不是,请单击“更改凭据”按钮更改为 RSExecRole 中的用户。
您还可以使用 commnadline 实用程序 rsconfig http://technet.microsoft.com/en-us/library/ms162837.aspx
既然您也想要代码,我已经为您编写了脚本......
编辑:我已经编辑过,因此下面成为完整的代码。
/****** Object: Schema [RSExecRole] ***/
CREATE SCHEMA [RSExecRole] AUTHORIZATION [RSExecRole]
GO
/*** Object: DatabaseRole [RSExecRole] ******
/ CREATE ROLE [RSExecRole] AUTHORIZATION [dbo]
GO
--Security creation script for role RSExecRole
--Add Role To Database
EXEC sp_addrole
@rolename 'RSExecRole'
--Set Object Specific Permissions For Role
GRANT
EXECUTE
ON [dbo].[FindItemsByDataSource]
TO RSExecRole
GRANT
SELECT,INSERT,UPDATE,DELETE,REFERENCES
ON [dbo].[History]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[FindItemsByDataSet]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[FindItemsByDataSourceRecursive]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetDBVersion]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[CreateRole]
TO RSExecRole
GRANT
SELECT,REFERENCES
ON [dbo].[ExtendedCatalog]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetRoles]
TO RSExecRole
GRANT
SELECT,INSERT,UPDATE,DELETE,REFERENCES
ON [dbo].[ConfigurationInfo]
TO RSExecRole
GRANT
SELECT,REFERENCES
ON [dbo].[ExtendedDataSources]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[DeleteRole]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[SetKeysForInstallation]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[ReadRoleProperties]
TO RSExecRole
GRANT
SELECT,INSERT,UPDATE,DELETE,REFERENCES
ON [dbo].[Catalog]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetAnnouncedKey]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[SetRoleProperties]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[AnnounceOrGetKey]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetPoliciesForRole]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[SetMachineName]
TO RSExecRole
GRANT
SELECT,INSERT,UPDATE,DELETE,REFERENCES
ON [dbo].[SubscriptionsBeingDeleted]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[UpdatePolicy]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[ListInstallations]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[SetPolicy]
TO RSExecRole
GRANT
SELECT,INSERT,UPDATE,DELETE,REFERENCES
ON [dbo].[ModelDrill]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[ListSubscriptionIDs]
TO RSExecRole
GRANT
SELECT,INSERT,UPDATE,DELETE,REFERENCES
ON [dbo].[Segment]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[SetSystemPolicy]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[ListInfoForReencryption]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[SetModelItemPolicy]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetDatasourceInfoForReencryption]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[UpdatePolicyPrincipal]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[SetReencryptedDatasourceInfo]
TO RSExecRole
GRANT
SELECT,INSERT,UPDATE,DELETE,REFERENCES
ON [dbo].[ChunkSegmentMapping]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[UpdatePolicyRole]
TO RSExecRole
GRANT
SELECT,INSERT,UPDATE,DELETE,REFERENCES
ON [dbo].[ModelPerspective]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetSubscriptionInfoForReencryption]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetPolicy]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[SetReencryptedSubscriptionInfo]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetSystemPolicy]
TO RSExecRole
GRANT
SELECT,INSERT,UPDATE,DELETE,REFERENCES
ON [dbo].[CachePolicy]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[DeleteEncryptedContent]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[DeletePolicy]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[DeleteKey]
TO RSExecRole
GRANT
SELECT,INSERT,UPDATE,DELETE,REFERENCES
ON [dbo].[SegmentedChunk]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[CreateSession]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetAllConfigurationInfo]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[DeleteModelItemPolicy]
TO RSExecRole
GRANT
SELECT,INSERT,UPDATE,DELETE,REFERENCES
ON [dbo].[Users]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetOneConfigurationInfo]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[DeleteAllModelItemPolicies]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[SetConfigurationInfo]
TO RSExecRole
GRANT
SELECT,INSERT,UPDATE,DELETE,REFERENCES
ON [dbo].[ExecutionLogStorage]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetModelItemInfo]
TO RSExecRole
GRANT
SELECT,INSERT,UPDATE,DELETE,REFERENCES
ON [dbo].[DataSource]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[AddEvent]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetModelDefinition]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[DeleteEvent]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[AddModelPerspective]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[CleanEventRecords]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[DeleteModelPerspectives]
TO RSExecRole
GRANT
SELECT,INSERT,UPDATE,DELETE,REFERENCES
ON [dbo].[Policies]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[AddExecutionLogEntry]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetModelsAndPerspectives]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[ExpireExecutionLogEntries]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetModelPerspectives]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetUserIDBySid]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[DereferenceSessionSnapshot]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetUserIDByName]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[SetSessionData]
TO RSExecRole
GRANT
SELECT,INSERT,UPDATE,DELETE,REFERENCES
ON [dbo].[SecData]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetUserID]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[WriteLockSession]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetPrincipalID]
TO RSExecRole
GRANT
SELECT,REFERENCES
ON [dbo].[ExecutionLog2]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[CheckSessionLock]
TO RSExecRole
GRANT
SELECT,INSERT,UPDATE,DELETE,REFERENCES
ON [dbo].[Roles]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[CreateSubscription]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetSessionData]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[DeliveryRemovedInactivateSubscription]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetSnapshotFromHistory]
TO RSExecRole
GRANT
SELECT,INSERT,UPDATE,DELETE,REFERENCES
ON [dbo].[PolicyUserRole]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[AddSubscriptionToBeingDeleted]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[CleanExpiredSessions]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[RemoveSubscriptionFromBeingDeleted]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[CleanExpiredCache]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[DeleteSubscription]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[SetSessionCredentials]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetSubscription]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[SetSessionParameters]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[ListSubscriptionsUsingDataSource]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[ClearSessionSnapshot]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[UpdateSubscriptionStatus]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[RemoveReportFromSession]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[UpdateSubscriptionLastRunInfo]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[CleanBrokenSnapshots]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[UpdateSubscription]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[CleanOrphanedSnapshots]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[InvalidateSubscription]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[SetCacheOptions]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[CleanNotificationRecords]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetCacheOptions]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[CreateSnapShotNotifications]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[AddReportToCache]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[CreateDataDrivenNotification]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetExecutionOptions]
TO RSExecRole
GRANT
SELECT,INSERT,UPDATE,DELETE,REFERENCES
ON [dbo].[Event]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[CreateNewActiveSubscription]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[SetExecutionOptions]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[UpdateActiveSubscription]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[UpdateSnapshot]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[DeleteActiveSubscription]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[CreateChunkAndGetPointer]
TO RSExecRole
GRANT
SELECT,INSERT,UPDATE,DELETE,REFERENCES
ON [dbo].[Subscriptions]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[CreateCacheUpdateNotifications]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[WriteChunkPortion]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetCacheSchedule]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetChunkPointerAndLength]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[DeleteNotification]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetChunkInformation]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[SetNotificationAttempt]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[ReadChunkPortion]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[CreateTimeBasedSubscriptionNotification]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[CopyChunksOfType]
TO RSExecRole
GRANT
SELECT,INSERT,UPDATE,DELETE,REFERENCES
ON [dbo].[ActiveSubscriptions]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[DeleteTimeBasedSubscriptionSchedule]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[DeleteSnapshotAndChunks]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[ListUsedDeliveryProviders]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[DeleteOneChunk]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[AddBatchRecord]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[CreateRdlChunk]
TO RSExecRole
GRANT
SELECT,INSERT,UPDATE,DELETE,REFERENCES
ON [dbo].[SnapshotData]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetBatchRecords]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[DeletePersistedStreams]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[DeleteBatchRecords]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[DeleteExpiredPersistedStreams]
TO RSExecRole
GRANT
SELECT,INSERT,UPDATE,DELETE,REFERENCES
ON [dbo].[ChunkData]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[CleanBatchRecords]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[DeletePersistedStream]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[CleanOrphanedPolicies]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[AddPersistedStream]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[IncreaseTransientSnapshotRefcount]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[LockPersistedStream]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[DecreaseTransientSnapshotRefcount]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[WriteFirstPortionPersistedStream]
TO RSExecRole
GRANT
SELECT,INSERT,UPDATE,DELETE,REFERENCES
ON [dbo].[Notifications]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[MarkSnapshotAsDependentOnUser]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[WriteNextPortionPersistedStream]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[SetSnapshotProcessingFlags]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetFirstPortionPersistedStream]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[SetSnapshotChunksVersion]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[SetPersistedStreamError]
TO RSExecRole
GRANT
SELECT,INSERT,UPDATE,DELETE,REFERENCES
ON [dbo].[Batch]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[LockSnapshotForUpgrade]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetNextPortionPersistedStream]
TO RSExecRole
GRANT
SELECT,INSERT,UPDATE,DELETE,REFERENCES
ON [dbo].[Schedule]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[InsertUnreferencedSnapshot]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetSnapshotChunks]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[PromoteSnapshotInfo]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[SetDrillthroughReports]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[UpdateSnapshotPaginationInfo]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[DeleteDrillthroughReports]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetSnapshotPromotedInfo]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetDrillthroughReports]
TO RSExecRole
GRANT
SELECT,INSERT,UPDATE,DELETE,REFERENCES
ON [dbo].[ReportSchedule]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[AddHistoryRecord]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetDrillthroughReport]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[SetHistoryLimit]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetUpgradeItems]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[ListHistory]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[SetUpgradeItemStatus]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[CleanHistoryForReport]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetPolicyRoots]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[CleanAllHistories]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetDataSourceForUpgrade]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[DeleteHistoryRecord]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetSubscriptionsForUpgrade]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[DeleteAllHistoryForReport]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[StoreServerParameters]
TO RSExecRole
GRANT
SELECT,INSERT,UPDATE,DELETE,REFERENCES
ON [dbo].[RunningJobs]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[DeleteHistoriesWithNoPolicy]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetServerParameters]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[Get_sqlagent_job_status]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[CleanExpiredServerParameters]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[CreateTask]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[CopyChunks]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[UpdateTask]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[CreateNewSnapshotVersion]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[UpdateScheduleNextRunTime]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[UpdateSnapshotReferences]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[ListScheduledReports]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[OpenSegmentedChunk]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[ListTasks]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[CreateSegmentedChunk]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[ListTasksForMaintenance]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[ReadChunkSegment]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[ClearScheduleConsistancyFlags]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[WriteChunkSegment]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetAReportsReportAction]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[CreateChunkSegment]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetTimeBasedSubscriptionReportAction]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[IsSegmentedChunk]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetTaskProperties]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[ShallowCopyChunk]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[DeleteTask]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[DeepCopySegment]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[GetSchedulesReports]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[RemoveSegmentedMapping]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[EnforceCacheLimits]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[RemoveSegment]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[AddReportSchedule]
TO RSExecRole
GRANT
EXECUTE
ON [dbo].[MigrateExecutionLog]
TO RSExecRo