SQL> create table xx_po_emp(empno number(10),
2 ename varchar2(100),
3 sal number(10),
4 job varchar2(100),
5 hiredate date,
6 deptno number(2)
7 )
8 /
Table created.
SQL> grant all on xx_po_emp to apps;
Grant succeeded.
SQL> conn apps/apps@vis
Connected.
SQL> create public synonym xx_po_emp for po.xx_po_emp;
Synonym created.
AD_DD(This is a Package) and this is used to register the table as well as columns in Apps.
For register table : ad_dd.register_table
register column: ad_dd.register_column
SQL> exec ad_dd.register_table('PO','XX_PO_EMP','T');
PL/SQL procedure successfully completed.
SQL> exec ad_dd.register_column('PO','XX_PO_EMP','EMPNO',1,'NUMBER',10,'N','Y');
PL/SQL procedure successfully completed.
SQL> exec ad_dd.register_column('PO','XX_PO_EMP','ENAME',2,'VARCHAR2',100,'N','Y');
PL/SQL procedure successfully completed.
SQL> exec ad_dd.register_column('PO','XX_PO_EMP','SAL',3,'NUMBER',10,'N','Y');
PL/SQL procedure successfully completed.
SQL> exec ad_dd.register_column('PO','XX_PO_EMP','JOB',4,'VARCHAR2',100,'N','Y');
PL/SQL procedure successfully completed.
SQL> exec ad_dd.register_column('PO','XX_PO_EMP','HIREDATE',5,'DATE',11,'N','Y');
PL/SQL procedure successfully completed.
SQL> exec ad_dd.register_column('PO','XX_PO_EMP','DEPTNO',6,'NUMBER',2,'N','Y');
PL/SQL procedure successfully completed.
SQL> COMMIT
2 /
Commit complete.
in column registration for what 'N' and 'Y' are used for?
ReplyDeletecan we execute AD_DD for registring table or a column from custom user after providing execute grants to custom user ?
ReplyDeletecos I tried this way , for registring a custom table, but getting error
*
ERROR at line 1:
ORA-01031: insufficient privileges
ORA-06512: at "APPS.AD_DD", line 292
ORA-06512: at line 1