Unanswered: can not find packge when Running SQC program on another machine
I have created a DB29.7 database named "MyDB1" on my machine using user "user1" which is administrator user.
then created SQC program that contains simple select statement and compiled it successfully using the following command:
db2 prep simpleselect.sqc bindfile PACKAGE DYNAMICRULES RUN VALIDATE RUN
then created the program required packages by using the bind command.
the C++ program(VC++2005) works fine and can connect and retrieve data from data base.
then, I wanted to run the program on another machine(other DB2 Server), on the other machine I created the same database but with different name "MyDB2" and different administrator user "user2" but same tables.
then using the BIND command to create the required data base, I used the following BIND command:
db2 BIND simpleSelect.bnd ACTION ADD OWNER user2 QUALIFIER user2 COLLECTION user2 GRANT PUBLIC DYNAMICRULES RUN VALIDATE RUN
the database package created under the new database "MyDB2" successfully.
when I run the C program, it connects successfully to the database "MyDB2" but when trying to execute the SQL statement it generates the following error
SQL005N Package "user1.SIMPLESE" was not found.
how can I force the program to use the authentication of the current connection as refrence to the required DB package??
I appreciate your help.
Last edited by Nesreen Mahmoud; 11-15-11 at 12:04.