I have a few databases located on a VPN.
Whenever I establish a new connection to these databases across the VPN, it takes along time (3-4 seconds). Once established, everything seems to run acceptably quick.
If I log into a box already inside the VPN, and use sqlplus to connect to the database from there, there is no delay.
When connecting with windows VPN the type appears as 'PPTP VPN'
Any ideas to the cause of the slowness, or a possible fix?
If the slowness is confined to the connection the usual cause is DNS (or rather the reverse lookup that the remote host may do on your IP address). Check that the remote host can resolve the IP address of your machine (are you using a virtual IP?).
It could be DNS, this can be tested with nslookup tool to see the query time.
It could be the tcp connection adjusting the window size. It shouldn't really take that long, maybe the connection is running a lot of errors.
For any slowness issues I will usually get a packet-cap to see what is going on. Is you computer sending out a ton of broadcasts once it connects to the network? arp flood? netbios? etc...
You should also capture the tcp sequence for your database connection, check for a large number of resends, or anything else obvious.
Also you may want to check the load on the wan interface and also check if the connection is running many errors, so check your error counts.