Change Privileges (Data Management) (ArcInfo and ArcEditor only) |
|
Release 9.2
Last modified November 29, 2010 |
![]() ![]() ![]() Print all topics in : "Tools" |
Establishes or changes user access privileges to the input ArcSDE dataset, stand alone feature class, or table.
Usage tips
To edit ArcSDE datasets both the View and Edit parameters must be granted. Edit privileges are dependent on the View privilege, since you can't edit what you cant see (view).
Edit privileges may be revoked, but you can still view the dataset. However, if the View privilege is revoked, the Edit privileges will automatically be revoked as well.
The possible privilege combinations and their outcome are as follows:
Edit privileges should only be granted on a versioned database. To edit the dataset the database must be versioned and you must have both View and Edit privileges.
The relational database management system (RDBMS) equivalent command for the View parameter is Select.
The RDBMS equivalent commands for the Edit parameter are Update, Insert, and Delete. All three are granted or revoked simultaneously by the Edit parameter.
Learn more about creating and administering versions in ArcCatalog or An overview of the Versions toolset.
The environment settings don't have an effect on this tool.
Command line syntax
An overview of the Command Line window
ChangePrivileges_management <in_dataset> <user> {AS_IS | GRANT | REVOKE} {AS_IS | GRANT | REVOKE }
Parameter | Explanation | Data Type |
<in_dataset> |
The dataset, feature class, or table whose access privileges will be changed. |
Layer | Table View | Dataset |
<user> |
The database username whose privileges are being modified. |
String |
{AS_IS | GRANT | REVOKE} |
Establishes the users View privileges.
|
String |
{AS_IS | GRANT | REVOKE } |
Establishes the users Edit privileges.
|
String |
workspace "Database Connections/Connection to Redlands.sde" ChangePrivileges c_williams.landuse j_smith GRANT GRANT
Scripting syntax
About getting started with writing geoprocessing scripts
ChangePrivileges_management (in_dataset, user, view, edit)
Parameter | Explanation | Data Type |
in_dataset (Required) |
The dataset, feature class, or table whose access privileges will be changed. |
Layer | Table View | Dataset |
user (Required) |
The database username whose privileges are being modified. |
String |
view (Optional) |
Establishes the users View privileges.
|
String |
edit (Optional) |
Establishes the users Edit privileges.
|
String |
# Purpose: Change user privileges on a dataset # Create the Geoprocessor object import arcgisscripting gp = arcgisscripting.create() try: # Set the workspace (to avoid having to type in the full path to the data every time) gp.Workspace = "Database Connections/Connection to Redlands.sde" # Process: Update user privileges gp.ChangePrivileges("c_williams.landuse", "j_smith", "AS_IS", "GRANT") except: # If an error occurred while running a tool print the messages print gp.GetMessages()