You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have to make the folloing change in the setPasword.sh for my container name to be picked up:
ORACLE_PDB="ls -dl $ORACLE_BASE/oradata/$ORACLE_SID/*/ | grep -v pdbseed | awk '{print $10}' | cut -d/ -f6"
Changed to:
ORACLE_PDB="ls -dl $ORACLE_BASE/oradata/$ORACLE_SID/*/ | grep -v pdbseed | awk '{print $9}' | cut -d/ -f6"
This is because the path is the 9th column not the 10th:
@gvenzl I'm happy to, but I'm confused. The setPassword.sh script in this repo already uses {print $9}, so it gets the 9th column, and the script works correctly. I'm not sure where {print $10} came from.
That said, I think there's a more robust solution that doesn't rely on parsing the directory names under $ORACLE_BASE/oradata/$ORACLE_SID. See my comment on #295. What do you think?
I have to make the folloing change in the setPasword.sh for my container name to be picked up:
ORACLE_PDB="
ls -dl $ORACLE_BASE/oradata/$ORACLE_SID/*/ | grep -v pdbseed | awk '{print $10}' | cut -d/ -f6
"Changed to:
ORACLE_PDB="
ls -dl $ORACLE_BASE/oradata/$ORACLE_SID/*/ | grep -v pdbseed | awk '{print $9}' | cut -d/ -f6
"This is because the path is the 9th column not the 10th:
[oracle@oracle-19c-vagrant ~]$ ls -dl $ORACLE_BASE/oradata/$ORACLE_SID/*/ | grep -v pdbseed
drwxr-x---. 2 oracle oinstall 104 Apr 6 12:44 /opt/oracle/oradata/ORCLCDB/ORCLPDB1/
This was my ./setPassword.sh output:
[oracle@oracle-19c-vagrant ~]$ ./setPassword.sh system
ORACLE_SID=ORCLCDB
ORACE_PDB=
The Oracle base remains unchanged with value /opt/oracle
SQL*Plus: Release 19.0.0.0.0 - Production on Thu Apr 8 10:04:04 2021
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SQL>
User altered.
SQL>
User altered.
SQL> ALTER SESSION SET CONTAINER=
*
ERROR at line 1:
ORA-65015: missing or invalid container name
SQL> ALTER USER PDBADMIN IDENTIFIED BY "system"
*
ERROR at line 1:
ORA-01918: user 'PDBADMIN' does not exist
The text was updated successfully, but these errors were encountered: