Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ORA-01019: unable to allocate memory in the user side

 
Anil Deshpande
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
i have installed Windows Vista, and working on Oracle 10 g Express Edition. I have written the progam to test my jdbc connection. but it is throwing the sql exception. I know it's the problem with the Oracle not java. The solution in the oracle is that to increase the buffer size of the heap. I tried that by going to odbc connection in administrative tools. Initially it was 64kb, I increased it to 128kb. But it's Not helping. I am giving the complete code.Tables have been created properly. I am able to query them in Oracle.

I googled and tried to find out the solution through Oracle data base forums. But no where the proper solution to increase the buffer size has been provided.
Please help me.

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class TestDataBaseConnection {

/**
* @param args
*/
public static void main(String[] args)
{
// TODO Auto-generated method stub
try
{
System.out.println(0);
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
System.out.println("anil");
Connection con=DriverManager.getConnection("jdbcdbc:anil","scott","tiger");
System.out.println(1);
Statement st=con.createStatement();
System.out.println(2);
ResultSet rs=st.executeQuery("select * from users");
System.out.println(3);

while(rs.next())
{
System.out.println(" "+rs.getString(1)+"\t"+rs.getString(2));
}

}catch(ClassNotFoundException cnf)
{
System.out.println(cnf);
}
catch(SQLException sql)
{
System.out.println(sql);
}

}
}


THE EXCEPTION BEING THROWN IS

0
anil
java.sql.SQLException: [Microsoft][ODBC driver for Oracle][Oracle]ORA-01019: unable to allocate memory in the user side
 
Scott Selikoff
author
Saloon Keeper
Posts: 4020
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oracle specific question not related to JDBC, so moving it to that forum...
 
Campbell Ritchie
Sheriff
Pie
Posts: 49733
69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't know, but when I googled I found this and this. Don't know whether they help you, but have a look at them.
 
Jelle Klap
Bartender
Posts: 1952
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Quick question, why are you using a JDBC-ODBC bridge instead of directly using the JDBC driver provided by Oracle?
 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anil,
I installed Oracle XE database on my PC running Windows XP.
I used the Oracle JDBC driver in order to connect to the database from my java code.
The XE database default installation sets up the HR sample schema.
The database connection URL I use is:

jdbc racle:thin:hr/hr@//localhost:1521/XE

Good Luck,
Avi.

[edit]Disable Smilies. CR[/edit]
[ August 25, 2008: Message edited by: Campbell Ritchie ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic