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.

Note:

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

Usage

  • The Allow Export of Vector Data parameter specifies whether an end user can export vector data in 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 in which 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 an empty feature class, copying and pasting, and importing.

  • Once you generate a license file using this tool, you must add the license to the project. See Manage file geodatabase data licenses for instructions.

Parameters

LabelExplanationData Type
Input License Definition File

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

File
Output Data License File

The license file (.sdlic) for distribution.

File
Allow Export of Vector Data
(Optional)

Specifies whether the export of vector data will be allowed.

  • Vector data cannot be exportedVector data cannot be exported with the data license file (.sdlic) installed. This is the default.
  • Allow export of vector data Vector data can be exported with the data license file (.sdlic) installed.
String
Expiration 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

arcpy.management.GenerateFgdbLicense(in_lic_def_file, out_lic_file, {allow_export}, {exp_date})
NameExplanationData 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)

Specifies whether the export of vector data will be 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.management.GenerateFgdbLicense("london.licdef", "london.sdlic", "ALLOW_EXPORT", "2013-09-26 18:35:54")
GenerateFgdbLicense example 2 (stand-alone 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.management.GenerateFgdbLicense(input_licdef, output_sdlic, export, exp_date)

Environments

Related topics