A mobile geodatabase is an implementation of the geodatabase using an SQLite database and is stored as a single file in a folder. You can create a mobile geodatabase directly in a folder in the Catalog pane or by running a geoprocessing tool or a Python script.
For information about feature class and table name lengths and other size limits, see Mobile geodatabase size and name limits.
Learn how to create a mobile geodatabase using one of the workflows described below.
Use the Catalog pane in ArcGIS Pro
To create a mobile geodatabase in the Catalog pane in ArcGIS Pro, complete the following steps:
- Start ArcGIS Pro and open the Catalog pane if necessary.
- Right-click Databases or a folder under Folders in the Catalog pane, and click New Mobile Geodatabase.
- On the New Mobile Geodatabase dialog box, browse to the location where you want to create a mobile geodatabase, provide a name, and click Save.
A mobile geodatabase is created in the location you selected and is automatically added to the project under Databases in the Catalog pane.
See Datasets for a list of dataset types and geodatabase behaviors that are supported in mobile geodatabases in ArcGIS Pro.
Use the Create Mobile Geodatabase tool
To create a mobile geodatabase using the Create Mobile Geodatabase tool, complete the following steps:
- Open the Create Mobile Geodatabase tool in ArcGIS Pro.
You can use search to find the tool or open it directly from the Workspace toolset in the Data Management toolbox.
- Specify the folder location where you want the mobile geodatabase to be created.
- Provide a name for the geodatabase.
- Click Run.
A mobile geodatabase is created in the location you specified.
See Datasets for a list of dataset types and geodatabase behaviors that are supported in mobile geodatabases in ArcGIS Pro.
Run a Python script
To create a mobile geodatabase from a machine where ArcGIS Server or ArcGIS Pro is installed, you can run a Python script that calls the CreateMobileGDB_management function. This is useful if you need to create a mobile geodatabase from an ArcGIS client on a Linux machine or if you want to have a reusable, stand-alone script that you can alter and use to create other mobile geodatabases from Python.
Tip:
Because Python scripts run in Wine on Linux machines, use the Microsoft Windows path separator (\) for directory paths. In the examples provided below, Z: is the root directory.
The following steps provide examples of how to use Python to create a mobile geodatabase:
- Open a Python command prompt.
- Either run a stand-alone script or type commands directly into the interactive interpreter.
In the first example, the createmgdb.py script contains the following information:
# Import system modules import os import sys import arcpy # Set workspace arcpy.env.workspace = r"Z:\home\user\mydata" # Set local variables out_folder_path = r"Z:\home\user\mydata" out_name = "mymgdb.geodatabase" # Run CreateMobileGDB arcpy.management.CreateMobileGDB(out_folder_path, out_name)
After you alter the script to run at your site, you can call it from a command prompt or Python window.
In the following example, the Python commands are typed at the command prompt to create a mobile geodatabase (mymgdb.geodatabase) in the gdbs directory in the user's home directory on a Linux machine:
import arcpy arcpy.management.CreateMobileGDB(r"Z:\home\user\gdbs", "mymgdb.geodatabase")
See Datasets for a list of dataset types and geodatabase behaviors that are supported in mobile geodatabases in ArcGIS Pro.