Skip To Content

Move enterprise geodatabases in SQL Server between AWS instances

You can move an existing enterprise geodatabase in SQL Server Express from one ArcGIS Enterprise on Amazon Web Services instance to another by detaching the database files and transaction logs from one SQL Server Express instance, moving them to the target ArcGIS Enterprise on Amazon Web Services instance, and attaching them to the new SQL Server Express instance.

Note:

This workflow does not apply to Amazon Relational Database Services for SQL Server.

When would you use this method to move data?

You might use this method if you created a new ArcGIS Enterprise on Amazon Web Services instance and you want to move a geodatabase from your existing instance (the source instance) to the new instance (the target instance).

Moving individual geodatabases in SQL Server Express between instances of ArcGIS Enterprise on Amazon Web Services is relatively simple as long as you haven't added custom logins to the SQL Server Express instance.

If you plan to move a default geodatabases, you must delete the corresponding geodatabase from the target instance. Database names on an instance must be unique, and geodatabases cannot be renamed. If the geodatabase on the target instance contains data, you should not use this method to move the geodatabase.

Stop web services

There cannot be any active connections to a database if you want to detach it. Therefore, you must stop the services that use data in the database before you detach the database from the existing instance.

  1. Open ArcGIS Server Manager for your existing ArcGIS Enterprise on Amazon Web Services instance.
  2. On the Services page, choose the services that are connected to the database you want to detach and click Stop.

Detach database

Use SQL Server Express Management Studio to detach the database.

  1. Make a remote desktop connection to your existing SITEHOST instance.

    You must open the RDP port in your security group to make remote desktop connections. You can remove this rule from your security group after you move your data.

  2. Start SQL Server Express Management Studio.
  3. Log in to your SQL Server Express instance using operating system authentication.
  4. Expand the Database folder.
  5. Right-click the database, point to Tasks, and click Detach.
  6. Choose which options you want and click OK.

Start new instance

If the destination ArcGIS Enterprise on Amazon Web Services instance to which you want to transfer the database has not yet been created, create one now. Either use a CloudFormation template or follow the instructions in Build an ArcGIS Server site on Amazon Web Services to create your new site.

Delete existing database

If the geodatabase you are moving to the target ArcGIS Enterprise on Amazon Web Services instance has the same name as one of your existing geodatabases, you must delete the existing geodatabase before you can attach the one you moved.

Caution:

Do not do this if the geodatabase on the target instance contains data that is still needed. If your destination instance already has a geodatabase of that name that contains data, you must use a different method to move your data from one instance to another; geodatabases cannot be renamed.

Prerequisite:

Delete the databases in SQL Server Express Management Studio on the new ArcGIS Enterprise on Amazon Web Services instance.

  1. Log in to the target ArcGIS Enterprise on Amazon Web Services instance using remote desktop and the operating system Administrator login.

    You must open the RDP port in your new security group to make remote desktop connections. You can remove this rule from your security group after you move your data.

  2. Start SQL Server Express Management Studio on the target instance.
  3. Log in to your SQL Server Express instance using operating system authentication.
  4. Expand the Database folder.
  5. Right-click the database that has the same name as the database you want to attach and click Delete.
  6. Click OK on the Delete Object dialog box to drop the database.

Move database and transaction log files

You must move the detached database (.mdf) and log files (.ldf) from the source instance to the target instance. See Strategies for data transfer to Amazon Web Services for ways to move files to your ArcGIS Enterprise on Amazon Web Services instance. Be sure to place the files on the data volume, not the C drive of the target instance.

Attach database and transaction log files to new instance

Use SQL Server Express Management Studio to attach the files to the new SQL Server Express instance.

  1. If you closed Management Studio, restart it and log in to your target instance.
  2. Right-click the Database folder and click Attach.
  3. Click Add on the Attach Databases dialog box.
  4. Browse to the location of your database file on the target ArcGIS Enterprise on Amazon Web Services instance.
  5. Choose the .mdf file and click OK.
  6. Click OK to attach the database.

    If the database doesn't appear in the list, refresh the Database folder.

Add users to database, if required

If you moved your geodatabase from another ArcGIS Enterprise on Amazon Web Services instance, the database already contains the users needed for ArcGIS. If you had added other logins and users to your source instance and database, and those users own data, you must add the same logins to the new SQL Server Express instance.

Related topics