我正在尝试安装sales_history
sample schema,但出现错误:
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"
如何解决此问题? csh_v3.sql
具有完整权限,
完整会话输出:
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: localhost:1522/techfuturepdb.elom.tg
Session altered.
DROP USER sh CASCADE
*
ERROR at line 1:
ORA-01940: cannot drop a user that is currently connected
old 1: CREATE USER sh IDENTIFIED BY &pass
new 1: CREATE USER sh IDENTIFIED BY password
CREATE USER sh IDENTIFIED BY password
*
ERROR at line 1:
ORA-01920: user name 'SH' conflicts with another user or role name
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.
Connected.
Grant succeeded.
old 1: CREATE OR REPLACE DIRECTORY data_file_dir AS '&data_dir'
new 1: CREATE OR REPLACE DIRECTORY data_file_dir AS '/u01/app/oracle/product/12.2/db_1/demo/schema/sales_history/'
Directory created.
old 1: CREATE OR REPLACE DIRECTORY log_file_dir AS '&log_dir'
new 1: CREATE OR REPLACE DIRECTORY log_file_dir AS '/u01/app/oracle/product/12.2/db_1/demo/schema/log/'
Directory created.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Connected.
Session altered.
Session altered.
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"
答案 0 :(得分:-1)
我刚刚重命名了目录,它按预期工作:
mv db-sample-schemas-19.2 "__SUB__CWD__" ;
sqlplus system/Welcome1@node3/pdb1 @"__SUB__CWD__"/mksample.sql