Skip to main content

Security.SQLAdminPrivilegeSet

persistent class Security.SQLAdminPrivilegeSet extends %Library.Persistent, %XML.Adaptor, %SYSTEM.Help

SQL Table Name: Security.SQLAdminPrivilegeSet

Define the SQL Administrative Privilege mapping in the ^SYS global Mapping was added for SQL Privileges to take advantage of XML export Map Data Order: #; 1 - %CREATE_FUNCTION #; 2 - %DROP_FUNCTION #; 3 - %CREATE_METHOD #; 4 - %DROP_METHOD #; 5 - %CREATE_PROCEDURE #; 6 - %DROP_PROCEDURE #; 7 - %CREATE_QUERY #; 8 - %DROP_QUERY #; 9 - %CREATE_TABLE #; 10 - %ALTER_TABLE #; 11 - %DROP_TABLE #; 12 - %CREATE_VIEW #; 13 - %ALTER_VIEW #; 14 - %DROP_VIEW #; 15 - %CREATE_TRIGGER #; 16 - %DROP_TRIGGER #; 17 - %NOCHECK #; 18 - %NOTRIGGER #; 19 - %NOINDEX #; 20 - %NOCHECK

Property Inventory

Method Inventory

Properties

property AlterTable as %TinyInt (VALUELIST = ",0,1,2");
AlterTable - 0/1/2, can this privilege be granted by the user 0 - No, 1 - Yes, 2 - Yes and grantable
Property methods: AlterTableDisplayToLogical(), AlterTableGet(), AlterTableIsValid(), AlterTableLogicalToDisplay(), AlterTableNormalize(), AlterTableSet(), AlterTableXSDToLogical()
property AlterView as %TinyInt (VALUELIST = ",0,1,2");
AlterView - 0/1/2, can this privilege be granted by the user 0 - No, 1 - Yes, 2 - Yes and grantable
Property methods: AlterViewDisplayToLogical(), AlterViewGet(), AlterViewIsValid(), AlterViewLogicalToDisplay(), AlterViewNormalize(), AlterViewSet(), AlterViewXSDToLogical()
property CreateFunction as %TinyInt (VALUELIST = ",0,1,2");
CreateFunction - 0/1/2, can this privilege be granted by the user 0 - No, 1 - Yes, 2 - Yes and grantable
Property methods: CreateFunctionDisplayToLogical(), CreateFunctionGet(), CreateFunctionIsValid(), CreateFunctionLogicalToDisplay(), CreateFunctionNormalize(), CreateFunctionSet(), CreateFunctionXSDToLogical()
property CreateMethod as %TinyInt (VALUELIST = ",0,1,2");
CreateMethod - 0/1/2, can this privilege be granted by the user 0 - No, 1 - Yes, 2 - Yes and grantable
Property methods: CreateMethodDisplayToLogical(), CreateMethodGet(), CreateMethodIsValid(), CreateMethodLogicalToDisplay(), CreateMethodNormalize(), CreateMethodSet(), CreateMethodXSDToLogical()
property CreateProcedure as %TinyInt (VALUELIST = ",0,1,2");
CreateProcedure - 0/1/2, can this privilege be granted by the user 0 - No, 1 - Yes, 2 - Yes and grantable
Property methods: CreateProcedureDisplayToLogical(), CreateProcedureGet(), CreateProcedureIsValid(), CreateProcedureLogicalToDisplay(), CreateProcedureNormalize(), CreateProcedureSet(), CreateProcedureXSDToLogical()
property CreateQuery as %TinyInt (VALUELIST = ",0,1,2");
CreateQuery - 0/1/2, can this privilege be granted by the user 0 - No, 1 - Yes, 2 - Yes and grantable
Property methods: CreateQueryDisplayToLogical(), CreateQueryGet(), CreateQueryIsValid(), CreateQueryLogicalToDisplay(), CreateQueryNormalize(), CreateQuerySet(), CreateQueryXSDToLogical()
property CreateTable as %TinyInt (VALUELIST = ",0,1,2");
CreateTable - 0/1/2, can this privilege be granted by the user 0 - No, 1 - Yes, 2 - Yes and grantable
Property methods: CreateTableDisplayToLogical(), CreateTableGet(), CreateTableIsValid(), CreateTableLogicalToDisplay(), CreateTableNormalize(), CreateTableSet(), CreateTableXSDToLogical()
property CreateTrigger as %TinyInt (VALUELIST = ",0,1,2");
CreateTrigger - 0/1/2, can this privilege be granted by the user 0 - No, 1 - Yes, 2 - Yes and grantable
Property methods: CreateTriggerDisplayToLogical(), CreateTriggerGet(), CreateTriggerIsValid(), CreateTriggerLogicalToDisplay(), CreateTriggerNormalize(), CreateTriggerSet(), CreateTriggerXSDToLogical()
property CreateView as %TinyInt (VALUELIST = ",0,1,2");
CreateView - 0/1/2, can this privilege be granted by the user 0 - No, 1 - Yes, 2 - Yes and grantable
Property methods: CreateViewDisplayToLogical(), CreateViewGet(), CreateViewIsValid(), CreateViewLogicalToDisplay(), CreateViewNormalize(), CreateViewSet(), CreateViewXSDToLogical()
property DropFunction as %TinyInt (VALUELIST = ",0,1,2");
DropFunction - 0/1/2, can this privilege be granted by the user 0 - No, 1 - Yes, 2 - Yes and grantable
Property methods: DropFunctionDisplayToLogical(), DropFunctionGet(), DropFunctionIsValid(), DropFunctionLogicalToDisplay(), DropFunctionNormalize(), DropFunctionSet(), DropFunctionXSDToLogical()
property DropMethod as %TinyInt (VALUELIST = ",0,1,2");
DropMethod - 0/1/2, can this privilege be granted by the user 0 - No, 1 - Yes, 2 - Yes and grantable
Property methods: DropMethodDisplayToLogical(), DropMethodGet(), DropMethodIsValid(), DropMethodLogicalToDisplay(), DropMethodNormalize(), DropMethodSet(), DropMethodXSDToLogical()
property DropProcedure as %TinyInt (VALUELIST = ",0,1,2");
DropProcedure - 0/1/2, can this privilege be granted by the user 0 - No, 1 - Yes, 2 - Yes and grantable
Property methods: DropProcedureDisplayToLogical(), DropProcedureGet(), DropProcedureIsValid(), DropProcedureLogicalToDisplay(), DropProcedureNormalize(), DropProcedureSet(), DropProcedureXSDToLogical()
property DropQuery as %TinyInt (VALUELIST = ",0,1,2");
DropQuery - 0/1/2, can this privilege be granted by the user 0 - No, 1 - Yes, 2 - Yes and grantable
Property methods: DropQueryDisplayToLogical(), DropQueryGet(), DropQueryIsValid(), DropQueryLogicalToDisplay(), DropQueryNormalize(), DropQuerySet(), DropQueryXSDToLogical()
property DropTable as %TinyInt (VALUELIST = ",0,1,2");
DropTable - 0/1/2, can this privilege be granted by the user 0 - No, 1 - Yes, 2 - Yes and grantable
Property methods: DropTableDisplayToLogical(), DropTableGet(), DropTableIsValid(), DropTableLogicalToDisplay(), DropTableNormalize(), DropTableSet(), DropTableXSDToLogical()
property DropTrigger as %TinyInt (VALUELIST = ",0,1,2");
DropTrigger - 0/1/2, can this privilege be granted by the user 0 - No, 1 - Yes, 2 - Yes and grantable
Property methods: DropTriggerDisplayToLogical(), DropTriggerGet(), DropTriggerIsValid(), DropTriggerLogicalToDisplay(), DropTriggerNormalize(), DropTriggerSet(), DropTriggerXSDToLogical()
property DropView as %TinyInt (VALUELIST = ",0,1,2");
DropView - 0/1/2, can this privilege be granted by the user 0 - No, 1 - Yes, 2 - Yes and grantable
Property methods: DropViewDisplayToLogical(), DropViewGet(), DropViewIsValid(), DropViewLogicalToDisplay(), DropViewNormalize(), DropViewSet(), DropViewXSDToLogical()
property Grantee as %String (MAXLEN = 64, MINLEN = 1) [ Required ];
Grantee - user/role the privilege was granted to
Property methods: GranteeDisplayToLogical(), GranteeGet(), GranteeIsValid(), GranteeLogicalToDisplay(), GranteeLogicalToOdbc(), GranteeNormalize(), GranteeSet()
property Namespace as %String (MAXLEN = 256) [ Required ];
Namespace the privilege is defined in
Property methods: NamespaceDisplayToLogical(), NamespaceGet(), NamespaceIsValid(), NamespaceLogicalToDisplay(), NamespaceLogicalToOdbc(), NamespaceNormalize(), NamespaceSet()
property NoCheck as %TinyInt (VALUELIST = ",0,1,2");
NoCheck - 0/1/2, can this privilege be granted by the user 0 - No, 1 - Yes, 2 - Yes and grantable
Property methods: NoCheckDisplayToLogical(), NoCheckGet(), NoCheckIsValid(), NoCheckLogicalToDisplay(), NoCheckNormalize(), NoCheckSet(), NoCheckXSDToLogical()
property NoIndex as %TinyInt (VALUELIST = ",0,1,2");
NoIndex - 0/1/2, can this privilege be granted by the user 0 - No, 1 - Yes, 2 - Yes and grantable
Property methods: NoIndexDisplayToLogical(), NoIndexGet(), NoIndexIsValid(), NoIndexLogicalToDisplay(), NoIndexNormalize(), NoIndexSet(), NoIndexXSDToLogical()
property NoLock as %TinyInt (VALUELIST = ",0,1,2");
NoLock - 0/1/2, can this privilege be granted by the user 0 - No, 1 - Yes, 2 - Yes and grantable
Property methods: NoLockDisplayToLogical(), NoLockGet(), NoLockIsValid(), NoLockLogicalToDisplay(), NoLockNormalize(), NoLockSet(), NoLockXSDToLogical()
property NoTrigger as %TinyInt (VALUELIST = ",0,1,2");
NoTrigger - 0/1/2, can this privilege be granted by the user 0 - No, 1 - Yes, 2 - Yes and grantable
Property methods: NoTriggerDisplayToLogical(), NoTriggerGet(), NoTriggerIsValid(), NoTriggerLogicalToDisplay(), NoTriggerNormalize(), NoTriggerSet(), NoTriggerXSDToLogical()

