oracle-samples / db-sample-schemas

Oracle Database Sample Schemas
https://www.oracle.com/pls/topic/lookup?ctx=dblatest&id=COMSC
MIT License
727 stars 523 forks source link

When install hr sample schema via sqlplus, needs some considerations #20

Closed miyamam closed 6 months ago

miyamam commented 12 months ago

When I installed HR sample schema via sqlplus on Windows server, I did following steps to avoid errors.

If this information is helpful, could you add Readme note.

mikesmithers commented 11 months ago

I also hit the issue with &pass not being double-quoted in the install scripts ( in my case both HR and CO schemas). This was whilst running the relevant _install.sql script in SQLDeveloper (21.2.1.204) on my OCI Free Tier (19c ) database as ADMIN. I needed to change the CREATE USER statement (using HR as an example) from CREATE USER hr IDENTIFIED BY &pass DEFAULT TABLESPACE &tbs QUOTA UNLIMITED ON &tbs; to CREATE USER hr IDENTIFIED BY "&pass" DEFAULT TABLESPACE &tbs QUOTA UNLIMITED ON &tbs;

I believe that making this minor change to the relevant install scripts would fix the issue for most (any ?) Oracle client tool where these scripts might reasonably be executed from.

gvenzl commented 6 months ago

Hi @miyamam,

Regarding the _ORACLE_SCRIPT parameter, you are most likely encountering this because you are trying to install a sample schema into the CDB$ROOT rather than the PDB. Please install the sample schemas only in a PDB, not in the CDB$ROOT.

Both, your and @mikesmithers point about the "" is well taken, we will add this to the scripts.

gvenzl commented 6 months ago

Fixed.