使用cx_oracle执行时,为什么SQL命令失败,但是可以手动工作?

时间:2019-12-21 09:27:28

标签: python oracle cx-oracle oracle-rac

我正在研究oracle12C1 RAC设置, 我正在尝试将FILE钱包迁移到HSM, 当前我在两个节点上的sqlnet.ora如下:

Node1: ENCRYPTION_WALLET_LOCATION = ( SOURCE =(METHOD = HSM)(METHOD_DATA = (DIRECTORY = /etc/ORACLE/WALLET/ORCL)))
Node2: ENCRYPTION_WALLET_LOCATION = ( SOURCE =(METHOD = HSM)
                                        (METHOD_DATA =
                                       (DIRECTORY = /etc/ORACLE/WALLET/ORCL)))

我正尝试使用cx_Oracle将钱包从FILE钱包迁移到HSM钱包

ADMINISTER KEY MANAGEMENT SET ENCRYPTION KEY IDENTIFIED BY "Ssl12345#" MIGRATE USING "ssl12345" with backup

并出现以下错误

ORA-28416: specify the correct keystore in the sqlnet.ora file

如果我通过在node1上调用sqlplus来手动执行它,那么它会顺利运行。

SQL> ADMINISTER KEY MANAGEMENT SET ENCRYPTION KEY IDENTIFIED BY "Ssl12345#" MIGRATE USING "ssl12345" with backup;

keystore altered.

您能否确切说明这两次执行之间的区别是什么?

我的努力: 我尝试搜索此特定的oracle错误,但仅获得

When migrating to HSM, the keystore specified in sqlnet.ora file should be HSM and similarly when migrating to wallet, the keystore specified in sqlnet.ora should be wallet. Check if the sqlnet.ora file configuration is correct and, if not, correct it. 

0 个答案:

没有答案