SDE Lost connection : Underlying DBMS error (-51) Underlying DBMS error[Microsoft SQL

5339
7
02-29-2012 03:03 PM
shaileshgavathe
Occasional Contributor II
We are seeing the error sometimes in ArcGIS Server Logs, where we have REST services published.

SDE Lost connection : Underlying DBMS error (-51) Underlying DBMS error [Microsoft SQL Server Native Client]


This our environment :

ESRI ArcGIS Server 9.3
ESRI ArcGIS Desktop 9.3
ESRI ArcSDE 9.3
SQL Server 2005 SP4.

We have versioned GDB.  The database has many insert/update/delete operation per each spatial table.

I read somewhere on ESRI forum that ArcSDE 9.3 is recommended with SQL Server 2005 SP2 level and ours is SP4.

Any insight will be appreciated.




Thanks,
SG.
0 Kudos
7 Replies
LeoDonahue
Occasional Contributor III
Do you know how to run sde command line?  If so, try this:

sdeconfig -o alter -v TCPKEEPALIVE=TRUE -i esri_sde -u sde -p password 

when it asks you if you want to update, type Y for yes.

Assumptions:  esri_sde is the name of your ArcSDE service, sde is the name of your sde account, password is your sde account password

Ok, after some consideration, this might not be your problem.  This fixes orphaned gsrvr processes which would result from ArcIMS or ArcGIS Server connections that time out.  You didn't mention either of those products, so this is probably bad advice.  Forget I said anything.
VinceAngelo
Esri Esteemed Contributor
You are using an elderly release of ArcSDE (9.3 sites should be at 9.3.1 SP2 by now),
but I doubt this is the issue.

The error is generated from the database, so looking in the database logs may be useful.

- V
0 Kudos
ThomasDunn
Occasional Contributor
I agree with Vince.  You can look in these places:

The SQL Server Error Log shows errors from server-wide processes. You can read about it at http://msdn.microsoft.com/en-us/library/ms187885(v=sql.90).aspx

The Default Trace, which when enabled performs continuous, lightweight tracing.  You can examine the trace using the SQL Server Profiler.  More information is available at http://msdn.microsoft.com/en-us/library/ms175513(v=sql.90).aspx

-- TAD
0 Kudos
shaileshgavathe
Occasional Contributor II
Thank You all for the suggestions. We have all direct connections. I do have a TCPKEEPALIVE param to TRUE for each service.

I did not see any error in ArcSDE or SQL server logs.  We have trace enabled at lower lever as you mentioned. Interestingly the error, i am seeing is in ArcGIS Server Logs and its very intermittent (most of the time, it happens after SQL server DB backup nightly jobs).

Will keep you posted more ...


Thanks,
Shay ...
0 Kudos
VinceAngelo
Esri Esteemed Contributor
If the connections are being terminated from the database side during a backup script, it's possible that
a restart of the database is severing the connections.

Are you sure you want TCPKEEPALIVE enabled?  It adds network overhead to the communication protocol to
detect the difference between a quiet connection and a hung client, and terminates the connection when
timeout is detected.

- V
0 Kudos
EmilyParson
New Contributor
Good luck!
0 Kudos
shaileshgavathe
Occasional Contributor II
We are working with ESRI Tech support and we are getting closed to resolving the issue that we have seen so far.

I will send the documentation as soon as i put them together, so it may help others.



Thanks and Regards,
Shay ....
0 Kudos