3

This is the command I run on the command prompt:

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

This is the error i get:

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

I can't figure out how to properly register my connection. Can someone help shed some light on this issue I'm having?

APC
  • 144,005
  • 19
  • 170
  • 281

1 Answers1

1

As it says,your username or password is wrong.

I create a new user and connected:

SQL> create user ott identified by ott;

User created.

SQL> grant connect,resource to ott;

Grant succeeded.

SQL> conn ott/ott

Connected.
SQL>

Then create an object named ott_type:

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

Type created.

SQL>

Then I create an intype file:

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

Now I'll convert it using 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

We could see it successed!And we change the password for 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]$ 
luolee.me
  • 21
  • 2
  • It's different error. OP got `O2T-1118` and you got `O2T-1117`. But seems that it happens for a same reason - credentials are wrong. Just a username wrong, not a password. – ThinkJet Aug 15 '13 at 06:41
  • I tried exactly what you entered and i'm still getting the same error. I know i'm not entering an incorrect username/password. The error code I got is different from what you created as ThinkJet has pointed out. – user1139981 Oct 15 '13 at 22:07