- 3,734,328 Users
- 2,246,950 Discussions
- 7,857,228 Comments
- 17.8K All Categories
- 3.3K Industry Applications
- 3.2K Intelligent Advisor
- 57 Insurance
- 533.3K On-Premises Infrastructure
- 137.3K Analytics Software
- 38.5K Application Development Software
- 5.1K Cloud Platform
- 109K Database Software
- 17.5K Enterprise Manager
- 8.8K Hardware
- 70.7K Infrastructure Software
- 105K Integration
- 41.5K Security Software
Pluggable DB : Shell script fails in sqlplus
I have an external table which refers a pre-processor ,which further refers a shell script.
It works fine with a non pluggable db. The script when modified with 'alter session', works fine in a pluggable db node too.
However, when the script is accessed from sqlplus, it does not work inside a pluggable db node. It gives me ora-01017 error for tables referenced inside the script.
But, if I hard code the pwd details inside the script it works .
May I know, how the script can made to work without having to provide pwd details in it, in both pluggable and non pluggable db node.
Please note: made use of sysdba user to run the scripts in unix environment.
Let me know if more detail is required.
dirpath=`$ORACLE_HOME/bin/sqlplus -s / as sysdba <<EOF
set pages 0 feed off
alter session set container=PBRO1I;
select directory_path from all_directories
where directory_name = '$var1';