Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere Server - SQL Reference » Views » Compatibility views


SYSUSERPERM compatibility view (deprecated)

Each row of the SYSUSERPERM view describes one user ID. You must have the SELECT ANY TABLE system privilege to view data in this view.

This view is deprecated because it only shows the authorities and permissions available in previous versions. You should change your application to use the SYSROLEGRANTS consolidated view.

The tables and columns that make up this view are provided in the SQL statement below. To learn more about a particular table or column, use the links provided beneath the view definition.

  as select b.user_id,
    if AA.resourceauth is not null and AA.resourceauth > 0 then
      'Y' else 'N' endif as resourceauth,
    if AA.dbaauth is not null and AA.dbaauth > 0 then
      'Y' else 'N' endif as dbaauth,
    'N' as scheduleauth,
    if exists(select * from SYS.ISYSOPTION as opt
      where opt."option" like '%db_publisher%' and opt.setting not like '%-1'
      and b.user_id = cast(opt.setting as integer)) then
      'Y' else 'N' endif as publishauth,
    if AA.remotedbaauth is not null and AA.remotedbaauth > 0 then
      'Y' else 'N' endif as remotedbaauth,
    if b.user_type = (0x02|0x04|0x08) or b.user_name in( 'SYS','PUBLIC','diagnostics','SYS_SPATIAL_ADMIN_ROLE','rs_systabgroup','SA_DEBUG','dbo' ) then
      'Y' else 'N' endif as user_group,
    from SYS.ISYSUSER as b
      left outer join SYS.ISYSREMARK as r on(b.object_id = r.object_id)
      left outer join(select sum(if sp_auth_sys_role_info.auth = 'RESOURCE' then 1 else 0 endif) as resourceauth,
        sum(if sp_auth_sys_role_info.auth = 'DBA' then 1 else 0 endif) as dbaauth,
        sum(if sp_auth_sys_role_info.auth = 'REMOTE DBA' then 1 else 0 endif) as remotedbaauth,
        from SYS.ISYSROLEGRANT natural join dbo.sp_auth_sys_role_info()
        where ISYSROLEGRANT.grant_type <> (0x02|0x04)
        and sp_auth_sys_role_info.auth in( 'DBA','RESOURCE','REMOTE DBA' ) 
        group by ISYSROLEGRANT.grantee) as AA
      on(AA.grantee = b.user_id)
 See also