I have connected java with oracle over lan, in connection string i have provided the IP address, now the startup is very slow, how can i make it fast, i have already asked the same question in java forum but no responce, so i thought oracle expertise can answer this question.

Re: Java oracle connection 80 80

What exactly you mean by startup is very slow ?

Re: Java oracle connection 80 80

when i double click application, it takes some time to connect with oracle server but that time is almost 15 sec, i want to make it 4 or 3 sec, i have also opened a port , tried both TCP AND UDp but nothing worked.... so is there any way to make connection with oracle database server faster?

Re: Java oracle connection 80 80

How fast you are able to connect to oracle server form any client on the same machine as your application . Is is faster than your application connection time ?

Re: Java oracle connection 80 80

On same machine, when i use localhost rather then IP , it connect with in 2 sec. Even on same machine when i use its IP it connect faster, but over lan its very slower

Re: Java oracle connection 80 80

Tell me first the database is on the same machine from which you are trying to connect or on another server over LAN ?

Re: Java oracle connection 80 80

Database server is on 192.168.1.10 and i m connecting from 192.168.1.50, simply different machines.

Re: Java oracle connection 80 80

and how fast is the ping request

try using system / server name instead of IP.

Re: Java oracle connection 80 80

time<1mS

Re: Java oracle connection 80 80

what about tnsping ?

Re: Java oracle connection 80 80

How i m supposed to do this? :)

Re: Java oracle connection 80 80

type tnsping <database_name> at command prompt and check the response time.


ex---- tnsping orcl

Re: Java oracle connection 80 80

tnsping only working on database server, not working from any other computer over lan

Re: Java oracle connection 80 80

tnsping only working on database server

who told you ?

It will work from each and every system that has oracle client installed and has the TNS set, and can access the server over any network like LAN.

Re: Java oracle connection 80 80

Actually, its not oracle application, its completly created in java, i have connected it with connection string

jdbc:oracle:thin@192.168.1.10

There is no oracle client installed on any system over lan, if u suggest it will make it fast, then i will use it.

Re: Java oracle connection 80 80

Find more connection stings here.

Re: Java oracle connection 80 80

Do u think, changing connection string make the connection faster? Have u tried it before.... I thought making multiple port opening can make app faster?

Re: Java oracle connection 80 80

It is not the connection string but he driver that you are using to use the connection string internally makes all the difference.

Which port you are going to open ?

Re: Java oracle connection 80 80

1521-1540, yes indeed driver, but i m not understanding your point. Do u want to say that driver is slow to create connection at startup? I have to change driver?

Re: Java oracle connection 80 80

Oracle works on 1521 and 1522 only, using other ports may not help.

Re: Java oracle connection 80 80

No solution yet... app is still very slow.. I wonder is there any solution or not, tns ping takes 30msec

Re: Java oracle connection 80 80

Are you doing any other processing in application startup or only database connection ?

Re: Java oracle connection 80 80

no processing, just the connection string at startup,
I have a seperate thread for it.

//class conn
jdbc:oracle:thin:@192.168.1.10:database:user:password

//main class
while(conn class is alive)
{
wait
}
fetch connection from conn class for executing query.
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.