SQL Server Report Server 报表用户权限T-SQL查询
/**************************************************************************
查询用户在报表上的权限
**************************************************************************/
use ReportServer
go
SELECT distinct c.Path,c.Name,d.UserName,b.RoleName
FROM [dbo].[PolicyUserRole] a, [dbo].[Roles] b, [dbo].[Catalog] c, users d
where a.RoleID=b.RoleID
and a.PolicyID=c.PolicyID
and a.UserID=d.UserID
/**************************************************************************
查询报表订阅Owner和对应的SQL Job
**************************************************************************/
select 'ReportName' = c.[name],
'ReportPath' = c.Path,
'SubnDesc' = s.Description,
'SubnOwner' = us.UserName,
'LastStatus' = s.LastStatus,
'LastRun' = s.LastRunTime,
'ReportModifiedBy' = uc.UserName,
'SubscriptionJobName' = j.name
from dbo.Subscriptions s
join dbo.Catalog c on c.ItemID = s.Report_OID and convert(varchar(10),s.LastRunTime,120) = convert(varchar(10),getdate(),120)
join dbo.ReportSchedule rs on rs.SubscriptionID = s.SubscriptionID
join dbo.Users uc on uc.UserID = c.ModifiedByID
join dbo.Users us on us.UserID = s.OwnerId
join msdb.dbo.sysjobs j on j.name = CONVERT(nvarchar(128),rs.ScheduleId)
order by LastRun desc
/**************************************************************************
查询报表元素类型
**************************************************************************/
SELECT Catalog.Path, Catalog.Name, Users.UserName, Catalog.Type,
CASE
WHEN Catalog.type = 1 THEN '1-Folder'
WHEN Catalog.type = 2 THEN '2-Report'
WHEN Catalog.type = 3 THEN '3-File'
WHEN Catalog.type = 4 THEN '4-Linked Report'
WHEN Catalog.type = 5 THEN '5-Datasource'
WHEN Catalog.type = 6 THEN '6-Model'
WHEN Catalog.type = 8 THEN '8-Shared Dataset'
WHEN Catalog.type = 9 THEN '9-Report Part'
WHEN Catalog.type = 11 THEN 'KPI'
WHEN Catalog.type = 12 THEN 'Mobile Report (folder)'
WHEN Catalog.type = 13 THEN 'Power BI Desktop Document'
ELSE 'Unknown' END AS [ItemType]
FROM Catalog INNER JOIN
Policies ON Catalog.PolicyID = Policies.PolicyID INNER JOIN
PolicyUserRole ON PolicyUserRole.PolicyID = Policies.PolicyID INNER JOIN
Users ON PolicyUserRole.UserID = Users.UserID
ORDER BY Catalog.Path
SQL Server Report Server 报表用户权限T-SQL查询的更多相关文章
- SQL Server:查看数据库用户权限(SQL 2005)
1. 查看 SQL 2005 用户所属数据库角色 use yourdb go select DbRole = g.name, MemberName = u.name, MemberSID = u.si ...
- SQL Server Report Server
1.SQL Server Report Server是利用mircosoft的share point产品 在menu 打开Reporting Services Configuration进行配置,会自 ...
- SQL Server report server使用
1.配置share point網站來改動報表 打開Reporting Servers Configuration Manager,裏面有Web Service URL(http://loca ...
- 安装SQL的时候,设置用户权限失败
在安装sql的时候,遇到一个问题: 在查看报表明细中,提示: 就是这三个: 首先确保你是使用管理员用户安装的,如果还不行,运行 secpol.msc 进入本地安全策略 把自己的用户名加入进来就好了.
- [转]在 SQL Server 2008 中新建用户登录并指定该用户的数据库
提要:我在 SQL Server 中新建用户登录时,出现了三种错误,错误代码分别是 18456.15128.4064 ----------------------------------- 正 文 ...
- 【转载】SQL Server 2008 中新建用户登录并指定该用户的数据库
提要:我在 SQL Server 中新建用户登录时,出现了三种错误,错误代码分别是 18456.15128.4064 ----------------------------------- 正 文 ...
- Accessing Report Server using Report Server Web Service - Microsoft SQL Server 2008R2
Today I am going to write about how to access SQL Server Report Server through Report Server Web ser ...
- 迁移Report Server DataBase时遇到的坑
1.项目背景 由于历史原因,公司部分系统的Report是基于SQL Server Report Service搭建的,且Reporting Services 和Report Server DataBa ...
- easyui datagrid 禁止选中行 EF的增删改查(转载) C# 获取用户IP地址(转载) MVC EF 执行SQL语句(转载) 在EF中执行SQL语句(转载) EF中使用SQL语句或存储过程 .net MVC使用Session验证用户登录 PowerDesigner 参照完整性约束(转载)
easyui datagrid 禁止选中行 没有找到可以直接禁止的属性,但是找到两个间接禁止的方式. 方式一: //onClickRow: function (rowIndex, rowData) ...
随机推荐
- magento 2 Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors.%
Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on h ...
- django restframework jwt
既然要来学习jwt(json web token),那么我们肯定是先要了解jwt的优势以及应用场景--跨域认证. $ pip install djangorestframework-jwt 传统coo ...
- 无需认证的mail,适用于ZABBIX等运维系统
cat main.cf | grep "^\s[^# \t].$" queue_directory = /var/spool/postfix command_directory = ...
- virtualBox centos 6.5 硬盘扩容
1. 操作virtual Box 将该虚拟机关机,然后将打开管理->介质管理 调整硬盘大小 2. 操作Linux 1. 将放大的进行分区建立 2. 将分区建立分区表 3. 将该分区合并到root ...
- oracle 查询数据库的各种命令
以下查询都是使用plsql查询oracle 11g 1.查询数据库版本信息 select * from v$version; 2.查询数据库优化模式 select name, value from v ...
- Python 文件读取
1. 最基本的读文件方法: # File: readline-example-1.py file = open("sample.txt") while 1: line = file ...
- SpringBoot系列: SpringBoot Web项目中使用Shiro 之二
==================================Shiro 的加深理解:==================================1. Shiro 和 Spring 系组 ...
- [再寄小读者之数学篇](2014-06-23 积分不等式 [中国科学技术大学2013年高等数学B 考研试题])
设 $f(x)$ 在 $[a,b]$ 上一阶连续可导, $f(a)=0$. 证明: $$\bex \int_a^b f^2(x)\rd x\leq \cfrac{(b-a)^2}{2}\int_a^b ...
- The container 'Maven Dependencies' references non existing library '
解决办法 uncheck the option "resolve dependencies from workspace projects" from the maven tab ...
- 获取reporting services导出pdf的url的方法
public static string genRptUrl(string strRptServer, string strRptPath, string strRptName, ParameterV ...