ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Aide
  • Sign Out
ArcGIS Desktop

ArcGIS Online

La plateforme cartographique de votre organisation

ArcGIS Desktop

Un SIG professionnel complet

ArcGIS Enterprise

SIG dans votre entreprise

ArcGIS Developers

Outils de création d'applications de localisation

ArcGIS Solutions

Modèles d'applications et de cartes gratuits pour votre secteur d'activité

ArcGIS Marketplace

Téléchargez des applications et des données pour votre organisation.

  • Documentation
  • Support
Esri
  • Se connecter
user
  • Mon profil
  • Déconnexion

ArcMap

  • Accueil
  • Commencer
  • Carte
  • Analyser
  • Gérer les données
  • Outils
  • Extensions

Set Data Owner

  • Résumé
  • Utilisation
  • Syntaxe
  • Exemple de code
  • Environnements
  • Informations de licence

Résumé

Alters a SQL Server database user to match the name of the specified schema and sets its default schema to the specified schema. This tool should be used in environments that prohibit the use of database users without associated logins and headless domain users. It allows users with appropriate database permissions to perform actions within the geodatabase that require the user to act as the data owner user.

Utilisation

  • Supports SQL Server geodatabases only.

  • The Database Connection must use OS authentication.

  • Will alter the database user of the associated login.

  • The associated database user must exist prior to executing this tool.

  • The database user must have the CREATE SCHEMA permission, or the associated schema must exist prior to executing this tool.

  • The database user must have rights to the target schema in order to perform actions within the geodatabase.

  • This tool will not automatically revert the database user to the previous state. When you have finished processing as the data owner, you must run the tool again while providing your DOMAIN\username as the target schema to release ownership of the previous schema.

  • Executing this tool may require you to restart your application if you had a previously open connection to the target database within the application session.

  • The suggested workflow for using this tool is the following:

    • Open the application.
    • Launch the tool.
    • Set parameters and execute the tool.
    • Connect to the target geodatabase.
    • Perform actions as data owner.
    • Launch the tool to revert user settings.
    • Set parameters and execute the tool.
    • Restart the application.

  • The tool will return an error message if the target schema does not exist in the database or if another user has already assumed ownership of the schema. The content of the error message will be determined by the permissions of the database user.

  • The tool may also automatically assume ownership of a target schema for which another user has previously assumed ownership if that user is not currently connected to the database. This feature requires advanced permissions.

Syntaxe

arcpy.defense.SetDataOwner(Connection_File, Schema)
ParamètreExplicationType de données
Connection_File

The enterprise geodatabase workspace stored in Microsoft SQL Server in which you will alter the database user.

String
Schema

The name of the schema that will be applied to the user.

String

Exemple de code

SetDataOwner example (Python window)

The following sample demonstrates how to execute the SetDataOwner tool.

# Importing necessary modules
from arcpy import defense

# Setting variables for tool inputs
sde_connection_file = r'C:\Data\MGCP_TRD_4_2.sde'
schema = 'new_schema_user'

# Calling Set Data Owner and passing in variables
defense.SetDataOwner(sde_connection_file, schema)

Environnements

  • Espace de travail courant

Informations de licence

  • Basic: Non
  • Standard: Requiert Defense Mapping
  • Advanced: Requiert Defense Mapping

ArcGIS Desktop

  • Accueil
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

A propos d'Esri

  • A propos de la société
  • Carrières
  • Blog d’Esri
  • Conférence des utilisateurs
  • Sommet des développeurs
Esri
Donnez-nous votre avis.
Copyright © 2021 Esri. | Confidentialité | Légal