ArcGIS Server Banner

File geodatabases and Windows Explorer

File geodatabases and Windows Explorer

Release 9.3 E-mail This TopicPrintable VersionGive Us feedback

NOTE: Managing file geodatabases, including copying, renaming, and deleting data, should always be performed with ArcGIS and not with Windows Explorer. The tools in ArcGIS are convenient and easy to use and ensure that no data loss or other problems will occur.

A file geodatabase stores as a folder of files. When you view the folder with Windows Explorer, apart from the .gdb extension, it looks like any other folder and you can view its contents. The folder contains cryptically named files that hold geographic data, attribute data, index files, lock files, and a signature file as well as other files. Each feature class or table in the geodatabase is stored in two or more files. By design, it is difficult, if not impossible, to tell which files make up any given dataset.

It is not possible to use Windows Explorer to perform an operation on an individual dataset

When you access the folder and its contents with Windows Explorer, several Windows commands are available. Although not recommended, some users will inevitably attempt to use some of these commands. This topic discusses what operations can and cannot be performed safely with Windows Explorer.

Copying, renaming, and deleting files

While a file geodatabase is analogous to a folder of shapefiles, there are some important differences regarding the use of Windows Explorer.

With shapefiles, it is possible to identify which files make up an individual feature class or table, since the names in Windows Explorer match the names of the datasets when viewed from ArcGIS. Although not recommended, it is possible to rename or delete a shapefile or copy it to another folder with Windows Explorer.

In file geodatabases, it is not possible to use Windows Explorer to perform an operation on an individual dataset. Renaming and deleting individual files in a file geodatabase folder and copying files to another location cause data loss and can render the geodatabase unusable. For example, if you use Windows Explorer to move files to another geodatabase folder, you won't be able to access the data. The contents of a file geodatabase folder are given cryptic names by design to discourage such operations. Operations on individual datasets can only be performed through ArcGIS.

Operations at the geodatabase level should also be performed solely through ArcGIS. However, it is possible to perform the following operations safely on a file geodatabase folder:

You cannot rename or delete the geodatabase folder at the same time another user is accessing the data.

Although not recommended, it is possible to copy a file geodatabase to another location by copying the folder to another location (if you're running Windows Vista, you also need to change the extension of the new folder to .gdb; otherwise, ArcGIS will not recognize it as a file geodatabase). Only copy a file geodatabase with Windows Explorer when you are certain there are no other processes accessing the data. The problem is that it can be difficult to tell if other processes are accessing the data. You may think there are no other processes; however, a process on your computer or another one could be accessing it. If you happen to copy the folder when another process is accessing the data, the data may not copy properly. An improper copy operation is often not apparent—you may not notice any problems until you access a certain part of the new copy a few days later.

Removing lock files

ArcGIS ensures data integrity by preventing multiple processes from simultaneously accessing data in conflicting ways. ArcGIS keeps track of processes by placing *.lock files in the file geodatabase folder each time a process accesses a dataset. When the process terminates, its lock files are automatically deleted.

When a process ends prematurely or crashes, lock files may be temporarily left behind in the geodatabase folder. ArcGIS eventually removes these files in future sessions as new locks are taken. In the meantime, such files do not continue to lock data, and as they take up no disk space, removing them provides no benefit. If you still want to remove them, you can delete them with Windows Explorer. However, exercise caution when doing so—accidental deletion of files other than lock files will likely corrupt the data. If when you delete the lock files you notice that some cannot be deleted, it is because they are still active—another process on your computer or another one is still accessing the data. You will not be able to remove these locks until the processes holding them terminate.

The GP Compact tool and Copy/Paste, both available in ArcCatalog, also delete unused lock files. The GP Compact tool compacts the geodatabase, removing all inactive lock files in the process. Copying and pasting a file geodatabase removes all inactive lock files from the source geodatabase before copying data to the new geodatabase.

Setting permissions

The file geodatabase does not have authentication or authorization capabilities.

You can share a file geodatabase folder as read-only with Windows Explorer. In this case, the read-only user can display and query but not edit the data. Also, users with write access can modify the data while others are reading it. When those reading the data refresh their ArcMap display, any changes saved by other users transfer into their display. Refresh never brings in unsaved edits, so it is not possible for a user to read changes made by another user that have not been saved. If you want to prevent other users from accessing data while you're editing it, unshare the folder before modifying the data.

It is not possible to control access to individual datasets by modifying the permissions of individual files within a file geodatabase folder.

NOTE: Just like when you work with other types of files, it's a good idea to regularly back up your file geodatabase in case something goes wrong.

See Also

  • File geodatabases and locking