Skip to Main Content

Oracle Database Express Edition (XE)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Please ask technical questions in the appropriate category. Thank you!

Installing the sample schemas on the Oracle Database XE vesion 21c: connection string

User_1PQJHMar 17 2023 — edited Mar 17 2023

Hello everybody,

I have two Oracle Linux 8 hosts, ovm0 and ovm1, each running the Oracle Database XE 21c.

I also have a Windows 10 machine called lilac. I installed the Oracle Instant Client on lilac and I can connect from lilac to any of the database hosts via the sqlplus utility.

As you probably know, the oracle account on both ovm0 and ovm1 also has access to the sqlplus utility.

Now I would like to somehow install all of the sample schemas, on both database hosts.

To that end I tried following the instructions at https://docs.oracle.com/en/database/oracle/oracle-database/21/comsc/installing-sample-schemas.html

This page lists the following instructions:

sqlplus system/systempw@connect_string
@mksample systempw syspw hrpw oepw pmpw ixpw shpw bipw users temp /your/path/to/log/ connect_string

Whichever sqlplus instance I use (on Windows or on Linux), I keep running into the same problem having to do with the connection string, namely:

ORA-12154: TNS:could not resolve the connect identifier specified

To begin with, I downloaded and decompressed the sample files to lilac > C:\Users\user\Downloads\Oracle Database Sample Schemas 21c\db-sample-schemas-21.1\, whose contents are:
<DIR> bus_intelligence
<DIR> customer_orders
<DIR> bus_intelligence
<DIR> customer_orders
<DIR> human_resources
<DIR> info_exchange
<DIR> order_entry
<DIR> product_media
<DIR> sales_history
<DIR> shipping
<DIR> human_resources
<DIR> info_exchange
<DIR> order_entry
<DIR> product_media
<DIR> sales_history
<DIR> shipping
117 CONTRIBUTING.md
3.633 drop_sch.sql
1.050 LICENSE.md
27.756 mkplug.sql
7.166 mksample.sql
6.592 mkunplug.sql
6.123 mkverify.sql
2.740 mk_dir.sql
5.682 README.md
5.263 README.txt
3.633 drop_sch.sql
1.050 LICENSE.md
27.756 mkplug.sql
7.166 mksample.sql
6.592 mkunplug.sql
6.123 mkverify.sql
2.740 mk_dir.sql
5.682 README.md
5.263 README.txt

I executed on lilac:

C:\Users\user\Downloads\Oracle Database Sample Schemas 21c\db-sample-schemas-21.1> sqlplus system@ovm0

SQL> SELECT NAME, CON_ID, DBID, CON_UID FROM V$CONTAINERS ORDER BY CON_ID;

NAME        CON_ID       DBID    CON_UID
-------- ---------- ---------- ----------
CDB$ROOT         1 3012437302          1
PDB$SEED         2 2706452690 2706452690
XEPDB1           3 2192658489 2192658489

SQL> SHOW PARAMETER db_name;
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_name                              string      XE

SQL> SHOW USER;
USER is "SYSTEM"

SQL> @mksample ************ ************ sys.pass hr.pass oe.pass pm.pass ix.pass sh.pass bi.pass users temp "C:\Users\user\IT\personal\projects\server\on-premise\vmware\vm\ovm0\sample schemas - installation\log" ovm0

specify password for SYSTEM as parameter 1:

specify password for SYS as parameter 2:

specify password for HR as parameter 3:

specify password for OE as parameter 4:

specify password for PM as parameter 5:

specify password for IX as parameter 6:

specify password for  SH as parameter 7:

specify password for  BI as parameter 8:

specify default tablespace as parameter 9:

specify temporary tablespace as parameter 10:

specify log file directory (including trailing delimiter) as parameter 11:

specify connect string as parameter 12:

Sample Schemas are being created ...

Ein Unterverzeichnis oder eine Datei mit dem Namen "temp" existiert bereits.

ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified


Warning: You are no longer connected to ORACLE.
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
SP2-0640: Not connected
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified


SP2-0310: unable to open file "__SUB__CWD__/human_resources/hr_main.sql"
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
...

I tried all kinds of values for the connect_string parameter, such as, for instance:
[ ] ovm0:1521/xepdb1
[ ] ovm0:1521/pdb1
[ ] ovm0:1521/xe

I tried leaving out the port number and replacing the host name with its IP address. I also tried something similar with the Linux sqlplus utility and I am running into the same error.

Any idea what am I missing?

Thank you.

Comments
Post Details
Added on Mar 17 2023
2 comments
445 views