× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



What are you using to do this DDM?? Also, what state is QUSER on the dev
box.

On Sat, Mar 19, 2022 at 9:37 PM Robert Rogerson <rogersonra@xxxxxxxxx>
wrote:

Ok, I'm stumped. I'm getting an an sqlstate=08004, sqlcode= -30060 User is
not authorized to relational database when calling a stored procedure on a
remote IBM i.

Here's the scenario. Both IBM i systems are at V7R3M0 and were brought up
to date on PTFs last week.
I have an external sp on the DEV box (mylib.INSERT_REC) and it's failing
when running an INSERT statement
exec sql INSERT INTO mylib.tableA
SELECT * FROM prod.lib.table WHERE ....

If I call the sp on the DEV machine it works perfectly. I print to qprint
after the sql runs and it prints

In iACS Run Sql Scripts
CALL INSERT_REC;

Produces output:
PREPSTMT: INSERT INTO mylib.tableA
SELECT * FROM prod.lib.table WHERE ...
SQLSTATE: 00000
SQLCODE: 0
SQLERROR: 1 rows inserted in TABLEA in mylib
User: QUSER (from psds)

If I call the sp on the PROD machine it fails. When calling on the PROD
machine it is called in an RPGLE program using three part naming
Exec sql CALL dev.mylib.INSERT_REC;

Produces output
PREPSTMT: INSERT INTO mylib.tableA
SELECT * FROM prod.lib.table WHERE ...
SQLSTATE: 08004
SQLCODE: -30060
SQLERROR: User is not authorized to relational database.
User: QUSER (from psds)

I've spent all day trying to figure this out but haven't had any luck.
Does anyone have an idea what I am doing wrong or don't understand?

Thanks for all thoughts...

Rob
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.