Create a mobile geodatabase

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 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 methods described below.

Use the Catalog pane in ArcGIS AllSource

Follow these steps to create a mobile geodatabase in the Catalog pane in ArcGIS AllSource:

  1. Start ArcGIS AllSource and open the catalog pane, if necessary.
  2. Right-click Databases or a folder under Folders in the Catalog pane and click New Mobile Geodatabase.
  3. On the New Mobile Geodatabase dialog box, browse to the location where you want to create a mobile geodatabase, type 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 AllSource.

Run the Create Mobile Geodatabase tool

To run the Create Mobile Geodatabase tool, complete the following steps:

  1. Open the Create Mobile Geodatabase tool in ArcGIS AllSource.

    You can use search to find the tool or open it directly from the Workspace toolset of the Data Management toolbox.

  2. Specify the folder location where you want the mobile geodatabase to be created.
  3. Type a name for the geodatabase.
  4. 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 AllSource.

Run a Python script

To create a mobile geodatabase from a machine where ArcGIS Server or ArcGIS AllSource 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, Z: is the root directory.

The following steps provide examples of how to use Python to create a mobile geodatabase:

  1. Open a Python command prompt.
  2. 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
    env.workspace = "Z:\home\user\mydata"
    
    # Set local variables
    out_folder_path = "Z:\home\user\mydata"
    out_name = "mymgdb.geodatabase"
    
    # Run CreateMobileGDB
    arcpy.CreateMobileGDB_management(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 this 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.CreateMobileGDB_management("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 AllSource.