Author Topic: arsagperms and arsfolperms  (Read 2160 times)

Mani

  • Jr. Member
  • **
  • Posts: 28
    • View Profile
arsagperms and arsfolperms
« on: November 19, 2014, 05:24:14 AM »
Hi,

AG and folder permission tables (arsagperms and arsfolperms) have the permission columns as Integer (doc_perms for arsagperms and perms for arsfolperms). Is there a way to find, what these integer values correspond to?

Any idea is much appreciated. we are using CMOD 8.4.1.6 on DB2 9.5.5 and TSM 5.4 - Sun Solaris 5.10

the basic requirement is to check the permissions for each user/group for AG and folders.



Cheers
Mani

Frederick Tybalt

  • Full Member
  • ***
  • Posts: 124
    • View Profile
    • Personal Website
Re: arsagperms and arsfolperms
« Reply #1 on: December 01, 2014, 03:17:01 AM »
This was based on my research.

Convert the integer to binary and 1 denotes permissions are set and 0 other wise.

Permission attributes from top to bottom to be mapped to bits Right to Left

Code: [Select]
SQL : Select Id, Agid,  dec2bin(Doc_Perms)  From Arsagperms

Oracle Function :
CREATE OR REPLACE FUNCTION dec2bin (N in number) RETURN varchar2 IS
  binval varchar2(64);
  N2     number := N;
BEGIN
  while ( N2 > 0 ) loop
     binval := mod(N2, 2) || binval;
     N2 := trunc( N2 / 2 );
  end loop;
  return binval;
END dec2bin;


rIcK
======------------------======
www.rick.co.in | www.tekbytz.com