Removing and preventing connections

865
4
08-30-2011 10:33 AM
ShaunConway
Occasional Contributor II
Hello Everyone,

Background: Arc10, SQLServer, mix of both direct connect and sde service connected clients.

I am updating our maintenance scripts developed previously for 9.3. I was wondering what the best method for killing all user connections and then preventing new user connections. We do this for compressions etc. My first thoughts were:

Option A: SDEMON -o KILL -t ALL, followed by SDEMON -o Pause.

Optioni B: SDEMON -o shutdown -N

The sdemon documentation explicitly states that the pause command will block both direct connect and sde service connections. Will the shutdown command do the same? It seems as though this will just stop the service and not affect the direct connections.

Are there any other methods?
0 Kudos
4 Replies
VinceAngelo
Esri Esteemed Contributor
Option B could include a 'pause' before shutdown, but then it will still be paused at restart
(at least, that's the way it worked when I last tried it - circa 9.1).

Similarly, if you pause before kill, you won't have a race condition window for (re)connect.

- V
0 Kudos
ShaunConway
Occasional Contributor II
Thanks Vince,

I think we are going to go with sdemon pause as it blocks any new user attempting to connect from both direct and sde services.

I did have a follow up question: We would like to take advantage of the sdemon kill command,  but our DBA is a bit hesitant on adding the user account we use for system maintenance to the sysadmin group on sql server. The reason being that there are a few other databases on the server. Is there any other alternative method to the sdemon kill command that doesn't require the user to be a member of the sysadmin group?

Thanks,
Shaun
0 Kudos
VinceAngelo
Esri Esteemed Contributor
Esri doesn't have any control over the permissions required to kill database jobs.  The application
server processes are killable by the owning service, but Direct Connect sessions require what
Microsoft says is necessary to get the job done.

- V
0 Kudos
JonDeRose
Esri Contributor
The 'sdemon -o pause' command will block both application server connections (ASC) and direct-connections for all users with the exception of the 'SDE' or admin user account to enable maintenance.  This is true for all versions including the most recent 10 sp2.
0 Kudos