Girish Mohata wrote : >Hi All, >I have 2 databases in my SAP DB installation DB1 and DB2. >DB1 has 3 tables T_A and T_B. >DB2 has a procedure P_1.
>My question: >Can i write a procedure in the DB2's schema which accesses data from tables >which are in DB1's Schema ? >Can DB1 execute the procedures which belong to DB2's schema ? >An example would be very helpful :) I assume you have 2 different schemas in one SAPDB database instance. In that case it should be no problem to access tables of DB1 in the procedure of DB2. You must of course grant the required privileges on T_A and T_B to DB2, for example DB1 : GRANT SELECT ON T_A, T_B TO DB2 Afterwards, you can access these table in procedure P_1 : DB2 : CREATE DBPROC P_1 AS SELECT * FROM DB1.T_A; If DB2 grants the execute privilege on P_1 to DB1, this procedure may be executed by DB1 : DB2 : GRANT EXECUTE ON P_1 TO DB1; DB1 : CALL DB2.P_1; Regards, Thomas -- Thomas Anhaus SAP DB, SAP Labs Berlin [EMAIL PROTECTED] http://www.sapdb.org/ _______________________________________________ sapdb.general mailing list [EMAIL PROTECTED] http://listserv.sap.com/mailman/listinfo/sapdb.general _______________________________________________ sapdb.general mailing list [EMAIL PROTECTED] http://listserv.sap.com/mailman/listinfo/sapdb.general
