Various connection time to SQL Server accross a LAN - connection

I am connecting to a SQL Server Express 2005 on another PC on our company LAN.
On my PC (which has Windows7) the connection is immediate. On our tester PC (who has Windows XP), the connection takes about 5 to 6 seconds every time. This is the same network and the same server.
I am not talking about a connection through an application, but also through the control panel or anything else.
Any suggestion where this time difference may be coming from, what setup option might be involved or how we can speed up the connection on the XP PC?

Is the XP computer using an IPv4 address while you and the server are using IPv6? Could be an issue with the routers/switches along the way.

Related

Best approach to check if host / port (industrial device) is reachable using Delphi 6 (or 7)

I have a program in Delphi 6 which connects to an industrial device (2d barcode scanner), using TCP/IP on a specific port. The scanner socket is not connected all the time, only when operator performs a certain operation. At that time, I would like to connect to the scanner, or show that it's offline (example: someone could have taken the cable out).
I have
IDScannerConnection: TIdTelnet;
Assuming connection is not available - wrong IP setting, cable out, wrong port, ... : If I just do IDScannerConnection.connect; Windows will freeze the program until it times out, which is several long seconds. Even inside a try/except.
I have tried the procedure here but it does not register if connection is available.
So, what's the best approach ? Connection to said device is using Telnet, to get an even when data is available. I can run a console program externally if I have to. In general I am fairly flexible around solutions, as long as operator does not experience a long timeout.
Unfortunately I am stuck in D6 and Indy9, can't upgrade these at the moment.

Unresponsive Windows if nothing is picking up COM port data

I made a Delphi application that transmits data to COM port every second. The COM port is a virtual null-modem (com0com) between the data transmitting software and a VirtualBox machine. Everything is fine, but if nothing is listeninig at the other end Host Windows becomes increasingly unresponsive.
After I went from com0com to pure hardware solution the problem disappeared. Also my application in virtual machine stopped to hang regularly.

How to build a proxy to monitor database

I have a network with a InterBase database. On this database server I want a Delphi program what monitors the connections/data to and from the database.
So when a client connects to the InterBase server the Delphi program will catch the connection (port 3050) and passes it through to the InterBase (port 3050). So the program will have to listen to the same port as the InterBase?
The main purpose is to detect network problems like CLOSE_WAIT and other loss of connection to the database. I want to know when this happens. Also I want to cache the data, so when a connection problem occurs it can continue for some milliseconds. If connection is down for longer I want a signal to the clients, so they have to stop transmitting.
I am new to Delphi (and Indy). But I can’t find examples how to do this. All the search hits is how to make connections behind a proxy. But I have to make my own ‘proxy’.
I use Delphi XE2 – Indy 10.5.8.0

TCP/IP connectivity via DataSnap

I wrote a multi-tier application suite in Delphi XE, using DataSnap (VCL application).
This will be used internally, in my company, mostly to replace the outdated fax communication.
Everything works fine, but I came across an unpleasant situation: The server machine is behind a router, so it has an internal network IP. I forwarded (in the router) all incoming connections on port 211(DataSnap default) to the server's internal IP and about 8 times out of ten all the clients connect to the server without any problems.
The problem is that for the rest 2 times I get all sort of connection errors (mostly connection timed out). When it does this I have to close and reopen either the server application either (some of) the clients, and then it works.
Right now I'm still in the design phase, so it's only a bother, but when I do release it I don't want either to tell everyone NOT to EVER close the application (once it works, it works, no more problems), either close and reopen the applications each time there is a connection problem.
How can I eliminate this problem?
I had (only) a look at NetCat and SoCat, but (to me) it seems overkill for this situation. Is there another way to solve this?
The solution was switching off router's internal firewall.

How do I connect my delphi client to a server over the internet using indy?

I have a delphi application (made in delphi 7) using the indy components. I can connect them both locally and they both transfer data just fine etc. Now I would like to host my delphi application on a server over the internet. What would be required to do this? What kind of server would I need and how would they connect to each other?
Your question seems to have nothing to do with Indy or Delphi at all.
To connect to a server on the internet, you need a server on the internet. That is to say, you would need a PC running windows, that has a publically available IP address, or one of the following:
A VPN that allows you to dial in to a private network. A Vpn would provide you with a lot more security than you would get putting your windows PC/server machine directly onto the internet with a public IP.
A hosted machine, somewhere with a fast internet connection, usually located at an ISP (called co-location), or a "cloud instance" (a virtual machine hosted by a major "cloud hosting" provider such as Amazon EC2 or Windows Azure). Note that Delphi XE has some special features for working with Cloud computing (Azure and Amazon). You can get such services all over the place and then you will have a server machine with a fast internet connection, which you can do whatever you want with, including installing your server software. This costs money, of course.
Make sure the server PC is exposed on the Internet so that the client PC can see it, and the client and server software should work exactly like they do when running on the same PC.
If your server computer has a non routable IP address that can't be seen from the Internet, you will have to get some help from your router. For example, have any connect requests on a certain port redirected to the internal IP address of your server PC.

Resources