Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Can I run stored procedure from scheduled job as sysdba?

User_7WOTLJul 20 2022 — edited Aug 1 2022

I have user c##admin in my core DB (Oracle 19c), with "sysdba" privileges.
I want it to select from a pdb using a database link without giving a password.
assuming the following:

  • PDB Name: PDB_TEST
  • Schema Name: TEST
  • Table Name: TABLE1
    This is the database link:
    CREATE DATABASE LINK TEST_DBLINK USING 'PDB_TEST'
    Assuming I want to run the following query:
    select * from "TEST"."TABLE1"@TEST_DBLINK;
    When I'm connected to c##admin as sysdba, the query runs and returns the results.
    When I connected to c##admin (not as sysdba) or when I run it from a scheduled job it failed with the following error:
    > ORA-01017: invalid username/password; logon denied
    So, my question is: can I run a scheduled job as sysdba?
    BTW: A NO is also an acceptable answer.
Comments
Post Details
Added on Jul 20 2022
1 comment
551 views