Class Reference
IRIS for UNIX 2019.2
InterSystems: The power behind what matters   
Documentation  Search
  [%SYS] >  [Security] >  [SQLAdminPrivilegeSet]
Private  Storage   

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

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

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
22 2 2 1


Summary

Properties
AlterTable AlterView CreateFunction CreateMethod
CreateProcedure CreateQuery CreateTable CreateTrigger
CreateView DropFunction DropMethod DropProcedure
DropQuery DropTable DropTrigger DropView
Grantee Namespace NoCheck NoIndex
NoLock NoTrigger

Methods
%AddToSaveSet %AddToSyncSet %CheckConstraints %CheckConstraintsForExtent
%ClassIsLatestVersion %ClassName %ComposeOid %ConstructClone
%Delete %DeleteExtent %DeleteId %DispatchClassMethod
%DispatchGetModified %DispatchGetProperty %DispatchMethod %DispatchSetModified
%DispatchSetMultidimProperty %DispatchSetProperty %Exists %ExistsId
%Extends %GUID %GUIDSet %GetLock
%GetParameter %GetSwizzleObject %Id %IsA
%IsModified %IsNull %KillExtent %LockExtent
%LockId %New %NormalizeObject %ObjectIsNull
%ObjectModified %Oid %OnBeforeAddToSync %OnDetermineClass
%Open %OpenId %OriginalNamespace %PackageName
%PurgeIndices %Reload %RemoveFromSaveSet %ResolveConcurrencyConflict
%RollBack %Save %SaveDirect %SerializeObject
%SetModified %SortBegin %SortEnd %SyncObjectIn
%SyncTransport %UnlockExtent %UnlockId %ValidateIndices
%ValidateObject Export Help Import
XMLDTD XMLExport XMLExportToStream XMLExportToString
XMLNew XMLSchema XMLSchemaNamespace XMLSchemaType


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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 Grantee as %String(MAXLEN=64,MINLEN=1) [ Required ];
Grantee - user/role the privilege was granted to
• property Namespace as %String(MAXLEN=256) [ Required ];
Namespace the privilege is defined in
• 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 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 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 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

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

Indices

•index (IDKey on Namespace,Grantee) [IdKey];


Copyright (c) 2019 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.