Should I Be Making Direct Connections To An ArcSDE Geodatabase?

This is a very common question that a number users ask. The Geodatabase Development Team has an excellent post on this. There are two ways to go about connecting to ArcSDE. One is to connect via the application server connection and the other is to make a direct connection. Essentially these are the same, the difference is where the work is being done.

I think the picture below sums it up nicely. This highlights how each connection method works.

550x480

So what is really happening here:

As you can see, the type of connection really just dictates where the spatial processing is being done (the gsrvr process in the graphic); in the direct connect case the gsrvr is process is executing on the connecting machine in the application server case the gsrvr is running on the machine in the server tier.

Now we address the question. Which one should you be using?

I know what you are saying “Okay, that’s great but which one do I use?”. In today’s world, desktop computers have become very powerful and I can see no reason why this trend won’t continue as hardware becomes less expensive. With this in mind, it makes good sense to distribute the gsrvr processes over all the connecting machines rather than force every connection to use the resources of one machine running an ArcSDE service. As a side note, the machine running the ArcSDE service is typically the DBMS server as well (the machine running the database) and by using direct connect you avoid overloading this machine with many gsrvr processes. Another advantage of direct connect is that it can help reduce network traffic because only the SQL statements and the fetched data is passed over the network.

Traditionally we have seen ourselves making connections via the application server. Recently the recommendation from ESRI is to make direct connections. Like mentioned above desktop and laptop computers are becoming very powerful and there is no reason to make a remote connection to a service that could be under load. 

Some users might ask what is the downside of using direct connect? Well there isn’t one.

Since we added the reverse compatibility of the direct connect drivers at 9.3 there really isn’t one. Well, to be truthful there is one consideration; you do have to make sure that the appropriate database client software is installed on the machine you are making the connection from. This usually isn’t a big deal, the database client installation is quick and painless and requires little configuration once installed. Even better, if you are connecting to SQL Server, that database client is already part of Windows so no installation is necessary. Similarly, for PostgreSQL, no additional database client installation is required.

I have recommending to a number of users to start making use of direct connect. This takes a substantial load of your database server and moves it up to the application server or desktop. This way the database server has enough resources to do what it does best, process SQL queries.

The full write up for this article can be found here: http://blogs.esri.com/dev/…



One Response to “ “Should I Be Making Direct Connections To An ArcSDE Geodatabase?”

  1. Rachel says:

    What I’d like to see is a discussion on the implications of using direct connect versus application connect in a published .mxd for ArcGIS Server.

    What are the implications here?

    I’ve had several discussions on this with my co-workers and have my own ideas but I’d love to see this covered by the GDB or Server team.

Leave a Reply