Copy and paste data between databases in ArcGIS

You can copy data from a database and paste it into another database or a geodatabase through ArcGIS for Desktop.

When you move data from one database type to another, the data types used for the attributes in your table may change. For example, if you copy a table from SQL Server that has a UniqueIdentifier field, when you paste it into a PostgreSQL database, it will be a Varchar field.

Be aware that ArcGIS cannot paste data types or definitions it doesn't support. That means the table or feature class that is created in your target database will contain:

The following steps explain how to move a table, feature class, or view between databases or from a geodatabase to a database using copy and paste.

Steps:
  1. Start ArcMap and open the Catalog window.
  2. From the Catalog tree, make connections to both the source and target database.

    Be sure to connect to the source database as a user with privileges to access the data in the source database, and connect to the target database as a user with database privileges sufficient to create tables.

  3. If necessary, prepare the data to be moved. or multiple spatial columns, on the feature class and include to determine which properties and columns will be created to the properties on the source feature class.

    If you create a query layer, proceed with the steps in to move your data to the target database.

    • If you want to move a feature class that has records with different dimensionality, geometry types, or spatial references, drag the table onto the map and modify the resultant query layer, choosing one dimensionatliy, geometry type, or spatial reference. To move the data to the target database, export the query layer. (You can't copy and paste a query layer.)
    • If the feature class has multiple spatial columns, create a database view that includes only one of the spatial columns and proceed with copying and pasting.
  4. Right-click the table, feature class, or view in the source database and click Copy.
  5. Right-click the target database in the Catalog tree and click Paste.

    The data in the target database is owned by the login you used to connect to it.

    NoteNote:

    To paste data into a PostgreSQL or SQL Server database, the user connected to the target database must have a schema with the same name as the database user name.

  6. Alternatively, you can choose the table, feature class, or view in the source database and drag it to the target database. This drag-and-drop procedure performs the same actions as a copy and paste procedure.
  7. If you are moving a feature class, the Data Transfer dialog box opens so you can choose which spatial type to use for the spatial column in the destination database. Click in the Config Keyword column, choose a spatial type from the drop-down list, then click OK.

The new table or feature class is created in your destination database.

Related Topics

2/5/2015