(For more resources related to this topic, see here.)
Creating a connection to the enterprise geodatabase
A geodatabase connection is a channel that is established between ArcGIS and the enterprise geodatabase. To create a connection, we need to specify the database server and the user credentials. Without this information, we will not be able to create a connection. To create a geodatabase connection using the SDE user, perform the following steps:
- Open ArcCatalog and expand the Database Connections dialog from the Catalog Tree window.
- Double-click on Add Database Connection.
- From the Database Platform drop-down list, select the database; ours is SQL Server.
- In the Instance field, type the name of the server; here, it is GDBServer.
- Select the Database authentication option from the Authentication Type drop-down list and type in the SDE credentials.
- Click on the Database drop-down list. This should be populated automatically as you leave the password field. Select your geodatabase.
- Click on OK and rename the connection to sde@gdbserver. This is illustrated in the following screenshot:
The type of geodatabase connection depends on the roles assigned to the user. Connecting with the sde user will grant you full access to the geodatabase, where you can copy, delete, and change almost anything.
Create four more database connections with the users Robb, Joffrey, Tyrion, and Dany. Give them proper names so we can use them later.
Migrating a file geodatabase to an enterprise geodatabase
We have our enterprise geodatabase. You might have created a few feature classes and tables. But eventually, our clients at Belize need to start working on the new geodatabase. So, we need to migrate the Bestaurants_new.gdb file to this enterprise geodatabase. This can be done with a simple copy and paste operation. Note that these steps work in the exact same way on any other DBMS once it is set up. You can copy and paste from a file geodatabase to any enterprise geodatabase using the following steps:
- Open ArcCatalog and browse to your Bestaurants_new.gdb geodatabase.
- Right-click on the Food_and_Drinks feature class and select Copy, as seen in the following screenshot:
- Now, browse and connect to sde@gdbserver; right-click on an empty area and click on Paste, as seen in the following screenshot:
- You will be prompted with a list of datasets that will be copied as shown in the following screenshot. Luckily, all the configurations will be copied. This includes domains, subtypes, feature classes, and related tables as follows:
- After the datasets and configurations have been copied, you will see all your data in the new geodatabase. Note that in an SQL Server enterprise geodatabase, there are two prefixes added to each dataset. First, the database is added, which is sdedb, followed by the schema, which is SDE, and finally the dataset name, as shown in the following screenshot:
Have you tried to connect as Robb or Tyrion to your new geodatabase? If you haven’t, try it now. You will see that none of the users you created have access to the Food_and_Drinks feature class or any other dataset. You might have guessed why. That is because SDE has created this data, and only this user can allow other users to see this data. So, how do we allow users to see other users’ datasets? This is simple just perform the following steps:
- From ArcCatalog, connect as sde@gdbserver.
- Right-click on the sdedb.SDE.Food_and_Drinks feature class, point the cursor to Manage, and then click on Privileges as shown in the following screenshot:
- In the Privileges… dialog, click on Add.
- Select all four users, Robb, Joffrey, Tyrion, and Dany, and click on OK.
Make sure that the Select checkbox is checked for all four users, which means they can see and read this feature class.
- For Dany, assign Insert, Update, and Delete so that she can also edit this feature class, as shown in the following screenshot.
- Apply the same privileges to all other datasets as follows and click on OK.
Try connecting with Robb; you will now be able to view all datasets. You can use Dany’s account to edit your geodatabase using ArcMap. You can create more viewer users who have read-only access to your geodatabase but cannot edit or modify it in any way.
Enterprise geodatabases are an excellent choice when you have a multiuser environment. In this article, you learned how to create a geodatabase connection using ArcCatalog to the new enterprise geodatabase. You also learned to migrate your file geodatabase into a fresh enterprise geodatabase. Finally, you learned to assign different privileges to each user and access control to your new enterprise geodatabase. While setting up and configuring an enterprise geodatabase is challenging, working with the enterprise geodatabases in ArcCatalog and ArcMap is similar to working with file geodatabases. Thus, in this article, we took a leap by using an upgraded version of a geodatabase, which is called an enterprise geodatabase.
Resources for Article:
- Server Logs [Article]
- Google Earth, Google Maps and Your Photos: a Tutorial [Article]
- Including Google Maps in your Posts Using Apache Roller 4.0 [Article]