killconnections

RPLib – killconnections

RPLib.killconnections(Workspace=None)[source]

Allows an administrator to disconnect all users who are currently connected to an Enterprise geodatabase.

Parameter Type Description Required
Workspace String Path to SDE connection file Yes

Returns: Boolean

Usage

  • Only works with enterprise geodatabases.
  • This function is used by an administrative user to disconnect all users from an enterprise geodatabase.
  • If this function is attempted to be run by a non-administrative user the function will fail.

Example 1

Simple call with all parameters specified.

import RPLib

sdeOwner = "C:/GIS/SDEADMIN@GIS.sde"

RPLib.killconnections(sdeOwner)

Example 2

If Else logic with all parameters specified.

import RPLib

sdeOwner = "C:/GIS/SDEADMIN@GIS.sde"

if RPLib.killconnections(sdeOwner):
    print("successful, run another tool")
else:
    print("failed, run another tool")

Table Of Contents

Previous topic

resumeconnections

Next topic

compressgdb

This Page