Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't connect to Oracle db #136

Closed
Jrsnow8921 opened this issue Sep 22, 2015 · 2 comments
Closed

Can't connect to Oracle db #136

Jrsnow8921 opened this issue Sep 22, 2015 · 2 comments

Comments

@Jrsnow8921
Copy link

I am trying to connect to my Oracle db, but for some reason I am unable to do so. Any help would be # greatly appreciated!(I changed my sid, username, and password for security reasons to display my issue)

Here is the error -->

programmer@snowserver:~$ ora2pg -u interact
DBI connect('host=172.16.1.139;sid=test;port=1521','interact',...) failed: ORA-01017: invalid username/password; logon denied (DBD ERROR: OCISessionBegin) at /usr/local/share/perl/5.18.2/Ora2Pg.pm line 1139.
FATAL: 1017 ... ORA-01017: invalid username/password; logon denied (DBD ERROR: OCISessionBegin)
Aborting export...

I can however access my oracle db with the same credentials via sqlplus

programmer@snowserver:/opt/oracle/instantclient_11_2$ ./sqlplus testuser/somepassword@test

SQL*Plus: Release 11.2.0.4.0 Production on Tue Sep 22 10:07:48 2015

Copyright (c) 1982, 2013, Oracle. All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>

I'm using Xubuntu
Oracle db is 11g

Here is my bash---

export ORACLE_HOME=/opt/oracle/instantclient_11_2/
export ORACLE_SID=test
export TNS_ADMIN=/opt/oracle/network/admin/tnsnames.ora

Here is my tnsname.ora

test =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.1.139)(PORT = 1521)
)
(CONNECT_DATA =
(SERVICE_NAME= test)
)
)

And here is my ora2pg.conf

ORACLE_HOME /opt/oracle/instantclient_11_2

TNS_ADMIN /opt/oracle/instantclient_11_2/network/admin/tnsnames.ora

ORACLE_DSN dbi:Oracle:host=172.16.1.139;sid=test;port=1521
ORACLE_USER testuser
ORACLE_PWD somepassword

USER_GRANTS 1

DEBUG 0

ORA_INITIAL_COMMAND

@darold
Copy link
Owner

darold commented Sep 22, 2015

Hi,

Why are you using a tnsnames.ora? You don't need it when using instantclient and DBI. Everything is in the datasource.

Try to reset TNS_ADMIN and let me know.

Regards,

@Jrsnow8921
Copy link
Author

Okay that worked thank you! @darold

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants