Generate File Geodatabase License (Data Management)

Summary

Generates a license file (.sdlic) for displaying the contents in a licensed file geodatabase created by the Generate Licensed File Geodatabase tool. The license file must be installed using ArcGIS Administrator.

Note:

Licensing is not supported for geodatabases created earlier than version 10.1.

Usage

  • Once licensed, a file geodatabase’s contents cannot be displayed in ArcGIS Pro until you install the license file (.sdlic) using ArcGIS Administrator.

    To install the license file in ArcGIS Administrator, you must do the following:

    1. Install ArcGIS Desktop.
    2. Choose the Data Licenses folder in the ArcGIS Administrator table of contents.
    3. Click Add a license, browse to the license file (.sdlic), and click Open.
    4. Click Yes to install the license.

  • The Allow export of Vector Data parameter determines if an end user can export vector data within the licensed file geodatabase.

  • The Expiration Date parameter defines an expiration date for the license file, after which the file geodatabase’s contents can no longer be displayed. This allows a set term for a licensed geodatabase. The default value is empty (blank), which means the data license file will never expire.

  • You cannot individually license a feature class or table to produce a mixed state where some feature classes or tables are licensed and others are not. However, a licensed file geodatabase allows you to add an unlicensed feature class or table through operations such as creating a new, empty feature class, copying and pasting, and importing.

Syntax

arcpy.management.GenerateFgdbLicense(in_lic_def_file, out_lic_file, {allow_export}, {exp_date})
ParameterExplanationData Type
in_lic_def_file

The license definition file (.licdef) created by the Generate Licensed File Geodatabase tool.

File
out_lic_file

The license file (.sdlic) for distribution.

File
allow_export
(Optional)

Indicates whether the export of vector data is allowed.

  • DENY_EXPORTVector data cannot be exported with the data license file (.sdlic) installed. This is the default.
  • ALLOW_EXPORT Vector data can be exported with the data license file (.sdlic) installed.
String
exp_date
(Optional)

The expiration date of the data license file, after which the file geodatabase’s contents can no longer be displayed. The default value is empty (blank), which means the data license file will never expire.

Date

Code sample

GenerateFgdbLicense example 1 (Python window)

The following example demonstrates how to use the GenerateFgdbLicense function in the Python window.

import arcpy
arcpy.env.workspace = "C:/data"
arcpy.GenerateFgdbLicense_management("london.licdef", "london.sdlic", "ALLOW_EXPORT", "2013-09-26 18:35:54")
GenerateFgdbLicense example 2 (stand-alone Python script)

The following example demonstrates how to use the GenerateFgdbLicense function in a stand-alone Python script.

# Name: GenerateFgdbLicense.py
# Description: Use the GenerateFgdbLicense tool to generate a license file (*.sdlic) for a protected file geodatabase.

# import system modules
import arcpy

# Set environment settings
arcpy.env.workspace = "C:/data"

# Set local variables
input_licdef = "london.licdef"
export = "DENY_EXPORT"
exp_date = "2013-09-26 18:35:54"
output_sdlic = "london.sdlic"

# Process: generate the license file
arcpy.GenerateFgdbLicense_management(input_licdef, output_sdlic, export, exp_date)

Environments

Licensing information

  • Basic: No
  • Standard: Yes
  • Advanced: Yes

Related topics