Home » SQL & PL/SQL » SQL & PL/SQL » ORA-12546 : TNS:permission denied (merged 2)
ORA-12546 : TNS:permission denied (merged 2) [message #409253] Sun, 21 June 2009 04:37 Go to next message
sasi_info@yahoo.co.in
Messages: 2
Registered: June 2009
Junior Member
Hi,
I am getting 'TNS:permission denied' error message while connecting oracle 9i database through Java program in Eclipse.

Java Code:

void getData() {
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); // Line 1
con = DriverManager.getConnection("jdbc:odbc:ecounsel_dsn", "user1", "user1"); // Line 2
st = con.createStatement();
rs = st.executeQuery("SELECT * FROM MATTER");
}
catch(Exception e) {
System.out.println("SQL Exception in getData() : "+e);
}
}

Exception Details:


SQL Exception in getData() : java.sql.SQLException: [Oracle][ODBC][Ora]ORA-12546
: TNS:permission denied

This exception happens in Line 2. I have given all privileges to the user.


Regards,
Sasi
Re: ORA-12546 : TNS:permission denied (merged 2) [message #409261 is a reply to message #409253] Sun, 21 June 2009 05:37 Go to previous messageGo to next message
Michel Cadot
Messages: 64109
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
ORA-12546: TNS:permission denied
 *Cause: User has insufficient privileges to perform the requested operation.
 *Action: Acquire necessary privileges and try again.

Regards
Michel
Re: ORA-12546 : TNS:permission denied (merged 2) [message #410491 is a reply to message #409261] Sat, 27 June 2009 06:55 Go to previous message
sasi_info@yahoo.co.in
Messages: 2
Registered: June 2009
Junior Member
Michel,
Thanks for the reply. I have given all the privileges to that user. But still I am getting that error. I created the user through TOAD. What privileges need to be given to the user to access a table?
Previous Topic: looping error
Next Topic: Analytic function ranking
Goto Forum:
  


Current Time: Mon Dec 05 09:10:16 CST 2016

Total time taken to generate the page: 0.11668 seconds