Available with Standard or Advanced license.
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 created in your target database will contain the following:
- Data types supported by ArcGIS
Any columns that cannot be mapped to an ArcGIS data type will not be created in the feature class in the target database.
- One spatial column
For feature classes, ArcGIS copies the first spatial column it encounters; the second will not be created in the target feature class. If you want to use the second spatial column, create a view or a query layer on the source table that only contains the second spatial column. If you create a view, you can copy the view from the source database and paste it into the target database as a feature class. If you define a query layer, you can export the data from the query layer to a new feature class in the target database.
- One geometry type
ArcGIS reads the geometry type (point, line, polygon, or multipoint) of the first feature in the source feature class. Only those features that match the geometry type of the first row will be pasted into the feature class in the target database. If your source feature class contains multiple geometry types and you want to control the geometry type used in the target feature class, create a query layer of the source feature class and define the geometry type for the query layer. Next, export the data from the query layer to a feature class in your target database. The feature class created in the target database will contain only the features that match the geometry type you defined for the query layer.
- One coordinate setting
ArcGIS reads the spatial coordinate properties (xy, xyz, xym, xyzm) stored with the first feature in the source feature class. The features in the feature class you paste into the target database will all have the coordinate properties. For example, if the first feature in the source feature class has x,y- and z- but not m-coordinates, any features that had m-coordinate information in the source feature class will not have it in the target feature class. Similarly, any feature that had only x,y-coordinates in the source feature class will have x,y- and z-coordinates in the target feature class (the z-coordinate is set to 0).
To make sure all coordinate information is preserved in the target feature class, create a query layer of the source feature class and define its spatial properties to include m- and z-values. Next, export the data from the query layer to a feature class in the target database. All features in the feature class created in the target database will use the spatial coordinate settings you defined for the query layer.
- One spatial reference
If your source feature class has a spatial reference defined that ArcGIS recognizes, the same spatial reference is used for the feature class in the target database. If the spatial reference is not defined for the feature class, ArcGIS uses the spatial reference of the first row in the table. Records that do not match that spatial reference are not created in the feature class in the target database. If, instead, the spatial reference cannot be identified for the feature class or the first row (for example, if a custom spatial reference is used), the spatial reference used in the target feature class varies depending on your database management system. See Spatial references for more information.
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:
- Start ArcMap and open the Catalog window.
- From the Catalog tree, make connections to both the source and target databases.
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.
- Prepare the data to be moved if necessary.
- If you want to move a feature class that has features with different coordinate settings, geometry types, or spatial references, create a query layer and modify the query layer properties. Choose to include z- and m-coordinates, set the geometry type, and choose a 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 the remaining steps to copy and paste the view.
- Right-click the table, feature class, or view in the source database and click Copy.
- 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.
- If you are moving a feature class, the Data Transfer dialog box appears 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, and click OK.
The new table or feature class is created in your destination database.