gpt4 book ai didi

c++ - 使用 oracle 的 OTT 实用程序时遇到问题

转载 作者:太空狗 更新时间:2023-10-29 23:05:41 24 4
gpt4 key购买 nike

这是我在命令提示符下运行的命令:

ott userid=username/password intype=object.typ outtype=objectOut.typ 
code=cpp hfile=temp.h cppfile=temp.cpp mapfile=tempmapfile.cppset

这是我得到的错误:

O2T-1118, Unable to register the connection
O2T-102, ERROR: Unable to connect to schema "username"

我不知道如何正确注册我的连接。有人可以帮助阐明我遇到的这个问题吗?

最佳答案

正如它所说,您的用户名或密码是错误的。

我创建了一个新用户并连接:

SQL> create user ott identified by ott;

User created.

SQL> grant connect,resource to ott;

Grant succeeded.

SQL> conn ott/ott

Connected.
SQL>

然后创建一个名为 ott_type 的对象:

SQL> create type ott_type as object
2 (name varchar2(30),
3 empno number,
4 hiredate date);
5 /

Type created.

SQL>

然后我创建一个 intype 文件:

[oracle@db oracle]$ cat ott_typein.tpy
case=lower
type ott_type
[oracle@db oracle]$

现在我将使用 ott 转换它:

[oracle@db oracle]$ ott userid=ott/ott intype=ott_typein.tpy outtype=ott_typeout.tpy code=cpp \
> hfile=ott_type.h cppfile=ott_type.cpp mapfile=ott_type.cppset

OTT: Release 10.2.0.5.0 - Production on Thu Aug 15 13:02:21 CST 2013

Copyright (c) 1999, 2009, Oracle. All rights reserved.

System default option values taken from: /u01/app/oracle/product/10.2.0/db_1/precomp/admin/ottcfg.cfg

我们可以看到它成功了!我们更改了 userid 的密码:

[oracle@db oracle]$ ott userid=ott/ottwrong intype=ott_typein.tpy outtype=ott_typeout.tpy code=cpp \
> hfile=ott_type.h cppfile=ott_type.cpp mapfile=ott_type.cppset

OTT: Release 10.2.0.5.0 - Production on Thu Aug 15 13:21:00 CST 2013

Copyright (c) 1999, 2009, Oracle. All rights reserved.

System default option values taken from: /u01/app/oracle/product/10.2.0/db_1/precomp/admin/ottcfg.cfg

java.sql.SQLException: ORA-01017: invalid username/password; logon denied

at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:692)
at oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:352)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:453)
at oracle.jdbc.driver.T2CConnection.<init>(T2CConnection.java:133)
at oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:77)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:753)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at oracle.ott.Konnection.getTheConnection(Konnection.java:110)
at oracle.ott.Konnection.<init>(Konnection.java:39)
at oracle.ott.Doit.main(Doit.java:98)
at oracle.ott.c.CMain.main(CMain.java:9)

O2T-1117, Error reported by subsystem:
ORA-01017: invalid username/password; logon denied


O2T-102, ERROR: Unable to connect to schema "ott"

[oracle@db oracle]$

关于c++ - 使用 oracle 的 OTT 实用程序时遇到问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18241869/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com