( dad_name => l_dad,attr_name => 'authentication-mode',attr_value => l_authMode);DBMS_EPG.SET_DAD_ATTRIBUTE( dad_name => l_dad,attr_name => 'document-table-name',attr_value => l_docTable );DBMS_EPG.AUTHORIZE_DAD( dad_name => l_dad,user => l_dbUser );DBMS_EPG.GET_ALL_DAD_ATTRIBUTES(l_dad,l_attrNames,l_attrValues);FOR i IN 1..l_attrNames.COUNT LOOPDBMS_OUTPUT.PUT_LINE(LPAD(l_attrNames(i),20)||' : '||l_attrValues(i));END LOOP;END;/
A notable difference between mod_plsql and DBMS_EPG is that mod_plsql allowed aschema name parameter to be entered, when a new blank configuration is created. Thisallowed us to enter a default schema to prefix any procedures in the url. DBMS_EPGdoes not have a similar attribute, so you either have to create synonyms or add theusername into the url instead. EG:http://myserver:8080/test/schemauser.procedurename.
Viewing the DAD settings
The following procedure will display the settings, mappings and authorizations for all of the DAD's.
DECLAREl_dadNames DBMS_EPG.VARCHAR2_TABLE;l_attrNames DBMS_EPG.VARCHAR2_TABLE;l_attrValues DBMS_EPG.VARCHAR2_TABLE;BEGINDBMS_EPG.GET_DAD_LIST(l_dadNames);FOR d IN 1..l_dadNames.COUNT LOOPDBMS_OUTPUT.PUT_LINE(CHR(10)||l_dadNames(d));DBMS_EPG.GET_ALL_DAD_ATTRIBUTES(l_dadNames(d),l_attrNames,l_attrValues);FOR a IN 1..l_attrValues.COUNT LOOPDBMS_OUTPUT.PUT_LINE('- '||RPAD(l_attrNames(a),25)||' : '||l_attrValues(a));END LOOP;DBMS_EPG.GET_ALL_DAD_MAPPINGS(l_dadNames(d),l_attrValues);FOR a IN 1..l_attrValues.COUNT LOOPDBMS_OUTPUT.PUT_LINE('- '||RPAD('mapping',25)||' : '||l_attrValues(a));END LOOP;FOR a IN ( SELECT username FROM dba_epg_dad_authorizationWHERE dad_name = l_dadNames(d) )LOOPDBMS_OUTPUT.PUT_LINE('- '||RPAD('authorized',25)||' : '||a.username);END LOOP;END LOOP;END;/
Use this procedure to check your settings.
Leave a Comment