Methods

classmethod Export(FileName As %String = "SQLPrivilegesExport.xml", ByRef NumExported As %Integer = 0) as %Status
This method exports SQL Admin Privilege Set records to a file in xml format.
Parameters:
Filename - Output file name
NumExported (byref) - Returns number of records exported.
classmethod Import(FileName As %String, ByRef NumImported As %Integer, Flags As %Integer = 0) as %Status
Import SQLAdminPrivilegeSet records from an xml file.
Parameters:
FileName - Filename to import Role records from
NumImported (byref) - Returns number of records imported
Flags - Control import
Bit 0 - Do not import records, just return count
Note: On failure, no records will be imported

Queries

query DirectPrivileges(UserRole As %String)
SQL Query:
SELECT Namespace,Grantee FROM SQLAdminPrivilegeSet WHERE (LOWER(Grantee) = LOWER(:UserRole))
Given a User or Role name, return the ID information for Admin Privs that have been directly granted to the user or role
query List()
SQL Query:
SELECT Namespace,Grantee FROM SQLAdminPrivilegeSet
Return the ID information for SQL Admin Privs Sets

Indexes

index (IDKey on Namespace,Grantee) [IdKey, Type = key];
Index methods: IDKeyCheck(), IDKeyDelete(), IDKeyExists(), IDKeyOpen(), IDKeySQLCheckUnique(), IDKeySQLExists(), IDKeySQLFindPKeyByConstraint(), IDKeySQLFindRowIDByConstraint()

Inherited Members

Inherited Methods

Storage

Storage Model: CacheSQLStorage

Maps: 1

  • Map number 1 is named Master

    thismap.Global: ^*

  • ^*($e(("^|""^^"_$zu(12)_"""|SYS"),2,*),"Security","SQL","syspriv",{Namespace},$zcvt({Grantee},"L"))
    =
    Node Delimiter Piece Name
    1 CreateFunction
    2 DropFunction
    3 CreateMethod
    4 DropMethod
    5 CreateProcedure
    6 DropProcedure
    7 CreateQuery
    8 DropQuery
    9 CreateTable
    10 AlterTable
    11 DropTable
    12 CreateView
    13 AlterView
    14 DropView
    15 CreateTrigger
    16 DropTrigger
    17 NoCheck
    18 NoTrigger
    19 NoIndex
    20 NoLock
FeedbackOpens in a new tab