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.
- Open ArcGIS Server Manager for your existing ArcGIS Enterprise on Amazon Web Services instance.
- 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.
-
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.
- Start SQL Server Express Management Studio.
- Log in to your SQL Server Express instance using operating system authentication.
- Expand the Database folder.
- Right-click the database, point to Tasks, and click Detach.
- 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.
Delete the databases in SQL Server Express Management Studio on the new ArcGIS Enterprise on Amazon Web Services instance.
-
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.
- Start SQL Server Express Management Studio on the target instance.
- Log in to your SQL Server Express instance using operating system authentication.
- Expand the Database folder.
- Right-click the database that has the same name as the database you want to attach and click Delete.
- 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.
- If you closed Management Studio, restart it and log in to your target instance.
- Right-click the Database folder and click Attach.
- Click Add on the Attach Databases dialog box.
- Browse to the location of your database file on the target ArcGIS Enterprise on Amazon Web Services instance.
- Choose the .mdf file and click OK.
- 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.