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 サーバ SQL リファレンス » ビュー » 互換ビュー

 

SYSUSERAUTHORITY 互換ビュー (旧式)

SYSUSERAUTHORITY ビューは、古いバージョンのソフトウェアとの互換性を保つために用意されています。代わりに SYSROLEGRANTS 統合ビューを使用してください。

SYSUSERAUTHORITY システムビューの各ローは、ユーザ ID に付与された権限を示します。

注意

このビューのタイトルには authority (権限) という単語が含まれていますが、セキュリティモデルはロールと権限に基づきます。したがって、ビュー内のデータは、ビューの定義に記載されているテーブルとビューからのロール情報を使用してコンパイルされます。



ALTER VIEW "SYS"."SYSUSERAUTHORITY" as
  select ISYSROLEGRANT.grantee as user_id,
    sp_auth_sys_role_info.auth
    from SYS.ISYSROLEGRANT
      natural join dbo.sp_auth_sys_role_info()
    where ISYSROLEGRANT.grant_type <> (0x02|0x04) and
    not ISYSROLEGRANT.grantee = any(select sp_auth_sys_role_info.role_id from dbo.sp_auth_sys_role_info()) union
  select ISYSUSER.user_id,
    cast('GROUP' as varchar(20)) as auth
    from SYS.ISYSUSER
    where ISYSUSER.user_name in( 'SYS','PUBLIC','diagnostics','SYS_SPATIAL_ADMIN_ROLE','rs_systabgroup','SA_DEBUG','dbo' ) union
  select ISYSUSER.user_id,
    cast('GROUP' as varchar(20)) as auth
    from SYS.ISYSUSER
    where ISYSUSER.user_type = (0x02|0x04|0x08) union
  select cast(opt.setting as unsigned integer) as user_id,
    cast('PUBLISH' as varchar(20)) as auth
    from SYS.ISYSOPTION as opt
    where opt."option" like '%db_publisher%' and opt.setting not like '%-1%'
 参照