Я устанавливаю пример схемы для oracle 12c (12.2).схема hr установлена нормально, но sales_order и другая схема не работают.Сбой происходит только для подключаемой базы данных, особенно на
specify connect string as parameter 8:
Enter value for 8: sys/password@techfuturepdb as sysdba*
Перед запуском примера сценария схемы
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
3 TECHFUTUREPDB READ WRITE NO
Что такое строка подключения?Какую ценность это ожидает?Мой файл tnsnames.ora находится ниже
- Установка примера схемы sales_history
SQL> @?/demo/schema/sales_history/sh_main.sql
specify password for SH as parameter 1:
Enter value for 1: password
specify default tablespace for SH as parameter 2:
Enter value for 2: users
specify temporary tablespace for SH as parameter 3:
Enter value for 3: temp
specify password for SYS as parameter 4:
Enter value for 4: password
specify directory path for the data files as parameter 5:
Enter value for 5: /u01/app/oracle/product/12.2/db_1/demo/schema/sales_history
writeable directory path for the log files as parameter 6:
Enter value for 6: /u01/app/oracle/product/12.2/db_1/demo/schema/log
specify version as parameter 7:
Enter value for 7: v3
specify connect string as parameter 8:
Enter value for 8: sys/password@techfuturepdb as sysdba
Session altered.
DROP USER sh CASCADE
*
ERROR at line 1:
ORA-01918: user 'SH' does not exist
old 1: CREATE USER sh IDENTIFIED BY &pass
new 1: CREATE USER sh IDENTIFIED BY password
User created.
old 1: ALTER USER sh DEFAULT TABLESPACE &tbs
new 1: ALTER USER sh DEFAULT TABLESPACE users
old 2: QUOTA UNLIMITED ON &tbs
new 2: QUOTA UNLIMITED ON users
User altered.
old 1: ALTER USER sh TEMPORARY TABLESPACE &ttbs
new 1: ALTER USER sh TEMPORARY TABLESPACE temp
User altered.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Grant succeeded.
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-0640: Not connected
SP2-0640: Not connected
SP2-0310: unable to open file "__SUB__CWD__/sales_history/csh_v3.sql"
SP2-0310: unable to open file "__SUB__CWD__/sales_history/lsh_v3.sql"
SP2-0310: unable to open file "__SUB__CWD__/sales_history/psh_v3.sql"
SQL>
вот мой файл tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/12.2/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
TECHFUTURE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = cisnet-10.elom.tg)(PORT = 1522))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = techfuture.elom.tg)
)
)
LISTENER_TECHFUTURE =
(ADDRESS = (PROTOCOL = TCP)(HOST = cisnet-10.elom.tg)(PORT = 1522))
TECHFUTUREPDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = cisnet-10.elom.tg)(PORT = 1522))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = TECHFUTUREPDB)
)
)