Instructor Work Book
Instructor Work Book
Multiuser Geodatabase
Deploying and Maintaining a
Multiuser Geodatabase
Instructor Edition
Copyright © 2019 Esri
All rights reserved.
Course version 6.0. Version release date October 2019.
Printed in the United States of America.
The information contained in this document is the exclusive property of Esri. This work is
protected under United States copyright law and other international copyright treaties and
conventions. No part of this work may be reproduced or transmitted in any form or by any means,
electronic or mechanical, including photocopying and recording, or by any information storage or
retrieval system, except as expressly permitted in writing by Esri. All requests should be sent to
Attention: Director, Contracts and Legal, Esri, 380 New York Street, Redlands, CA 92373-8100,
USA.
Export Notice: Use of these Materials is subject to U.S. export control laws and regulations
including the U.S. Department of Commerce Export Administration Regulations (EAR). Diversion
of these Materials contrary to U.S. law is prohibited.
The information contained in this document is subject to change without notice.
Commercial Training Course Agreement Terms: The Training Course and any software,
documentation, course materials or data delivered with the Training Course is subject to
the terms of the Master Agreement for Products and Services, which is available at
http://www.esri.com/~/media/Files/Pdfs/legal/pdfs/ma-full/ma-full.pdf. The license rights
in the Master Agreement strictly govern Licensee's use, reproduction, or disclosure of the
software, documentation, course materials and data. Training Course students may use the
course materials for their personal use and may not copy or redistribute for any purpose.
Contractor/Manufacturer is Esri, 380 New York Street, Redlands, CA 92373-8100, USA.
Esri Trademarks: Esri trademarks and product names mentioned herein are subject to the terms
of use found at the following website: http://www.esri.com/legal/copyright-trademarks.html.
Other companies and products or services mentioned herein may be trademarks, service marks or
registered marks of their respective mark owners.
Course introduction
Author course story
Introduction ............................................................................................................................................i
Course goals ...........................................................................................................................................i
Additional resources ...............................................................................................................................i
Installing the course data .......................................................................................................................i
Icons used in this workbook ................................................................................................................ vii
Understanding the ArcGIS Platform ......................................................................................................iv
i
Exercise 2: Configure connections to a multiuser geodatabase ...................................................... 2-11
Create a connection using the Catalog pane ............................................................................ 2-12
Manage active connections ....................................................................................................... 2-14
Connect to a specific version..................................................................................................... 2-15
Create a folder connection ........................................................................................................ 2-16
Create a connection using a geoprocessing tool ...................................................................... 2-17
Manage connection files............................................................................................................ 2-19
(Optional) Remove Oracle APEX tables..................................................................................... 2-20
Lesson review ................................................................................................................................... 2-22
4 Configuring privileges
Author lesson story
Lesson introduction ............................................................................................................................ 4-1
Data users........................................................................................................................................... 4-2
Creating data users ............................................................................................................................ 4-3
Roles................................................................................................................................................... 4-5
Manage users ..................................................................................................................................... 4-6
Defining roles ..................................................................................................................................... 4-9
Designing roles................................................................................................................................. 4-10
Securing credentials ......................................................................................................................... 4-11
Exercise 4: Configure privileges for data use ................................................................................... 4-13
Create roles................................................................................................................................ 4-14
Create users ............................................................................................................................... 4-15
Apply privileges ......................................................................................................................... 4-17
Test privileges ............................................................................................................................ 4-18
ii
Lesson review ................................................................................................................................... 4-20
5 Managing storage
Author lesson story
Lesson introduction ............................................................................................................................ 5-1
Configuration parameters .................................................................................................................. 5-2
Configuration keywords ..................................................................................................................... 5-3
Supported spatial types ..................................................................................................................... 5-6
DBTUNE table .................................................................................................................................... 5-8
Create and update keywords ........................................................................................................... 5-10
Exercise 5: Customize storage using configuration keywords.......................................................... 5-11
Investigate Help documentation ............................................................................................... 5-12
Export DBTUNE ......................................................................................................................... 5-12
Modify the DEFAULTS keyword ................................................................................................. 5-13
Create a custom keyword .......................................................................................................... 5-15
Import DBTUNE ......................................................................................................................... 5-16
Load data using modified and new keywords ........................................................................... 5-17
Lesson review ................................................................................................................................... 5-20
7 Associating data
Author lesson story
Lesson introduction ............................................................................................................................ 7-1
Query layers ....................................................................................................................................... 7-2
iii
Create query layers ............................................................................................................................ 7-3
Database views................................................................................................................................... 7-4
Create database views ....................................................................................................................... 7-6
Choosing between query layers and database views ........................................................................ 7-7
Determining whether to create query layers or database views ........................................................ 7-8
Exercise 7: Associate data with database views and query layers ................................................... 7-11
Create a query layer................................................................................................................... 7-12
Explore election data ................................................................................................................. 7-14
Create database views............................................................................................................... 7-15
Use database views.................................................................................................................... 7-17
Lesson review ................................................................................................................................... 7-19
Appendixes
Appendix A: Esri data license agreement ..........................................................................................A-1
Appendix B: Answers to lesson review questions
Lesson 1: What is a multiuser geodatabase?............................................................................... B-1
Lesson 2: Connecting to the geodatabase.................................................................................. B-2
Lesson 3: Loading data into the geodatabase ............................................................................ B-3
Lesson 4: Configuring privileges.................................................................................................. B-4
Lesson 5: Managing storage........................................................................................................ B-5
Lesson 6: Maintaining the geodatabase ...................................................................................... B-6
Lesson 7: Associating data........................................................................................................... B-7
Lesson 8: Applying the geodatabase workflow ........................................................................... B-8
Appendix C: Activity scripts
Activity 8A: Geodatabase tasks ...................................................................................................C-1
Appendix D: Demo scripts
Demo 1A: Create an enterprise geodatabase .............................................................................D-1
Demo 1B: Explore the repository ................................................................................................D-3
Demo 1C: Orientation to the course exercise environment ........................................................D-5
iv
Demo 2A: Create a connection ...................................................................................................D-6
Demo 3A: Create the data owner account ..................................................................................D-7
Demo 3B: Use ModelBuilder .......................................................................................................D-8
Demo 4A: Manage users ...........................................................................................................D-12
Demo 5A: Create and update keywords ...................................................................................D-14
Demo 6A: Manage attribute indexes and statistics ...................................................................D-17
Demo 6B: Manage performance tasks with Python...................................................................D-19
Demo 6C: View and clear locks .................................................................................................D-21
Demo 7A: Create query layers...................................................................................................D-22
Demo 7B: Create database views..............................................................................................D-24
v
Instructor page
Instructor page
Guided activities reinforce key topics, and may require learners to participate
independently or in groups.
Demonstrations allow instructors to show software tools, technologies, and other tasks
or processes.
Course goals
By the end of this course, you will be able to perform the following
tasks:
• Create a multiuser geodatabase.
• Load and update data in a multiuser geodatabase.
• Set up user roles and permissions to provide secure data access.
• Apply best practices to optimize geodatabase performance.
Additional resources
ArcGIS Resources
www.arcgis.com
This site provides unified access to web-based help, online content,
and technical support.
i
Disclaimer: Some courses use sample scripts or applications
that are supplied either on the DVD or on the Internet.
These samples are provided "AS IS," without warranty of
any kind, either express or implied, including but not
limited to, the implied warranties of merchantability and
fitness for a particular purpose. Esri shall not be liable for
any damages under any theory of law related to the
licensee's use of these samples, even if Esri is advised of
the possibility of such damage. Permission to use, copy,
and distribute these sample scripts is hereby granted,
provided there is no charge or fee for such copies.
ii
Icons used in this workbook
Notes point out additional information, exceptions, or special
circumstances that apply to a particular topic or procedure.
iii
Understanding the ArcGIS Platform
ArcGIS is a Web GIS platform that you can use to deliver your authoritative maps, apps,
geographic information layers, and analytics to wider audiences.
• Individuals interact with ArcGIS through apps running on desktops, in web browsers, and
on mobile devices.
• Organizations share their authoritative geospatial data, maps, and tools as web services
to a central portal that supports self-service mapping, analytics, and collaboration.
Organizations deploy portals in the cloud, in their own infrastructure, or in both.
• Individuals use ArcGIS apps and portals to find authoritative content, create web maps
and web apps, perform analytics, and share results.
• Organizations leverage the information shared by individuals to make more informed
decisions, communicate with partners and stakeholders, and engage the public.
• A portal is a collaborative space where users can create, analyze, organize, store, and
share geospatial content. Within ArcGIS there are two ways to implement a portal: use
ArcGIS Online or deploy ArcGIS Enterprise.
iv
Instructor page
If you need to recover a student exercise environment, apply the appropriate checkpoint in
Hyper-V in the Azure host system.
What is a multiuser geodatabase?
1
What is a multiuser
geodatabase?
Introduction
Key terms Through a multiuser geodatabase, you can manage the storing of
geographic data in a relational database management system
repository
(RDBMS). Multiuser geodatabases allow many users to simultaneously
access the data through the network in a highly scalable way. They
consist of management tools, a repository of tables and SQL code,
and a translator to create SQL calls based on client interaction. They
are available in the following three forms, each with different RDBMS
requirements:
• Enterprise
• Workgroup
• Desktop
Enterprise geodatabases can use many types of RDBMSs, while
Workgroup and Desktop geodatabases can use only SQL Server
Express Edition. Workgroup and Desktop geodatabases are managed
with database servers.
The focus of this course is the Enterprise geodatabase. However,
considerations for Workgroup and Desktop geodatabases will be
raised at several points in the course.
Topics covered
• Multi-tier architecture
• Components of a multiuser database
• Geoprocessing tools for creating a multiuser database
1-1
LESSON 1
After completing this lesson, you will be able to perform the following
tasks:
• Describe the components of a multiuser geodatabase.
• Describe the hierarchy of users in the multiuser geodatabase.
• Apply the appropriate process to install the RDBMS client
software.
• Create a multiuser geodatabase using geoprocessing tools.
1-2
What is a multiuser geodatabase?
Multi-tier architecture
Multi-tier architecture
Approach this slide largely The multiuser geodatabase relies on two software tiers to function:
from the management the ArcGIS client application and the RDBMS server.
perspective:
Figure 1.2
• Where do you manage
what?
• Emphasize where
different functionality is
taken from, between the
RDBMS and ArcGIS
clients.
ArcGIS clients
At the ArcGIS client tier, your spatial data in a database actually
becomes a multiuser geodatabase capable of advanced behavior,
including versioning, replication, subtypes, topologies, and geometric
networks by using sets of metadata tables in the database. ArcGIS
clients allow you to administer your geodatabase through
geoprocessing tools. With geoprocessing tools, you can create
Python scripts to automate maintenance workflows.
1-3
LESSON 1
1-4
What is a multiuser geodatabase?
____________________________________________________________
____________________________________________________________
1-5
LESSON 1
Multiuser
Multiuser geodatabase components
geodatabase components Within the two software tiers, the significant components of the
Focus on: multiuser geodatabase are the translator, the repository, and the
• Generic idea of a management tools.
translator between the ArcGIS clients query the geodatabase using a translator (built into the
client and the RDBMS ArcGIS client) that interacts with metadata tables stored in the
server RDBMS. These tables are referred to as the repository.
• The repository
• Management tools Figure 1.3
Translator
SDE tables do not have a
prefix of SDE_ in Oracle. The translator interprets user actions in the client application, such as
navigation and feature identification, and constructs SQL queries that
are passed to the RDBMS server. In other words, when users interact
with the client application, SQL queries are generated to retrieve
spatial and attribute information from the database. The translator
converts client requests based on layers, extents, definition queries,
and other client controls into SQL queries that interact with features.
The translator also contributes to the process of spatially filtering
features.
Repository
The repository is a set of tables and stored procedures in the RDBMS
that supports the geodatabase. One set of tables has a prefix of SDE_
(except in Oracle) and is used to manage the user interaction with the
geodatabase. Another set of tables has a prefix of GDB_ and is used
to provide geodatabase functionality.
Management tools
ArcGIS provides a set of management tools, including geoprocessing
tools, for geodatabases. Some management is done with the RDBMS
tools.
1-6
What is a multiuser geodatabase?
Hierarchy of users
Hierarchy of users
The geodatabase is There is a hierarchy of users in the database that is based on what
managed by: each user is able to do. When the geodatabase is first created, two
ArcGIS uses the term
• DBA users are important: the database and geodatabase administrators.
"privileges" to refer to
• SDE administrator The database administrator is granted the highest level of privileges
geodatabase object
in your database and the geodatabase administrator the highest level
permissions.
of privileges in your geodatabase.
Figure 1.4
Database administrator
Focus on needing the The database administrator account is created when you install the
database administrator to RDBMS. Access to the account is required to perform several tasks,
create the geodatabase including creating the enterprise geodatabase.
and other RDBMS tasks.
Geodatabase administrator
1-7
LESSON 1
Focus on using the DBO (database owner) account to own geodatabase schema. The
geodatabase administrator DBO is a user account that has implied permissions to perform all
for any administrator tasks activities in the database.
that relate to the
geodatabase but not the
In SQL Server, the geodatabase administrator can be
RDBMS.
named SDE, or it can be a DBO user.
Privileges
1-8
What is a multiuser geodatabase?
In general, use the Create tool when starting from nothing and
the Enable tool when you already have a database to which
you must add geodatabase behavior.
1-9
LESSON 1
The following table can help you decide between these two tools.
Notice that the Create Enterprise Geodatabase tool allows for
considerable flexibility because many of the parameters are optional.
Figure 1.5
Differences between the
Create Enterprise
Geodatabase and Enable
Enterprise Geodatabase
tools.
1-10
What is a multiuser geodatabase?
1-11
LESSON 1
Table 1.2
Parameter Description
Parameters for the Create
Enterprise Geodatabase
Instance SQL Server instance name.
tool when used with SQL
Server.
Database A valid name for a new database to create OR the
name of an existing database to use.
SDE Owned Check box that allows you to designate the SDE
Schema user instead of the DBO user as the owner of the
geodatabase.
1-12
What is a multiuser geodatabase?
With Oracle, if you plan to run SQL statements against the default
geometry (ST_Geometry), you must copy the library to the Oracle
server and configure the Oracle extproc file.
Table 1.3
Parameter Description
Parameters for the Create
Enterprise Geodatabase
Instance The TNS network alias or Oracle Easy Connection
tool when used with
string.
Oracle.
Geodatabase The SDE user name and a password for the master
Administrator geodatabase OR an existing user for a user-schema
and geodatabase.
Password
1-13
LESSON 1
Table 1.4
Parameter Description
Parameters for the Create
Enterprise Geodatabase
Instance PostgreSQL server name.
tool when used with
PostgreSQL.
Database A valid name for a new database to create OR the
name of an existing database to use.
1-14
What is a multiuser geodatabase?
1-15
LESSON 1
Geodatabase tables
The geodatabase tables store information about geodatabase
behavior, such as feature classes that belong to feature datasets.
There are far fewer geodatabase tables than SDE tables.
Table 1.6
Table Use
All six geodatabase tables
and their uses.
GDB_Items Lists objects in the geodatabase that
can be indexed or searched (tables,
domains, topologies, and so on)
1-16
What is a multiuser geodatabase?
Exercise flow
Exercise flow
Direct students to the Which RDBMS is applicable for your organization? Select one of the
exercise that pertains to the following exercises that pertains to you based on the RDBMS that you
database that they will be will use in your work.
using with their
Figure 1.6
organization.
You will choose an
• 1A: SQL Server students exercise to complete
only based on the RDBMS that
• 1B: Oracle students only you will use in your work.
• 1C: PostgreSQL students
only
Tell them that all three
RDBMSs are pre-installed
on the GEODATA machine
with minimal customization.
1-17
LESSON 1
1-18
What is a multiuser geodatabase?
Figure 1.8
1-19
LESSON 1
The GEODATA VM window (orange desktop) appears. The GEODATA VM will serve as your
RDBMS server in this course.
e In the Services window, scroll down the list of services and confirm that the SQL Server
(MSSQLSERVER) service status is listed as Running.
f If the service is not running, right-click the service name and choose Start.
MSSQLSERVER is the default instance of SQL Server running on the GEODATA MACHINE, and
this service is necessary for clients to make connections to databases.
1-20
What is a multiuser geodatabase?
The EBASE VM window (blue desktop) appears. The EBASE VM will serve as your client machine
in this course.
c In the EBASE MACHINE, open File Explorer and browse to the C:\EsriTraining\MMGD\
Installers\SQL Server ODBC driver 13 x64 folder.
d Double-click the .msi file and follow the prompts (accepting the default values) to install the
SQL Server client driver.
Now the SQL Server client component has been installed on the EBASE MACHINE. You would
have to install the same component on any additional ArcGIS client machines that would need to
communicate with the RDBMS server. In this course, there will be only one client machine
(EBASE).
For the remainder of this exercise, make sure that you are working with the EBASE MACHINE
(blue desktop).
a If you restarted the EBASE MACHINE, on the host PC desktop, double-click the EBASE.rdp
shortcut to reconnect.
b In the EBASE MACHINE, start ArcGIS Pro, and then under Blank Templates, click Catalog.
c In the Create A New Project dialog box, specify the following parameters:
• Name: CourseProject
• Location: C:\EsriTraining\MMGD
1-21
LESSON 1
You will use this project for the remainder of the course.
f In the Geoprocessing pane, search for create enterprise and open the Create Enterprise
Geodatabase tool.
1-22
What is a multiuser geodatabase?
Database SQL_Server
Platform
Instance Typically the host name unless more than one <Host name of
instance installed RDBMS server>
Database naperville
Database sa
Administrator
Database Esri.4.GIS
Administrator
Password
SDE Owned The account that will own the schema <Check box
Schema selected>
Geodatabase Esri.4.GIS
Administrator
Password
You could also use OS authentication if you have an operating system account that is a
member of the administrator group. In that case, you would select the Operating System
Authentication check box, and the credentials that you provided when logging in to
Windows would be used.
1-23
LESSON 1
Notice that the Sde Owned Schema check box is selected. If, in your implementation, you must
use DBO-owned schema, then this check box must be cleared.
h Click Run.
i When the tool completes, at the bottom of the Geoprocessing pane, click View Details.
1. Based on what you see under Messages, what did the tool do?
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
j Close the Create Enterprise Geodatabase results window and exit ArcGIS Pro, choosing to
save changes to your project.
1-24
What is a multiuser geodatabase?
Conclusion
In this exercise, you installed the SQL Server client software to allow ArcGIS client applications to
connect to the SQL Server machine. You then used the Create Enterprise Geodatabase
geoprocessing tool to create a database, an administrative user (SDE), and a set of tables to give
you a new geodatabase.
At this stage, you have a fully functioning multiuser geodatabase and an ArcGIS client that can
communicate with it. In subsequent exercises, you will work with your chosen RDBMS by way of
tools in the EBASE MACHINE.
1-25
What is a multiuser geodatabase?
Figure 1.11
1-27
LESSON 1
The GEODATA VM window (orange desktop) appears. The GEODATA VM will serve as your
RDBMS server in this course.
e In the Services window, scroll down the list of services and confirm that the OracleServiceXE
service and the OracleXETNSListener service statuses are both listed as Running.
f If either service is not running, right-click the service name and choose Start.
OracleServiceXE is the Oracle instance, and the OracleXETNSListener is required for clients to
connect to databases.
1-28
What is a multiuser geodatabase?
The EBASE VM window (blue desktop) appears. The EBASE VM will serve as your client machine
in this course.
Oracle instant client must be installed on the EBASE MACHINE. The 64-bit clients are for ArcGIS
Pro and ArcGIS Enterprise on 64-bit machines. The 32-bit clients are ArcGIS Desktop applications,
such as ArcMap and ArcCatalog.
The process of setting up the EBASE MACHINE to be able to connect to Oracle involves three
steps:
1. Copy the client files to the client machine.
2. Append entries to the PATH system variable to point to the client files (32 bit and/or 64
bit).
3. Create a new system variable named TNS_ADMIN to point to the client files.
The files have already been copied; for this exercise, you will be confirming that these
steps have been completed.
c In the EBASE MACHINE (blue desktop), use File Explorer to browse to C:\oracle_client folder.
These folders now on the EBASE MACHINE enable Oracle instant connect access to the database
(when the PATH system variable has been updated). The Oracle instant connect syntax should
follow this template: <host name>:<port>/<DB service name> (for example,
GEODATA_SERVER:1521/naperville).
1-29
LESSON 1
However, you will go a step further and establish a net service name to make the connection
syntax even simpler for your clients. That requires copying tnsnames.ora from the original location
on the RDBMS server found at ..\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN to
the EBASE MACHINE. The tnsnames.ora file has already been modified for you to use the net
service names of the databases that you will create in this course, NAPERVILLE and
MANHATTAN. The tnsnames.ora.orig has the original configuration so that you can compare the
initial Oracle installation to what has been modified for you.
f Click the tnsnames.ora file, and then press Ctrl and click the tnsnames.ora.orig file.
At the top of the file, the original file is marked with red highlighted lines and the updated file
with yellow lines. Highlighted near the middle is the difference between what the Oracle listener
service used for HOST name between the original and modified configuration. The updated file
uses a HOST name of geodata, whereas the original used geodata.esri.com.
Lower in the file is where more meaningful net service names were created (NAPERVILLE and
MANHATTAN). The tnsnames.ora file has already been modified and implemented for you.
1-30
What is a multiuser geodatabase?
However, you will investigate the client machine configuration so that you know how to do it in
the future.
Two system variables must be configured before the client machine can connect to Oracle. First,
the Path system variable must contain the paths to the Oracle instant client files. Second, a new
system variable called TNS_ADMIN must be created so the tnsnames.ora file can be found.
The system variables have already been configured on your client machine (EBASE). However, you
will verify that the system variables are configured properly.
i Click the Windows Start button, type cmd, and press Enter.
j In the command prompt window, type set path and press Enter.
Your result should look similar to the following graphic. Verify that there are the following entries
that allow the client application to locate the connection files:
• C:\oracle_client\instantclient_11_2_0_4_64bit
• C:\oracle_client\instantclient_11_2_0_4_32bit
Your result should look similar to the following graphic. Verify that the TNS_ADMIN variable exists
and has the correct path (C:\oracle_client).
If you discover that the PATH and TNS_ADMIN variables have not been configured,
browse to C:\oracle_client, right-click the Set_Path.bat file, and choose Run As
Administrator.
Now you could create connections to Oracle from either 64-bit or 32-bit ArcGIS applications using
the Oracle instant client syntax (such as geodata:1521/naperville). The updated Path system
variable now contains the paths to both of these client folders. Additionally, you can create Oracle
1-31
LESSON 1
connections using the net service name syntax of NAPERVILLE, which is supported by the
modified tnsnames.ora file and the system variable TNS_ADMIN. The NAPERVILLE geodatabase
will be the first one that you create in the exercises.
If any ArcGIS applications had been open when creating the system variables, the
applications would need to be restarted for the new system variables to take effect.
You will use this project for the remainder of the course.
e In the Geoprocessing pane, search for create enterprise and open the Create Enterprise
Geodatabase tool.
1-32
What is a multiuser geodatabase?
Database Oracle
Platform
Database Esri.4.GIS
Administrator
Password
Geodatabase "Esri.4.GIS"
Administrator
Password
Tablespace sde_repository_naperville
Name
1-33
LESSON 1
g Click Run.
h When the tool completes, at the bottom of the Geoprocessing pane, click View Details.
Notice the warning messages in yellow text. The first warning refers to a path being used to
associate the st_shapelib.dll with Oracle that the software cannot find. Because ArcGIS Pro is not
installed on the RDBMS server, the DLL does not exist. However, you can copy the DLL from one
of the ArcGIS clients to the server and configure the Oracle extproc.ora file to refer to it.
1-34
What is a multiuser geodatabase?
The second warning refers to the fact that the geodatabase assumes an Oracle open_cursors
setting of 300. The geodatabase does not have access to the open_cursors value set for the
Oracle database; therefore, if you set your Oracle database open_cursors parameter to a value
other than 300, execute the sde.gdb_util.update_open_cursors stored procedure to synchronize
the geodatabase's open_cursors setting with that of the Oracle database in which it resides. If you
do not synchronize the open_cursors setting between the Oracle database and the geodatabase,
activities that require multiple cursors could fail. The open_cursors parameter should typically be
increased to around 2000, but if this causes issues for other applications, determine a value that
will work for both applications.
For more information, refer to ArcGIS Desktop Help: Configure the Oracle extproc to
access the geodatabase with SQL and Update open_cursors setting in geodatabases in
Oracle.
1. Based on what you see under Messages, what did the tool do? (Ignore the warning
message for now; it will be revisited later.)
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
i Close the Create Enterprise Geodatabase results window and exit ArcGIS Pro, choosing to
save changes to your project.
Conclusion
In this exercise, you installed the Oracle client software to allow ArcGIS client applications to
connect to the Oracle server. You then used the Create Enterprise Geodatabase geoprocessing
tool to create a database, an administrative user (SDE), and a set of tables to give you a new
geodatabase.
At this stage, you have a fully functioning multiuser geodatabase and an ArcGIS client that can
communicate with it. In subsequent exercises, you will work with your chosen RDBMS by way of
tools in the EBASE MACHINE.
1-35
What is a multiuser geodatabase?
Figure 1.19
1-37
LESSON 1
The GEODATA VM window (orange desktop) appears. The GEODATA VM will serve as your
RDBMS server in this course.
e In the Services window, scroll down the list of services and confirm that the postgresql-x64-11
- PostgreSQL Server 11 service status is listed as Running.
f If the service is not running, right-click the service name and choose Start.
1-38
What is a multiuser geodatabase?
The EBASE VM window (blue desktop) appears. The EBASE VM will serve as your client machine
in this course.
The ArcGIS geoprocessing tools for creating multiuser databases are compatible only with the
ST_Geometry data type. You must copy the appropriate DLL from the EBASE MACHINE and
place it on the RDBMS server.
c In the EBASE MACHINE (blue desktop), open File Explorer, browse to the C:\EsriTraining\
MMGD\Installers\PostgreSQL 11 folder, and copy the st_geometry.dll file.
d In File Explorer, in the file path window, type \\geodata\C$ and press Enter.
You are now viewing the contents of the C drive on the GEODATA MACHINE. The GEODATA
MACHINE will serve as your RDBMS server in this course.
Next, you will verify that the RDBMS server machine will allow client connections.
f Restore your remote connection window to the GEODATA MACHINE (orange desktop).
The pg_hba.conf file is what can be modified to allow client connections. This file has already
been modified for you, but a default copy was kept so that you can identify the changes.
The color-coded lines near the top of the files will tell you which color represents the original file
(.orig extension).
1-39
LESSON 1
Notice in the modified file (pg_hba.conf) that two new lines were created to allow connections for
IPv4 and IPv6 clients (respectively). Both lines allow any client using md5 encryption to connect to
the RDBMS server machine.
• host all all 0.0.0.0/0 md5
• host all all ::/0 md5
If you were to modify the pg_hba.conf file, you would have to restart the PostgreSQL
service for the changes to take effect.
Next, you will look at a PostgreSQL configuration file to see how you could modify default
parameters of the instance.
l In the GEODATA MACHINE (orange desktop), in the same folder, right-click postgresql.conf
and open it with Notepad.
This file is the PostgreSQL configuration file. It can be configured to control resource usage, file
locations, replication, logging, and so on. You will view the default limit on the number of client
connections.
Notice that the Max_connections parameter is set to 100. It is advisable to increase the limit to at
least twice the number of anticipated users because PostgreSQL creates additional connections to
manage the communications with clients. You will not need to change it for the purposes of this
1-40
What is a multiuser geodatabase?
class, but be aware of this parameter when you return to your organization and implement your
enterprise geodatabase.
The PostgreSQL server machine is now configured to use the ST_GEOMETRY data type and allow
EBASE (your client machine) to connect to it.
With ArcGIS 10.4 and later, client connections to PostgreSQL are built-in. Therefore, there is no
need to install or configure client connections.
Make sure that you are working with the EBASE MACHINE (blue desktop) for this step.
a In the EBASE MACHINE, start ArcGIS Pro, and then under Blank Templates, click Catalog.
b In the Create A New Project dialog box, specify the following parameters:
• Name: CourseProject
• Location: C:\EsriTraining\MMGD
You will use this project for the remainder of the course.
e In the Geoprocessing pane, search for create enterprise and open the Create Enterprise
Geodatabase tool.
1-41
LESSON 1
Database PostgreSQL
Platform
Database naperville
Database postgres
Administrator
Database Esri.4.GIS
Administrator
Password
Geodatabase Esri.4.GIS
Administrator
Password
If you provide a tablespace name, it must already exist. However, if you leave it blank, the
default tablespace (pg_default) will be used.
1-42
What is a multiuser geodatabase?
g Click Run.
h When the tool completes, at the bottom of the Geoprocessing pane, click View Details.
1. Based on what you see under Messages, what did the tool do?
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
i Close the Create Enterprise Geodatabase results window and exit ArcGIS Pro, choosing to
save changes to your project.
Conclusion
In this exercise, you configured the PostgreSQL database to allow network connections. You then
used the Create Enterprise Geodatabase geoprocessing tool to create a database, an
administrative user (SDE), and a set of tables to give you a new geodatabase.
1-43
LESSON 1
At this stage, you have a fully functioning multiuser geodatabase and an ArcGIS client that can
communicate with it. In subsequent exercises, you will work with your chosen RDBMS by way of
tools in the EBASE MACHINE.
1-44
What is a multiuser geodatabase?
Lesson review
Lesson review
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
4. If you create a database in RDBMS tools with a non-default location and then use the
Create Enterprise Geodatabase tool to turn it into a geodatabase, what does the tool do?
_____________________________________________________________________________
_____________________________________________________________________________
1-45
LESSON 1
4. The utilities department has decided to create a geometric network to represent the sewer
system.
ArcGIS client
1-46
What is a multiuser geodatabase?
1-47
Instructor page
Instructor page
The following references provide additional information about the topics you will teach
in this lesson.
ArcGIS Desktop Help:
• Database connections in ArcGIS Pro
• Manage connections in <RDBMS>
ArcGIS Enterprise Help:
• Register a(n) <RDBMS> database with ArcGIS Server
Connecting to the geodatabase
2
Connecting to the
geodatabase
Introduction
Key terms A database connection is required to use and manage the multiuser
geodatabase. You will use two methods for creating connections and
connection file
learn how connection files may subsequently be distributed to the
geodatabase users.
Topics covered
After completing this lesson, you will be able to perform the following
tasks:
• Use the necessary parameters to establish a database
connection.
• Compare authentication methods.
• Assess software version compatibility.
2-1
LESSON 2
RDBMS client
RDBMS client software
software Client connections require that the RDBMS client software be installed
The key points to this slide on all ArcGIS client machines.
are that an RDBMS client
Figure 2.1
software must be installed
A client connection.
and that some processing
takes place in the ArcGIS
client.
2-2
Connecting to the geodatabase
The enterprise The following table shows the parameters for the Database
geodatabase created in a Connection dialog box in ArcGIS Pro.
prior lesson
Table 2.1
Parameter Description
2-3
LESSON 2
2-4
Connecting to the geodatabase
Software version
Software version compatibility
compatibility
In many organizations, particularly large ones, situations may arise in
This slide should be fairly which the software version of the ArcGIS client differs from that of the
The software version of
brief. geodatabase. Upgrades to clients or geodatabases can take time to
the geodatabase is
The story is that older complete. For that reason, it is important to consider how ArcGIS
determined by that of the
clients can connect to clients and geodatabases can connect and access functionality
ArcGIS client at the time
newer geodatabases. Do associated with their respective software versions.
the repository was
not address dataset
created. For example, if an
functionality yet because it Connections
ArcGIS client was at 10.2
will be covered in a later
when the geodatabase Not only can an ArcGIS client connect to a geodatabase of the same
lesson.
was created, the software version or an earlier one (backward compatibility), but an
geodatabase will be at earlier client can also connect to a later geodatabase (forward
10.2 even after you compatibility). Forward compatibility became available with the 10.1
upgrade the ArcGIS client software release (10.0 clients could connect to 10.1 geodatabases)
to 10.3. and has been supported for the last few releases.
Figure 2.2
Forward and backward
compatibility.
2-5
LESSON 2
2-6
Connecting to the geodatabase
Authentication
Authentication methods
methods Connections to the multiuser geodatabase can be created using
Emphasize the either database authentication or OS authentication. Database
requirements for different authentication stores the users' credentials in the database and allows
authentication methods. you to connect as a different database user by supplying different
• OS authentication: No credentials. OS authentication simply passes the credentials that the
user input required user entered when accessing the operating system to the RDBMS.
• DB authentication with Figure 2.3
user name and password Geodatabase connections
saved: No user input use either OS or database
required authentication.
• DB authentication
without user name and
password saved: User
input required
Your RDBMS may be configured by default to use either
authentication method. Many RDBMSs can be configured to allow the
Default authentication
other authentication method, but it requires further RDBMS
methods:
configuration. Refer to the following help documents.
SQL Server: OS
Oracle: DB ArcGIS Desktop Help:
PostgreSQL: DB • ArcGIS and SQL Server authentication
ArcGIS Pro Help:
• User accounts and groups-Manage geodatabases in Oracle
• User accounts and groups-Manage geodatabases in SQL Server
• User accounts and groups-Manage geodatabases in PostgreSQL
Hint: ArcGIS clients will show the default authentication method for
your RDBMS when establishing a connection. After an
alternative authentication method has been configured in the
RDBMS, you can choose that type of authentication in the
connection properties.
2-7
LESSON 2
Connection files
Connection files
The key point is that Users of the multiuser geodatabase can create connections in ArcGIS
connection files store client applications, either interactively or by using a geoprocessing
connection properties and tool. In either case, the connection file will have a .sde file extension.
can be migrated to any If the interactive method is used, the .sde file will be saved to the
location for users to project's home folder.
connect to the multiuser If the Create Database Connection geoprocessing tool is used to
geodatabase. If they share create the connection, the .sde file can be saved anywhere you
a connection file with choose. In either case, connection files can be moved around to suit
credentials saved within it, your organization's needs.
the target user will have all
the privileges associated
Distributing connection files
with that account. The
same is true of GIS Administrators may want to distribute connection files to users for the
resources such as map following reasons:
documents.
• It makes it as easy as possible for users to connect to a specified
version.
• The organization's workflows dictate that administrators directly
manage connections.
• The organization is implementing an ArcGIS Server site that
needs access to the geodatabase.
Figure 2.4
2-8
Connecting to the geodatabase
2-9
Connecting to the geodatabase
2-11
LESSON 2
b In the Catalog pane, right-click Databases and choose New Database Connection.
The New Database Connection dialog box can also be accessed on the Insert tab, in the
Project group, by clicking the Connections down arrow and choosing New Database
Connection.
c In the Database Connection dialog box, set the following required parameters for your chosen
RDBMS.
For the purposes of this course, the host name of the RDBMS server is used as the SQL
Server Instance name. It could be different for your implementation.
2-12
Connecting to the geodatabase
Oracle users
• Database Platform: Oracle
• Instance: naperville (net service name)
• Authentication Type: Database Authentication
• User Name: sde
• Password: Esri.4.GIS
The Oracle connection shows a series of APEX tables that are related to Application
Express, a framework for developing web-based apps in the Oracle database. Other user
connections in this course will also display the APEX tables. If you would like to remove the
APEX tables for easier recognition of geodatabase objects, there is an optional step
included at the end of this exercise.
2-13
LESSON 2
PostgreSQL users
• Database Platform: PostgreSQL
• Instance: <RDBMS server name>
• Authentication Type: Database Authentication
• User Name: sde
• Password: Esri.4.GIS
• Database: naperville
After clicking OK in the dialog box, the connection string will be editable in the Catalog
pane, so you can just type the desired name for the connection. Otherwise, in the Catalog
pane, right-click the connection and choose Rename.
For the purposes of this class, you will use for all connections a naming convention that follows
the format of <database name>_<database_user>. However, you may determine alternative
naming conventions for your actual implementation.
2-14
Connecting to the geodatabase
Due to BUG-000123814,
we do not say to click on This action opens the Geodatabase Administration dialog box, where you can view the connected
the Locks tab. For Oracle users and their connection properties, as well as manage locks. To assist you, the ability to filter by
users, this will cause ArcGIS user name and client machine is provided.
Pro to crash.
d Close the Geodatabase Administration dialog box and the Database Properties dialog box.
For versions of Oracle prior to 12c, users can also modify existing connections to connect
to user-schema geodatabases. User-schema geodatabases are sometimes used to isolate
user- or project-related data.
a In the Catalog pane, right-click your connection (Naperville_SDE) and choose Geodatabase
Connection Properties.
2-15
LESSON 2
Notice that both Traditional and Branch versioning types are available.
For Oracle, Branch versioning is supported at Oracle 12.1.0.2 and above, so Oracle users
in this course will not see this option in the dialog box.
When the multiuser geodatabase is created, it creates a version called DEFAULT. Geodatabase
users can create other versions that represent potentially different states of the data, to which
users may be allowed to connect. These different states are created by editing data in a version.
Additionally, historical versions can be enabled. Historical versions allow for different states of
data to be archived and potentially queried for future use.
Versioning will not be a focus in this course, so you will not connect to any version other than
DEFAULT.
2-16
Connecting to the geodatabase
a From the Insert tab, in the Project group, click Add Folder .
e Click OK.
The muGDB_connections folder now appears in the Catalog pane in the list of folder connections.
a In the Geoprocessing pane, in the search field, type connection and press Enter.
Hint: You can restore the Geoprocessing pane by clicking the Tools button in the Analysis
tab.
2-17
LESSON 2
Notice that this tool can be used to create a connection to any supported database. If the
database happens to have geodatabase functionality enabled, then a geodatabase connection is
established. This behavior applies to any multiuser geodatabase: enterprise, workgroup, or
desktop. Most of the parameters are identical to the ones that you entered when connecting
using the Database Connection dialog box (from the Catalog pane). However, unlike the Catalog
pane method, this tool allows you to choose additional geodatabase connection properties so
that you can connect to alternative versions.
Additionally, the tool allows you to save the connection file in a specified location (rather than the
ArcGIS Pro project folder), which helps if your workflows call for an administrator to be responsible
for establishing and distributing connections to designated locations.
Using the same values and options that you used in the Database Connection dialog box earlier,
you will create another connection to your chosen RDBMS. However, you will set a unique
connection file location and name so that this connection will look different from your previous
connection. Remember to use the SDE account credentials (Database Authentication).
d In the Create Database Connection tool, for Connection File Location, browse to Folder
Connections, select C:\muGDB_connections, and click OK.
Your Geoprocessing pane should look similar to the following graphic (SQL Server is used in this
example).
2-18
Connecting to the geodatabase
Hint: For Oracle users, remember that the Instance parameter should be naperville (the net
service name).
Notice that the Database name (Naperville) automatically fills in for SQL Server and
PostgreSQL because there is only one database at this point. If you had multiple
databases, then you would need to choose the desired database from the drop-down list.
f Click Run.
g In the Catalog pane, expand Folders, if necessary, and then expand the muGDB_connections
folder.
h If the new connection does not appear, right-click the folder and choose Refresh.
There may be situations in which you would like to distribute connection files to other users. In
such cases, you may want to post connection files to a shared folder location on the network.
a In the Catalog pane, right-click your original connection (Naperville_SDE.sde) and choose
Connection Properties.
Notice that the Save User/Password check box is selected. Anyone who is given access to this
connection file will have SDE privileges, which is dangerous. The person would have access to the
SDE-owned schema and administrative access to all geodatabase objects stored in the RDBMS.
2-19
LESSON 2
Remember that clearing the Save User/Password check box is advisable. That way, when target
users connect using the connection file in their client application, they will be automatically
prompted for their database credentials.
Another option is to set up your geodatabase and RDBMS to use OS authentication (if supported
by your RDBMS). Using this option, users of saved connection files are just using their OS
credentials to access the geodatabase.
For your purposes in this class, you will not clear the Save User/Password check box.
b Leave the Save User/Password check box selected and click OK.
c Under Databases, right-click the Naperville_SDE.sde connection file and choose Copy.
As described earlier, Oracle database connections show a series of APEX tables that are related to
Application Express, a framework for developing web-based apps in the Oracle database. This is
a result of using Oracle Express for this class. If you would like to remove the APEX tables,
perform the following steps.
a On the GEODATA MACHINE (orange desktop), open a command prompt window, type
sqlplus "/ as sysdba", and press Enter.
This action will remove the apex tables, and it may take some time to complete.
2-20
Connecting to the geodatabase
d When the commands have completed, exit the command prompt window.
Conclusion
In this exercise, you created a connection using the Catalog pane as well as a geoprocessing tool.
Also, you learned how to connect to different versions and how to manage connection files.
2-21
LESSON 2
Lesson review
Lesson review
1. One must always create client connections using the Database Connection dialog box from
the Catalog pane.
a. True
b. False
2-22
Instructor page
3
Loading data into the
geodatabase
Introduction
Key terms There are multiple ways to load data into your geodatabase, all of
which can be lengthy and complex. The first step in the process is to
automation
determine which tools to use and what settings to apply to improve
environment settings the performance of your data loads.
ModelBuilder
Topics covered
After completing this lesson, you will be able to perform the following
tasks:
• Explain the importance of the data owner account.
• Identify settings that help with data loading.
• Implement workflows to load and update data in the
geodatabase.
3-1
LESSON 3
Figure 3.1
Data owner
responsibilities.
3-2
Loading data into the geodatabase
Figure 3.2
Creating a data owner
User and object creation.
account
3-3
LESSON 3
Database User name and password for the user, either new (to
User and be created) or existing (to be added to the
Database database). If you are using an OS user, a password is
User not required.
Password
Role Optional
The database role to add the user to.
3-4
Loading data into the geodatabase
• Create procedure
• Create view
• Create table
• Create session
• Create sequence
• Create trigger
• Create view
• Create table
Oracle users:
ArcGIS Pro Help:
Privileges for Many database administrators do not allow Create Table privileges by
geodatabases in default for new database users. Therefore, it may be necessary to
<RDBMS> and Log file create read-only accounts by using RDBMS tools. In addition, you will
tables in geodatabases in need to use session-based log files.
Oracle
3-5
LESSON 3
RDBMS
RDBMS considerations
considerations
RDBMS considerations can greatly affect your data-loading efforts.
Present the information
ArcGIS Desktop Help: The following table suggests ways to optimize data loading in relation
about configuring the
Memory tuning in to RDBMS considerations.
RDBMS parameters that will
<RDBMS>
affect the data owner as
DBA tasks. Also, the DBA is
Table 3.2
responsible for creating a Consideration Optimization
data owner.
Say that disabling Space Ensure that there is enough space in the database for
transaction logging (*) is the new datasets.
something that they must
discuss with their DBA. It Memory Ensure that there is enough RAM available for the
would only be temporary database to process the data-loading operation.
and should only be
considered for extremely Connections Time large loads for when there will be minimal
large datasets. connections to the database.
3-6
Loading data into the geodatabase
Geoprocessing
Geoprocessing environment settings
environment settings
Geoprocessing environment settings are parameters that affect a
Ask students whether they tool's result. They are useful in this context because geoprocessing
ArcGIS Pro Help: What is a
are aware of or have used tools are often used to load data. They can be set at the application,
geoprocessing
geoprocessing environment model, or tool level.
environment setting?
settings. If people have not
The following table shows common data-loading environment
seen them, perform a quick
settings.
demonstration of setting
them at the application
Table 3.3
level. Setting Description
On Output CONFIG
Keyword, keep the Current The workspace from which inputs are taken and
discussion at a high level Workspace outputs are placed when tools run
and let students know you
will talk about keywords Output The coordinate system to which the output will be
more in depth in another Coordinate reprojected
lesson. System
3-7
LESSON 3
15 minutes 1. Fill in the table with information about the data-loading tools.
Purpose
Table 3.4
Divide students into small Conversion Simple Data Append
groups and ask them to Tools Loader Tool
investigate the
data-loading tools and Description Convert Loads more data Loads more
complete the table. Then datasets into an existing data into an
ask groups to volunteer to between dataset using the existing
complete portions of the formats using load option in the dataset
table as a class. import and Catalog pane using a GP
Reporting export options tool
Discuss the tools and solicit
answers from students. Best use
Record answers in the table case
on the slide.
Debrief
If students were unfamiliar
with some tools, quickly
demonstrate them.
Limitations
Automation?
3-8
Loading data into the geodatabase
Updating datasets
Updating datasets
The Truncate Table tool can Sometimes, rather than loading new datasets into your geodatabase,
be used for fast and you must replace the data within existing datasets. For example,
efficient updating of FEMA periodically revises flood zones. When FEMA releases new
datasets. Students will flood zones, counties want to replace their current flood zone dataset
implement this workflow in contents with the new flood zones.
ModelBuilder in the Updating datasets is a two-step process. First, delete the existing
exercise. data using the Truncate Table tool. Then, load the new data into the
dataset using the Simple Data Loader, Object Loader, or Append
tool.
Figure 3.3
Workflow for updating
existing datasets.
____________________________________________________________
____________________________________________________________
3-9
LESSON 3
Automation
Automation
Use the idea of loading Automation is the process of an application repeating a workflow,
many feature classes from a with each iteration potentially using a different set of parameters. You
folder as a use case for can use automation to simplify a complex workflow into a single tool
automation and why it can or to repetitively apply the same tool to many datasets. Automation
make data loading easier. can help make data loading an easier and more repeatable process.
This scenario will be used in
the ModelBuilder An automation scenario
demonstration, so make
Often, when you are creating a multiuser geodatabase, multiple
sure that students
feature classes must be loaded into it. The original feature classes
understand it to make the
might be shapefiles stored in a folder in the file system or be from a
demonstration go
file geodatabase.
smoother.
You could convert each shapefile individually using a data conversion
tool.
Figure 3.4
Individual tool executions.
Or you could use the batch mode execution of the tool. This method
allows you to run the tool only once, but you must set up all input and
output parameters initially.
Figure 3.5
Batch mode tool
execution.
Automation can make this process much simpler while creating a tool
that can be used over and over on many folders or shapefiles. You
could create a model or Python script that iterates through all feature
classes in a folder and converts them for storage in the geodatabase.
Figure 3.6
Model or script execution.
3-10
Loading data into the geodatabase
Tools
Tools take input variables and create output. Tools can be added
using the ModelBuilder tab or by dragging the tool from the Catalog
pane, Search results, or a toolbox onto the model view. Tools are
represented with yellow, rounded rectangles.
Variables
Variables are either inputs or outputs of a tool. There are two kinds of
variables: data and value. Data variables refer to data stored on disk;
value variables hold values such as strings, numbers, linear units, and
spatial references. As with tools, you can add variables by using the
ModelBuilder tab or by dragging them onto the model view. You can
also create variables based on tool inputs. Variables are represented
3-11
LESSON 3
Parameters
Model parameters are variables that have been marked for user input.
Model parameters can be specified in the Geoprocessing pane when
the user runs the tool. Variables that are also parameters have a "P"
hovering outside and to the upper right of the variable. You can mark
variables as parameters by choosing Model Parameter from the
variable context menu. You can also rename them to specify the label
used in the model tool dialog box.
Iterators
Iterators in ModelBuilder allow for looping, or repeating a process
over and over. Iterators are used to run the same tool or process
many times with different settings or data each time. Iterators are
represented by orange hexagons and can be added from the
ModelBuilder tab.
3-12
Loading data into the geodatabase
Debrief
Summarize and discuss the
purpose and results of the
exercise.
3-13
LESSON 3
a In the EBASE MACHINE (blue desktop), start ArcGIS Pro and restore the course project.
b In the Catalog pane, right-click Databases and choose New Database Connection.
SQL Server users only: For training purposes, you will use the sa account with database
authentication for this exercise. Typically, SQL Server administrators will use operating
system authentication (mapped to the SQL Server sysadmin role for database
administrative tasks).
c Create a connection to the naperville database using database authentication and the
credentials for your database administrator account:
• SQL Server: sa/Esri.4.GIS
• Oracle: sys/Esri.4.GIS
• PostgreSQL: postgres/Esri.4.GIS
Hint: To recall what parameters are required to create a connection, right-click the
Naperville_SDE connection and choose Connection Properties.
Oracle users: You will label the connection with the naperville database name even though
you did not need to supply a database name. The reason is that the database contains
data for the city of Naperville and for maintaining consistent directions for all the databases
in this class.
_____________________________________________________________________________
3-14
Loading data into the geodatabase
e In the Geoprocessing pane, search for and open the Create Database User tool.
PostgreSQL users will not see the Create Operating System Authenticated User check box.
Hint: Oracle users: Remember that new passwords must be enclosed in quotation marks
when they contain special characters.
g Click Run.
h When the tool completes, review the messages and close the dialog box.
Now that the data owner account exists in the database, you will create a connection using the
assigned credentials. You will use this data owner connection throughout the remainder of this
exercise to load data. You will use the database administrator user in a later exercise to create
roles and assign users to roles. The database administrator user should never load data.
i In the Catalog pane, create a connection to the naperville database using the gisowner
credentials and name it Naperville_GISowner.
Hint: In the Catalog pane, right-click Databases and choose New Database Connection.
3-15
LESSON 3
a In the Catalog pane, right-click Folders and choose Add Folder Connection.
b In the Add Folder Connection window, browse to C:\EsriTraining, select the MMGD folder,
and click OK.
c In the Catalog pane, expand the MMGD folder, expand the Database folder, and then expand
the LandUsePlanning folder.
You see various planning-related feature classes that you will load into the geodatabase.
3-16
Loading data into the geodatabase
e Right-click the selected shapefiles, point to Export, and choose Feature Class(es) To
Geodatabase.
g Click Run.
i In the Catalog pane, refresh and expand the Naperville_GISowner connection, confirming that
the datasets have been created in the geodatabase and that they are owned by gisowner.
3-17
LESSON 3
There are two feature classes for planned land use, each created by different GIS technicians. One
is for the northern area of Naperville, and the other is for the southern area. You will combine
them in the geodatabase into one feature class called LandUsePlanned.
_____________________________________________________________________________
b For Feature Class Location, browse to and add the Naperville_GISowner connection.
e For Template Feature Class, browse to one of the LandUsePlanned shapefiles in the ..\
EsriTraining\MMGD\Database\LandUsePlanning folder.
The Template Feature Class parameter specifies the feature class that is used as a template to
define the attribute schema of the new feature class.
f For Coordinate System, click the Select Coordinate System button to open the Coordinate
System dialog box.
g In the Coordinate System dialog box, click the Add Coordinate System down arrow and
choose Import Coordinate System.
3-18
Loading data into the geodatabase
j Click Run.
The empty feature class has been created with the desired coordinate system and fields. Next,
you will append data into the feature class.
k Search for and open the Append tool and use it to load the data into the new feature class in
the geodatabase using the following parameters:
• For Input Datasets, use the LandUsePlannedNorth and LandUsePlannedSouth shapefiles.
• For Target Dataset, browse to your Naperville_GISowner connection and choose the
LandUsePlanned feature class that you created.
• For Schema Type, choose Use The Field Map To Reconcile Schema Differences.
3-19
LESSON 3
Using this Schema Type option means that the input dataset schema (field definitions) do
not have to match the schema of the target dataset. Any fields from the input datasets that
do not match the fields of the target dataset will not be mapped to the target dataset
unless the mapping is explicitly set in the Field Map parameter.
l Click Run.
The two datasets are appended into the empty feature class.
a In the Catalog pane, right-click the Naperville_GISowner connection, point to Import, and
choose XML Workspace Document.
3-20
Loading data into the geodatabase
b In the Import XML Workspace Document tool, set the following parameters:
• Target Geodatabase: Naperville_GISowner geodatabase connection
• Import File: ..\EsriTraining\MMGD\Database\STORMWATERSEWERNETWORK.xml
• Import Options: Import Data And Schema
c Click Run.
3. If you had to load more features into the ssLateralLine feature class and wanted to be sure
that the new features properly connected to existing features, what tool would you use?
_____________________________________________________________________________
Next, you will import several additional datasets that you will need later.
f For Input Features, browse to the ..\MMGD\Database\Elections folder, select both shapefiles,
and click OK.
3-21
LESSON 3
i If any datasets are missing, load them into the geodatabase using the skills that you have
learned.
Because you have several staff members who may perform the updates, you have decided to
store the toolbox containing the tool in the geodatabase for easy access.
a In the naperville geodatabase, create a toolbox named DataLoadingTools, making sure that
you are still using the Naperville_GISowner connection.
Hint: Right-click the connection, point to New, and choose Toolbox.
3-22
Loading data into the geodatabase
You must click Save to commit the changes made in the Tool Properties dialog box.
You will search for the required tools and add them to the model.
g Search for the Truncate Table tool and drag it into the model view.
h Use the same process to add the Append (Data Management) tool to the model view.
Now you will connect the two tools so that the Truncate Table tool's output table is used as the
Target Dataset parameter of the Append tool.
i In the model view, click the Truncated Table element and, without releasing the click, drag the
cursor to the Append tool element to connect them.
Next, you will provide the model with information about which dataset is being truncated and
which dataset holds the new records.
k Perform the following procedure to add a variable to the Truncate Table tool and set it as a
model parameter:
1. Right-click the Truncate Table tool, point to Create Variable, point to From Parameter,
and choose Input Table.
2. Right-click the new Input Table variable and choose Parameter.
3. Right-click the Input Table variable again, choose Rename, and name it Target Dataset.
l Repeat the procedure to add a variable to the Append tool for its Input Datasets parameter.
m Make the variable a model parameter and name the variable Input Features.
3-23
LESSON 3
n From the ModelBuilder tab, in the View group, click the Auto Layout button .
Lastly, you must make a small adjustment to an Append tool parameter. Because you are loading
from a shapefile, the schema of the input features will be slightly different from that of the target
dataset. You can choose whether to enforce a rule that schemas must match. By default, the
Append tool tests to ensure that schemas are identical, but you will choose not to test them in
this case.
q Change Schema Type to Use The Field Map To Reconcile Schema Differences, and then click
OK to close the tool.
s In the Catalog pane, right-click the FEMAFloodZone feature class from the naperville
geodatabase, point to Add To New, and choose Map.
Recently, some new flood zone areas were reported, but they do not appear in your data. You will
update the dataset now.
t In the Catalog pane, expand the DataLoadingTools toolbox, if necessary, and double-click the
Update Dataset model to run it using the following parameters:
• Target Dataset: FEMAFloodZone (from the naperville geodatabase)
• Input Features: FEMAFloodZoneUpdated (from the ..\Database\LandUsePlanning folder)
3-24
Loading data into the geodatabase
v In the bottom-right corner of the map view, click the Refresh button to see the updated
FEMAFloodZone feature class.
_____________________________________________________________________________
Conclusion
In this exercise, you created a user account that will own all GIS data in the database and that is
not assigned to a person so that data management can continue after staffing changes. You then
began the process of loading data into the geodatabase using various data-loading tools and
automation.
3-25
LESSON 3
Lesson review
Lesson review
1. Why might you use the Append tool instead of the Simple Data Loader?
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
3. Why is the Truncate Table tool the fastest way to empty an existing feature class?
_____________________________________________________________________________
_____________________________________________________________________________
3-26
Loading data into the geodatabase
3-27
LESSON 3
3. If you had to load more features into the ssLateralLine feature class and wanted to be sure
that the new features properly connected to existing features, what tool would you use?
Object Loader
3-28
Instructor page
4
Configuring privileges
Introduction
Key terms Most geodatabase users are data users who read and edit datasets
but do not create or manage them. After the data owner loads data
data users
into a multiuser geodatabase, privileges must explicitly be granted to
roles data users before they can access it. The easiest way to grant these
privileges is to group the users into roles and grant privileges to the
roles.
Topics covered
After completing this lesson, you will be able to perform the following
tasks:
• Explain role-based privileges.
• Create users and roles.
• Apply privileges to datasets.
• Explain how to safeguard logon credentials.
4-1
LESSON 4
Data users
Data users
This slide completes the The last type of user in the geodatabase is the data user. A data user
discussion on geodatabase is someone who views and uses the data for making maps,
user types. Explain that performing analysis, and maintaining the data. Data users are the
while data users are not least powerful but most numerous users in your geodatabase.
administering the data or
Figure 4.1
geodatabase in any way,
Data user responsibilities.
they are very important
because they are actually
using the data.
Data users can be further divided into readers and editors. Read-only
and edit privileges are set at the dataset level, which means that a
data user might be able to edit one dataset but only read another.
You can even restrict some users from reading certain datasets.
4-2
Configuring privileges
4-3
LESSON 4
Assigning privileges
The data owner assigns users privileges to geodatabase objects. The
tasks that the user must accomplish determine the privileges that
must be granted. The following table uses the example of elections
staff members and county commissioners who are managing an
election to show how different data-access needs affect privileges.
Table 4.1
Users Requirements Privileges
4-4
Configuring privileges
Roles
Roles
Scenario: You already have Roles provide a way to group users based on shared requirements.
lots of users and Roles are optional. The database administrator is responsible for
established roles. When creating roles and assigning users to roles. After roles have been
new staff members arrive, created, the data owners can assign privileges to roles rather than to
simply match them to the individual users.
appropriate role.
Figure 4.3
Also, managing privileges
Roles and their associated
by group is easier than by
privileges.
individual.
4-5
LESSON 4
Database User User name and password for the user, either new to
and Database create or existing to add to the database. If using
User Password an OS user, a password is not required.
Role Optional
The database role to add the user to.
4-6
Configuring privileges
For example, when you create a user with the geoprocessing tool, the
user will have the privilege to create tables (and therefore feature
classes) in the geodatabase. If you use RDBMS tools to create users,
you will have full control over the privileges. You could also create the
user using the geoprocessing tool and adjust privileges in RDBMS
tools.
Creating roles
Table 4.3
Parameter Description
4-7
LESSON 4
Assigning privileges
4-8
Configuring privileges
Defining roles
Defining roles
Focus on how to group For roles to be most efficient, you must put some time into
users into roles using the determining which roles are needed and what privileges those roles
ArcGIS Pro Help: User
Naperville example. Ask should be granted. Roles might be divided based on job
accounts and
students for more local responsibilities, departments, or other considerations. For example,
groups-Manage
government role ideas. using the Naperville data, you might have the following roles and
geodatabases in
privileges. Note that these roles separate read-only and editing users
<RDBMS>
for given datasets.
Table 4.4
User Data and privileges Role
Example roles for
requirements
Naperville
4-9
LESSON 4
Table 4.5
4-10
Configuring privileges
Securing credentials
Securing credentials
You might want to quickly When you share resources such as map documents, connection files,
demonstrate the solutions. and layer files, you could be sharing your credentials. Connections
Discuss solutions, not that are embedded in resources can save a user's logon and password
saving credentials or using for later use, which keeps users from having to type their passwords
OS authentication. every time they access the geodatabase.
But if a user name and password are saved, they will be shared when
the resource is shared. For example, if Bob, an editor, creates an
ArcGIS Pro project and shares it with Sue, a reader, Sue could connect
to the geodatabase as Bob and acquire editing privileges.
Figure 4.4
An example of how a user
(Sue) could have more
access than she should.
There are two ways to prevent this potential problem. First, when
using database authentication, you can clear the Save User/Password
check box in the Database Connection dialog box. If the user name
and password are not saved, a user will be prompted to supply logon
credentials when opening a resource. At this point, the user would
type his or her own credentials and acquire only his or her access
assigned by the data owner.
The other (and potentially easier) solution is to use OS authentication
for all users. By doing so, ArcGIS will always send the operating
system credentials of the person logged on to the computer. A user
can create and share a project, and others use their logon credentials
instead of the author's.
4-11
Configuring privileges
Figure 4.5
The privileges step.
4-13
LESSON 4
Role Privileges
Next, as the database administrator, you are ready to create the user roles identified by the
geodatabase administrator.
b In the EBASE MACHINE (blue desktop), start ArcGIS Pro and restore the course project.
4-14
Configuring privileges
f Click Run.
g Repeat the previous actions to create two more roles, Planning and Elections.
You have now created three roles that correspond to the departments in your organization.
a In the Catalog pane, expand the MMGD and Privileges folders, and then expand the
Privileges toolbox.
This model creates three new database users and assigns each to a role.
4-15
LESSON 4
c Double-click the Create Database User Pat rectangle to open the tool.
The parameters in this tool are populated using model variables. The Database Connection
variable and the Database User Password variable are model parameters that will be specified by
the user.
Notice that Pat will be assigned to the WaterManagement role when the tool executes.
g In the Catalog pane, double-click the Create Users model to open it as a tool in the
Geoprocessing pane.
h For Database Connection, browse to your Naperville_Admin connection, select it, and click
OK.
j Click Run.
4-16
Configuring privileges
Three new database users have been created and added to the appropriate role.
1. Which user account can set up privileges on a feature class in the Naperville geodatabase?
_____________________________________________________________________________
You will first grant privileges for the SewerStormwater feature dataset.
b For Input Dataset, browse to the Naperville_GISowner connection, click the SewerStormwater
feature dataset to select it, and click OK.
_____________________________________________________________________________
d For View (Select), from the drop-down list, choose Grant View Privileges.
e For Edit (Update/Insert/Delete), from the drop-down list, choose Grant Edit Privileges.
4-17
LESSON 4
i Right-click the SewerStormwater feature dataset, point to Manage, and choose Privileges.
You can also view and alter privileges in the Privileges dialog box.
_____________________________________________________________________________
4-18
Configuring privileges
b Create connections for Kim and Sam (rename them Naperville_Kim and Naperville_Sam) and
verify that their privileges are correct.
The feature datasets contain geometric networks and/or topologies, so you will not be
able to edit them. You can edit only non-versioned simple data points, lines, polygons,
annotation, and relationships. You cannot edit feature classes in a topology, network
dataset, or geometric network. This is because when you edit a feature in a network or
topology, not all the features in the network or topology lock, which means other editors
can edit another part of the network or topology in a way that could conflict with your
edits.
Conclusion
In this exercise, you created roles and users and set up privileges for data in your geodatabase.
When you selectively grant access to data based on who the user is, you must also make sure that
credentials are secure. When using database users, as in this exercise, you can secure credentials
by not saving the user name and password in the connection.
4-19
LESSON 4
Lesson review
Lesson review
_____________________________________________________________________________
_____________________________________________________________________________
2. Why would you use RDBMS tools instead of geoprocessing tools to create a user?
_____________________________________________________________________________
_____________________________________________________________________________
3. How can you secure your credentials when sharing resources like map documents and
connection files?
_____________________________________________________________________________
_____________________________________________________________________________
4-20
Configuring privileges
4-21
LESSON 4
4-22
Instructor page
5
Managing storage
Introduction
Key terms When loading data into a database, you can set parameters that
affect how the RDBMS stores it. These parameters are grouped into
Configuration
keywords that are selected when creating datasets in the
parameter
geodatabase.
DBTUNE
You may consider altering or creating keywords for the following
keyword reasons:
• To optimize database performance
• To control data storage
• To address database administrator requirements
Topics covered
• Configuration keywords
• DBTUNE
After completing this lesson, you will be able to perform the following
tasks:
• Describe how configuration keywords are used.
• Use geoprocessing tools to modify configuration keywords.
5-1
LESSON 5
Configuration
Configuration parameters
parameters Configuration parameters and values specify how the database
The focus is that stores tables, indexes, data, and other objects.
parameters are a way of
Figure 5.1
customizing storage in the
Questions to ask yourself
RDBMS. Discuss in general
when considering how to
terms, such as where a
store geodatabase data.
table is stored, without
getting specific about what
the parameters are actually
called.
5-2
Managing storage
Configuration
Configuration keywords
keywords Configuration parameters are grouped into configuration keywords.
This slide has two areas of When creating data, instead of specifying every parameter
focus. The first is that individually, a user has to pick only a keyword that refers to a group of
keywords bundle parameters.
parameters for ease of use. When creating datasets, users can choose predefined keywords, like
The second is the DEFAULTS, or custom keywords.
difference between
DEFAULTS and other
Predefined
named keywords. Mention
predefined keywords and Figure 5.2
custom keywords, and The DEFAULTS keyword,
emphasize that keywords which contains default
override values in values for all configuration
DEFAULTS and do not need parameters.
to have all parameters set.
5-3
LESSON 5
Figure 5.3
Configuration
A non-default predefined
keywords (continued)
keyword.
Custom
Figure 5.4
An example of a custom
keyword.
5-4
Managing storage
Figure 5.5
A custom keyword called
READ_ONLY.
5-5
LESSON 5
Table 5.1
Supported spatial types in
SQL Server, Oracle, and
PostgreSQL.
Esri ST_Geometry
Oracle Spatial
PostGIS Geometry
5-6
Managing storage
5-7
LESSON 5
DBTUNE table
DBTUNE table
Keep this slide brief. DBTUNE is a table in the geodatabase repository that stores
DBTUNE is simply the table configuration keywords and parameters. Each parameter is a record in
that stores keywords. the table, and each configuration keyword is associated with one or
more records.
Table 5.2
keyword parameter_name config_string
A subset of a DBTUNE
table (SQL Server
DEFAULTS B_INDEX_ROWID WITH FILLFACTOR = 75
example).
Figure 5.6
Workflow for updating
DBTUNE.
5-8
Managing storage
5-9
LESSON 5
An enterprise geodatabase • To enforce best practices without users having to specify custom
along with any data that keywords. For example, if you always want to use the
you intend to load. geography spatial type rather than geometry in SQL Server, you
should modify the DEFAULTS keyword to use geography.
• To create a custom keyword for less frequent situations. For
example, you may want to store read-only data with more tightly
packed indexes because the data and indexes will not be
changing.
5-10
Managing storage
5-11
LESSON 5
b In the Search ArcGIS Pro Help field, type configuration parameters and press Enter.
c Click the link that corresponds to your RDBMS (for example, Oracle configuration parameters).
You will want to return to this page later when you decide whether you will be modifying or
creating keywords. This page will help you determine which parameters that you can modify and
what possible values you can associate with them.
For the remainder of the exercise, you will follow the workflow to implement to the DBTUNE table
changes described earlier in this lesson.
b Search for and open the Export Geodatabase Configuration Keywords tool.
5-12
Managing storage
d For Output File, browse to C:\EsriTraining\MMGD\DBTUNE, and then for File Name, type
DBTUNE.txt.
e Click Run.
Now that the DBTUNE table has been exported as a file, you can open it in any text editor to
modify or create keywords.
Before any extensive modification, make a backup copy of the DBTUNE file so that
you can revert back to the original, if necessary.
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
5-13
LESSON 5
specifying a keyword, they will be using the modified DEFAULTS keyword and conforming to the
organizational policies.
Oracle users
• Scroll down in Notepad until you find the section with multiple parameters that all begin
with B_.
5-14
Managing storage
PostgreSQL users
• Scroll down in Notepad until you find the section with multiple parameters that all begin
with B_INDEX.
Notice the entry for A_INDEX_RASTER between the B_INDEX parameters, which
you can leave as is.
c Save the DBTUNE file but keep it open for the next step.
b Using Notepad, open the text file that corresponds to your specific RDBMS:
• SQL_Server_read_only
• Oracle_read_only
• PostgreSQL_read_only
The text file contains the parameters to support the READ_ONLY custom keyword. You will
append this text to the DBTUNE file that you created with the export earlier.
c Copy all the text in the file (be sure to include the ##READ_ONLY and END statements at the
beginning and end of the file).
5-15
LESSON 5
e In the Notepad window with the DBTUNE file, scroll to the bottom of the file.
f Paste the new lines from the <RDBMS>_read_only file to the end of the DBTUNE.txt file that
you exported earlier.
The end of your DBTUNE file should look similar to the following text:
END
##READ_ONLY
<copied lines from the <RDBMS>_read_only file>
END
c For Input File, browse to the ..\EsriTraining\MMGD\DBTUNE folder, select the DBTUNE.txt
file, and click Open.
d Click Run.
5-16
Managing storage
c In the Feature Class To Feature Class tool, set the following parameters:
• Output Location: Naperville_GISowner connection
• Output Feature Class: MunicipalBoundary
5-17
LESSON 5
Notice that nothing is selected for Configuration Keyword. You will leave it blank so that the
DEFAULTS keyword that you modified earlier will be used.
e Click Run.
5-18
Managing storage
3. How could you verify that the new feature classes were loaded using the appropriate
keywords?
_____________________________________________________________________________
Conclusion
You have modified the existing DEFAULTS keyword to change parameters used when data owners
load data without specifying a keyword. Additionally, you have created and used a custom
keyword that specifies the storage of feature classes in your geodatabase. In that case, you tightly
packed indexes for read-only datasets, but there are many other ways that you can customize
storage using configuration parameters and DBTUNE.
5-19
LESSON 5
Lesson review
Lesson review
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
3. What are the four steps for creating or modifying a keyword in DBTUNE?
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
5-20
Managing storage
3. How could you verify that the new feature classes were loaded using the appropriate
keywords?
You could investigate the Layers table in the SDE Repository using a database view or
check the database object using RDBMS tools.
5-21
Instructor page
Instructor page
6
Maintaining the geodatabase
Introduction
Key terms As users interact with the geodatabase, the tables will change. They
will grow with added features, shrink with deleted ones, and change
compress
with updated statements. As the tables change, the performance of
index the database can decrease. Maintaining the performance of the
geodatabase is a relatively simple process of updating statistics and
Python
creating and maintaining indexes.
statistics
versions Topics covered
• Attribute indexes
• Statistics
• Compress tool
• Python scripts
After completing this lesson, you will be able to perform the following
tasks:
• Use tools to maintain geodatabase performance.
• Use Python to automate tasks for maintaining performance.
• Explain how to resolve schema locks.
6-1
LESSON 6
Attribute indexes
Attribute indexes
Focus on what indexes are Attribute indexes are structures that improve the speed of query
and what they are used for. operations on the table, but they could slow writes and use more
ArcGIS Pro Help: Add
Lead a discussion on storage space. You must build indexes based on one or more
attribute index
examples of fields for which attribute fields.
students might create
indexes. Figure 6.1
Sample attribute query
The WHERE clause will that uses an index.
determine the index that
must be created. If a query
is intended to select
Customer information
where Value > 10, then the
Value attribute could
benefit from an index, not
the Customer attribute.
6-2
Maintaining the geodatabase
Statistics
Statistics
Focus on the importance of Databases use statistics to determine the best way to execute a
up-to-date statistics, and query. For example, on a table with only a few records, a full-table
how and why they get scan might be the fastest way to execute a query. But, as the table
outdated. grows, it will become more efficient to use indexes created for the
table to perform the search.
Figure 6.2
Databases rely on statistics
to determine when to use
an attribute index.
6-3
LESSON 6
Index Unique name for the index that describes the table and
Name columns
6-4
Maintaining the geodatabase
Update indexes
Table 6.2
Parameter Description
Parameters for the Rebuild
Indexes tool.
Input Database Connection to database as the owner of the
Connection datasets
6-5
LESSON 6
Calculate statistics
Table 6.3
Parameter Description
Parameters for the Analyze
Datasets tool.
Input Database Database connection using the data owner account
Connection
Include System SQL statement for defining query layer, for which
Tables fully qualified table names are required
6-6
Maintaining the geodatabase
Spatial indexes
Spatial indexes
Keep this conceptual: Spatial indexes are used to quickly locate features based on location
spatial indexes are there to when querying, displaying data, or editing.
make your queries faster,
Figure 6.3
and ArcGIS manages the
Use of a spatial index in a
index for you. Do not worry
location-based search.
about the underlying
implementation, only the
conceptual level. ArcGIS manages the spatial index for feature classes in most
circumstances. When you create or load a new feature class, ArcGIS
creates a spatial index. When data is loaded into a feature class using
a geoprocessing tool, the new features are evaluated and the spatial
index is rebuilt.
The only time you may have to rebuild a spatial index is when adding
in an editing session many new features that differ in size from the
original set of features. You can manage indexes from the Feature
Class Properties dialog box.
6-7
LESSON 6
Maintaining
Maintaining geodatabase performance for
geodatabase performance versioned data
for versioned data
If any objects in a multiuser geodatabase are versioned, running the
Keep this discussion very Compress tool is another important task for the geodatabase
high level. Say only that administrator to perform periodically to maintain geodatabase
running the Compress tool performance.
is a best practice (if data is
Versions are a construct that allows multiple representations of data
versioned), just like
to exist in a multiuser geodatabase for unspecified periods of time.
updating indexes and
This is a powerful way to isolate edits between groups of
statistics. Typically, it is
geodatabase users. In a versioning workflow, editing is done in
recommended to analyze
versions, and changes to data are tracked in underlying geodatabase
statistics before running the
repository tables. Over time, as features are added, deleted, and
Compress tool for best
modified and versions are merged, some records in the repository are
performance. You can refer
no longer needed to track changes. Running the Compress tool
students to the versioning
improves geodatabase performance by removing these unnecessary
IL course.
records.
Figure 6.4
A simple version tree.
6-8
Maintaining the geodatabase
Scheduling tasks
Scheduling tasks
This discussion should be a Geoprocessing tools can easily be automated using Python scripting
general introduction to the and an operating system scheduling agent.
idea of scripting with
Python and scheduling
scripts. Discuss why you Performance tasks should be scheduled to run automatically
would want to schedule on a fixed schedule.
tasks.
Figure 6.5
Python scripts set to run
automatically using
operating system tools.
Python
Python is the scripting language of choice for geoprocessing users.
Python is used for scripting data management, conversion, analysis,
and mapping workflows.
A current Python version is automatically installed with ArcGIS
Desktop (including ArcGIS Pro), ArcGIS Engine, and ArcGIS Server.
Scheduling
Both Windows and Linux operating systems have built-in scheduling
functionality that can be used to schedule the running of your Python
scripts used for database management.
In Windows, the software is called the Windows Task Scheduler. To
schedule a task, open Scheduled Tasks in the Control Panel and use a
wizard to add a scheduled task.
In Linux, the software is called Cron. To schedule a task using Cron,
add an entry to the crontab indicating which program you want to run
and when you want to run it. More information can be found in the
main pages provided with your Linux installation.
6-9
LESSON 6
6-10
Maintaining the geodatabase
Schema locks
Schema locks
Focus on the reasons and When a user is reading or editing a feature class or schema, the
causes of schema locks. You underlying schema must stay constant to allow for reliable interaction
will demonstrate an with the table. Schema locks help prevent users from editing schema
example of one next. while others are using the dataset.
Figure 6.7
Schema locks occur when
another user is accessing
the same geodatabase
object.
6-11
LESSON 6
6-12
Maintaining the geodatabase
6-13
LESSON 6
b Using the skills that you have learned, use the Naperville_GISowner connection to import the
CENSUS.xml workspace document located in the C:\EsriTraining\MMGD\Database folder.
Normally, your next step would be to use the Naperville_GISowner connection to assign
privileges to other users. However, in this exercise, you will focus on performing data maintenance
tasks as the data owner.
For example, after talking to the planning department, you learn that sometimes department staff
members query the ZoningDistrict feature class by the ZONECLASS field and at other times by
the ZONEDESC field. You will create two indexes to meet these use cases.
b Right-click ZoningDistrict and choose Properties, and then click the Indexes tab.
1. How many attribute indexes already exist for this feature class?
_____________________________________________________________________________
e Under Fields Available, click the ZONECLASS field, and then click the right arrow to add it to
the Fields Selected list.
f Click OK.
g Using the ZONEDESC field, repeat the process to create a second index called Zoning_Desc.
6-14
Maintaining the geodatabase
You have now created two indexes for the ZoningDistrict feature class.
Planning department staff members have told you that they frequently query the
CensusBlocksStats table. Sometimes they query the TOTPOP field, sometimes the POPDENS
field, and sometimes both in the same query.
To maximize performance while minimizing the number of indexes that you create (which will
minimize storage and decrease editing performance impact), you will create a multicolumn index
for TOTPOP and POPDENS and a single-column index for POPDENS.
l Under Fields Available, click the TOTPOP field, and then click the right arrow to add it to the
Fields Selected list.
m Repeat the process to add POPDENS to the Fields Selected list and verify that the TOTPOP
field is listed first.
o Using your knowledge gained from previous steps, create a single-column index for
POPDENS, naming the index anything that you like.
6-15
LESSON 6
a Search for and open the Analyze Datasets tool, and then set the following parameters:
• For Input Database Connection, select your Naperville_GISowner connection.
• For Datasets To Analyze, choose naperville.gisowner.CensusBlocksStats.
2. Could you clear any of the three check boxes at the bottom of the Geoprocessing pane?
Why or why not?
_____________________________________________________________________________
_____________________________________________________________________________
b Click Run.
6-16
Maintaining the geodatabase
a Search for and open the Rebuild Indexes tool, and then set the following parameters:
• For Input Database Connection, select your Naperville_GISowner connection.
• For Datasets To Rebuild Indexes For, select the naperville.gisowner.CensusBlocksStats
check box.
• Clear the Rebuild Delta Tables Only check box.
b Click Run.
6-17
LESSON 6
When you run any geoprocessing tool, an entry is added to Geoprocessing History in the Catalog
pane's History tab.
b Click the Sort down arrow and choose to sort in ascending order.
The most recent geoprocessing tool that you ran is shown at the bottom of this list.
d Press and hold Ctrl, and then click the Analyze Datasets, Compress, and Rebuild Indexes
entries to select them all.
e Right-click any of the selected entries and choose Save As Python Script.
h Click Save.
6-18
Maintaining the geodatabase
At this point, you have created an automated script that will analyze datasets, compress the
geodatabase, and rebuild indexes. You could use this script to maintain the performance of the
geodatabase in the following ways:
• Create a batch file that references the script to manually execute from the operating
system.
• Add the script to a custom toolbox and run from ArcGIS Pro.
• Add to Windows Task Scheduler or Linux Cron to run automatically based on a desired
frequency.
Conclusion
Maintaining your geodatabase is vital for user performance. By creating appropriate indexes and
rebuilding indexes and statistics periodically, you can keep your geodatabase performing
efficiently. Additionally, if you plan to use versioning, compressing the geodatabase will also be
an important part of your workflow. You have now created a Python script that will do this work for
you. You can use the script either manually or automatically on a set schedule.
6-19
LESSON 6
Lesson review
Lesson review
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
6-20
Maintaining the geodatabase
2. Could you clear any of the three check boxes at the bottom of the Geoprocessing pane?
Why or why not?
You could clear both the Analyze Delta Tables For Selected Dataset(s) and the Analyze
Archive Tables For Selected Dataset(s) check boxes because this table does not have
versioning or archiving enabled.
6-21
Instructor page
Instructor page
7
Associating data
Introduction
Topics covered
• Database views
• Query layers
After completing this lesson, you will be able to perform the following
tasks:
• Determine when to use query layers and database views.
• Create query layers and database views.
7-1
LESSON 7
Query layers
Query layers
Position query layers as an A query layer is an ArcGIS Pro layer or stand-alone table defined by a
easy way for users to view SQL query. Query layers can access data from both spatial and
additional attributes that nonspatial tables stored in the geodatabase.
may be used infrequently.
Figure 7.1
Users must have privileges
Query layers, which help
to the associated tables
associate data from
and attributes.
multiple tables, are stored
Ask students what is in an ArcMap document or
needed to join two tables layer file.
(common fields/values and
cardinality).
7-2
Associating data
Table 7.2
Parameter Description
Parameters for Make
Query Layer tool.
Input Connection to the database
Database
7-3
LESSON 7
Database views
Database views
Focus on the concept of Database views are database objects that store SQL query
creating a virtual table statements but act like tables.
based on a SQL statement
Figure 7.2
that can join tables, filter
Database views, which
attributes, or both.
help associate data from
multiple tables, are stored
as database objects.
Views can be used to join tables, similar to joins in ArcGIS Pro. But
because the view is stored in the database, it can be accessed by
many users in many map documents. For example, U.S. Census data
is frequently stored in a table separate from the Census blocks feature
class. Using a view to join the Census data to the Census blocks, users
will be able to create analytical maps based on Census data without
having to create a join.
Views can also be used to filter attributes either for ease of use or for
security reasons. For example, if you are storing ownership
information for parcels, that data may include personal identification
numbers to which not all staff members should have access. A view
can be used to give a user access to some but not all the fields in a
table. In this case, the user should be granted access to the view but
not the underlying tables.
7-4
Associating data
7-5
LESSON 7
7-6
Associating data
7-7
LESSON 7
7-8
Associating data
____________________________________________________________
____________________________________________________________
____________________________________________________________
7-9
Associating data
Exercise introduction 30 minutes Exercise 7: Associate data with database views and
query layers
Debrief
In this exercise, you will create database views and query layers to
Summarize and discuss the control how users access feature and attribute data across tables.
purpose and results of the
exercise. Figure 7.3
The management step of
the geodatabase
workflow.
You have several sets of data that separate the features from the
attributes, such as election results and Census data.
For election data, you store the voting precincts in a feature class and
the result from each race in its own stand-alone table. You will create
database views to assist users when they must create election result
maps.
For the Census data, you store the Census blocks in a feature class
and the demographic information in a table. You will explore using
query layers to link the blocks with only the demographic fields
needed for a particular project.
In this exercise, you will perform the following tasks:
• Create a query layer.
• Create and use database views.
7-11
LESSON 7
b Using the Change Privileges geoprocessing tool, grant View (Select) privileges to the Planning
role for the following datasets:
• CensusBlock (feature class)
• CensusBlocksStats (table)
d From the Map tab, in the Layer group, click the Add Data down arrow and choose Query
Layer.
i Review and copy the SQL statement from the text file.
j In the New Query Layer dialog box, in the Query text box, paste the SQL statement.
7-12
Associating data
k Click Validate to ensure that the query will work correctly. (If your query is valid, the Validate
button will turn gray.)
l Click Next.
m If necessary, under Unique Identifier Field(s), select the OBJECTID check box.
n Click Finish.
7-13
LESSON 7
o After the layer is added to the map, open the CensusPop attribute table.
Notice that only two of the Census demographic fields, TOTPOP and POPDENS, have been
appended to the CensusBlock feature class in this query layer.
If necessary, to restore the Catalog view, from the View tab, in the Windows group, click
Catalog View.
Three feature classes represent the results of elections for the U.S. Congressional 13th District,
U.S. President, and U.S. Senate.
7-14
Associating data
b For each feature class, click to select the feature class and view the metadata and geography
in the Details Panel, paying particular attention to the geometry. (Preview both the geography
and attributes.)
1. What do you notice about the geometry of the features in all three feature classes?
_____________________________________________________________________________
_____________________________________________________________________________
A more efficient method of storing the data can be achieved by storing the voting precincts
geometry once and linking it to stand-alone tables containing the election results. By storing the
boundaries only once, any corrections to the data can be made in just one place, reducing the
potential for errors and data inconsistency.
d Preview the new datasets. (Notice how the same information is stored without redundancy in
this normalized structure.)
• VotingPrecincts: stored as a polygon feature class
• PresidentofUSResults: stored as a table
• USSenateResults: stored as a table
7-15
LESSON 7
This SQL statement selects all voting precincts and joins the congressional election results.
c In ArcGIS Pro, in the Catalog pane, right-click the Naperville_GISowner connection, point to
New, and choose View.
Depending upon which RDBMS that you use, the Catalog pane or Catalog view may show
your view in upper, lower, or mixed case.
Next, you will register each view with the geodatabase so that it is easier to add to a map.
j Click Run.
k Repeat the process to register the other views with the geodatabase.
7-16
Associating data
All the fields specified in each database view definition are available in each layer.
b Using the Change Privileges geoprocessing tool, grant View (Select) privileges to the Elections
role for all three views that you created in the previous step.
c From the Naperville_Sam connection, add each of the views to the map:
• Congress13thDistrictView
• PresidentofUSView
• USSenateView
Schema locks will prevent permissions from being changed. If permissions do not seem to
update as you complete this step, you can try restarting ArcGIS Pro to clear all locks and try
again.
7-17
LESSON 7
As you can see, even though Sam does not have access to the underlying feature class and table
through the Elections role, he can still read them through the view. Database views are not used
just to create permanent joins; they can also be used to filter those fields to which a user has
access.
Conclusion
In this exercise, you created a query layer, database views, and associated attributes.
7-18
Associating data
Lesson review
Lesson review
1. How does the storage of database views and query layers differ?
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
3. What extra functionality can you get using database views rather than query layers?
_____________________________________________________________________________
_____________________________________________________________________________
7-19
LESSON 7
2. The better choice for Scenario 2 is query layers/database views. (Discuss your reasoning
below.)
Query layers
• Queries may change frequently as weekly field reports become available.
• Small-project team members are proficient with building SQL queries.
• Team members have sufficient privileges to access all feature classes and tables.
Exercise 7: Associate data with database views and query layers (page 7-11)
1. What do you notice about the geometry of the features in all three feature classes?
The geometry is the same in all three feature classes.
7-20
Instructor page
8
Applying the geodatabase
workflow
Introduction
Topics covered
• Geodatabase workflow
• Geodatabase users
After completing this lesson, you will be able to perform the following
tasks:
• Determine who in your organization will be responsible for
workflow tasks.
• Apply the steps of the geodatabase workflow.
8-1
LESSON 8
Geodatabase
Geodatabase workflow
workflow Throughout this course, you have followed a workflow for setting up
This recap of the workflow and maintaining a geodatabase. With variations to account for the
should be brief. Do not go structure and work patterns of your particular organization, you can
into too much depth also follow this workflow when you return to work.
because you want the
Figure 8.1
students to supply all the
The workflow for setting
substeps in the activity.
up and maintaining a
After this slide, go to step geodatabase, which you
1 of the activity, having have followed throughout
students fill out the Task the course.
column.
Create
The procedures for creating a geodatabase vary depending on the
type. For example, when you create a file geodatabase, a folder with
binary files is created in the file system. With an enterprise
geodatabase, system tables are added to an RDBMS database.
Connect
Connecting to a geodatabase allows you to access and potentially
manage the data in the geodatabase. You can connect to folders that
contain file-based geodatabases or to database servers for
geodatabases stored in an RDBMS.
Load data
Loading data can be performed as part of several workflows,
including setting up your geodatabase and updating datasets when
new data becomes available as part of maintenance. Either way, data
can be loaded as new datasets or as additions to existing datasets.
Privileges
For users to be able to access datasets, they must have privileges.
Privileges define who has access to data and whether users have
read-only or edit access.
8-2
Applying the geodatabase workflow
Performance
As users interact with your geodatabase, changes that they make can
affect performance. You can improve the performance of your
geodatabase by maintaining statistics and indexes that are used for
query operations.
Management
In both the RDBMS and ArcGIS, there are many aspects to managing
the geodatabase. One such aspect is geodatabase locks. As users
access data in the geodatabase, various locks are created that can
prevent some editing and management operations.
8-3
LESSON 8
Geodatabase
Geodatabase responsibilities
responsibilities Different users perform different geodatabase tasks. The
To determine who should responsibilities required of geodatabase users in a multiuser
perform a given task, ask a geodatabase vary by user account.
question like: Am I
Figure 8.2
administering the database,
The users of a multiuser
geodatabase, or dataset?
geodatabase.
Continue with the activity,
having students complete
the User Account and
Person columns.
8-4
Applying the geodatabase workflow
8-5
LESSON 8
Connect
Load
Data
Table 8.1
8-6
Applying the geodatabase workflow
Privileges
Performance
Management
Table 8.2
8-7
Applying the geodatabase workflow
Figure 8.3
Deploying and
maintaining a
geodatabase includes all
aspects of the
geodatabase workflow.
8-9
LESSON 8
c In the GEODATA MACHINE (orange desktop), paste the DropOracleUsers.txt file to the
desktop.
Be sure to connect with the remote desktop connection, not the Hyper-V Manager
connection.
f Copy all the text from the DropOracleUsers.txt file and paste it into the command prompt by
right-clicking next to the prompt.
8-10
Applying the geodatabase workflow
g When all the SQL commands have been completed, type exit, and then press Enter to log out
of SQL.
Make sure that you exit ArcGIS client applications as you do not want any locks
to persist.
8-11
LESSON 8
Be sure to connect with the remote desktop connection, not the Hyper-V Manager
connection.
c In the GEODATA MACHINE (orange desktop), paste the st_geometry.dll file to the desktop.
d Click the Windows Start button, type services, and press Enter.
e Locate and stop the service labeled postgresql-x64-11 - PostgreSQL Server 11.
h Paste the st_geometry.dll file into this directory, choosing to replace the existing file.
i When asked to provide administrator permission to copy to this folder, click Continue.
j In the Services window, locate and start the service labeled postgresql-x64-11 - PostgreSQL
Server 11.
k After the service starts, close the Services window and all File Explorer windows.
Now that you have ensured that the PostgreSQL server can use the ST_GEOMETRY data type,
you can create an enterprise geodatabase.
To avoid potential confusion, you will create a new project for this exercise.
a In the EBASE MACHINE (blue desktop), start ArcGIS Pro and click the Catalog template.
b In the Create A New Project dialog box, specify the following parameters:
• Name: Manhattan
• Location: C:\EsriTraining\MMGD
8-12
Applying the geodatabase workflow
Oracle users
Before creating the new geodatabase, Manhattan, make sure that you have dropped the Oracle
users created in the Naperville geodatabase. Also, Manhattan has been preconfigured using the
tnsnames.ora file, just as was done for the Naperville geodatabase.
• For the instance name, use manhattan.
• The database administrator account is sys/Esri.4.GIS.
• The geodatabase administrator account is sde/"Esri.4.GIS".
• Name the tablespace sde_repository_manhattan.
• Browse to C:\_sw\_Authorization and select the 107_Server_Adv.ecp license file.
Make sure to enclose the new password for the geodatabase administrator in
quotation marks. Oracle requires this when specifying a new password that uses
special characters. If you accidentally ran the tool without using quotation
marks in the password, you will need to restart ArcGIS Pro.
Remember that you might get a warning indicating that the ST_Geometry shape library
cannot be found. As with the earlier exercise, you have successfully created the
geodatabase.
8-13
LESSON 8
If you experience any issues and want to start over, perform the following
steps. Otherwise, proceed to the All RDBMS users section.
e Create connections to the manhattan geodatabase for both the database administrator and
the geodatabase administrator accounts.
a Perform the preloading tasks required for your RDBMS, as detailed in the following steps.
• Create a database user account that will be used to own data and name it gisowner with
a password of Esri.4.GIS.
• Create a connection using the gisowner credentials, and then label it using any
convention that you like, but make sure that you can differentiate it from the
Naperville_GISowner connection, if necessary.
Hint: Oracle users: Remember to enclose the password in quotation marks.
8-14
Applying the geodatabase workflow
a Create users and roles and apply privileges according to the following table.
b In ArcGIS Pro, create connections for the users that you just created.
Because you have not registered any feature layers as versioned, edits cannot be discarded
or undone. Any edits that you make will automatically be applied.
The feature datasets contain geometric networks and/or topologies, so you will not be
able to edit them. You can edit only non-versioned simple data-points, lines, polygons,
annotation, and relationships. You cannot edit feature classes in a topology, network
dataset, or geometric network. This is because when you edit a feature in a network or
topology, not all the features in the network or topology lock, which means that other
editors can edit another part of the network or topology in a way that could conflict with
your edits.
_____________________________________________________________________________
8-15
LESSON 8
_____________________________________________________________________________
_____________________________________________________________________________
b In the Catalog pane, right-click the Manhattan_GISowner connection and choose Add To New
Projects.
Next, you will pretend to be the owner of the dataset who is responsible for maintaining indexes.
You will leave the current ArcGIS Pro project open and start a new ArcGIS Pro session in which you
will act as the owner who performs such maintenance tasks.
e Double-click the ArcGIS Pro desktop shortcut to start a second ArcGIS Pro session.
g In the Catalog pane, expand Databases, and then using the Manhattan_GISowner connection,
expand the ParcelManagement feature dataset.
8-16
Applying the geodatabase workflow
h If your connections do not show up in the Catalog pane, perform the following steps:
• From the Insert tab, in the Project group, click Connections and choose Add Database.
• Browse to C:\EsriTraining\MMGD\Manhattan and add the desired connection.
i Open the Properties for the Parcels_Poly feature class and create separate indexes for the PID,
OWNER1, and Z9TOTALVAL fields.
_____________________________________________________________________________
j Exit the Manhattan ArcGIS Pro project (the project that you created at the beginning of this
exercise).
The locks created by the connections in this project are now released. A second option would be
to use the Geodatbase Administration dialog box to disconnect Ginger. However, it is
recommended that you avoid disconnecting active sessions. You should always first attempt to
contact the user and have them close their session.
k For the Parcels_Poly feature class, create separate indexes for the PID, OWNER1, and
Z9TOTALVAL fields.
Hint: Close the Feature Class Properties dialog box, and then reopen the Properties for the
Parcels_Poly feature class and click Add.
_____________________________________________________________________________
l Run the tools that you specified using the appropriate database connection.
6. What is the best way to ensure that these tools are run periodically to maintain
performance?
_____________________________________________________________________________
Conclusion
In this exercise, you combined many skills that you learned in class for configuring and managing
an enterprise geodatabase. You created an enterprise geodatabase, loaded data into it,
8-17
LESSON 8
configured privileges, and optimized performance. You are now ready to implement an enterprise
geodatabase in your own organization.
8-18
Applying the geodatabase workflow
Lesson review
Lesson review
1. What techniques have you learned for implementing a multiuser geodatabase that you will
apply in your own work?
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
8-19
LESSON 8
6. What is the best way to ensure that these tools are run periodically to maintain
performance?
Script and schedule them.
8-20
Applying the geodatabase workflow
Because you are using Oracle Express for this class, it will be necessary to drop the data owner as
well as geodatabase schema stored in the Naperville geodatabase. Then you can proceed to
create a new geodatabase as if you had a fresh installation of Oracle.
c In the GEODATA MACHINE (orange desktop), paste the DropOracleUsers.txt file to the
desktop, and then double-click it to open the file.
d Click the Windows Start button, type cmd, and press Enter to open a command prompt
window.
e Copy all the text from the DropOracleUsers.txt file and paste it into the command prompt by
right-clicking next to the prompt.
8-21
LESSON 8
f When all the SQL commands have been completed, type exit to log out of SQL.
Make sure that you exit ArcGIS client applications as you do not want any locks
to persist.
To reinforce the concept of setting up PostgreSQL so that you can create enterprise
geodatabases, you will perform the actions from the initial exercise to set up the server.
8-22
Applying the geodatabase workflow
Be sure to connect with the remote desktop connection, not the Hyper-V Manager
connection.
c In the GEODATA MACHINE (orange desktop), paste the st_geometry.dll file to the desktop.
d Click the Windows Start button, type services, and press Enter.
e Locate and stop the service labeled postgresql-x64-11 - PostgreSQL Server 11.
h Paste the st_geometry.dll file into this directory, choosing to replace the existing file.
i When asked to provide administrator permission to copy to this folder, click Continue.
j In the Services window, locate and start the service labeled postgresql-x64-11 - PostgreSQL
Server 11.
k After the service starts, close the Services window and all File Explorer windows.
Now that you have ensured that the PostgreSQL server can use the ST_GEOMETRY data type,
you can create an enterprise geodatabase.
Now that the city of Manhattan is ready to migrate to an enterprise geodatabase, your first task is
to create the new geodatabase.
To avoid potential confusion, you will create a new project for this exercise.
a In the EBASE MACHINE (blue desktop), start ArcGIS Pro and click the Catalog template.
b In the Create A New Project dialog box, specify the following parameters:
• Name: Manhattan
• Location: C:\EsriTraining\MMGD
8-23
LESSON 8
d In the Geoprocessing pane, search for and open the Create Enterprise Geodatabase tool.
Before creating the new geodatabase, Manhattan, make sure that you have dropped the Oracle
users created in the Naperville geodatabase. Also, Manhattan has been preconfigured using the
tnsnames.ora file, just as was done for the Naperville geodatabase.
Oracle users
• Database Platform: Oracle
• Instance: manhattan
• Database Administrator Password: Esri.4.GIS
• Geodatabase Administrator: sde
• Geodatabase Administrator Password: "Esri.4.GIS"
• Tablespace Name: sde_repository_manhattan
• Authorization File: 107_Server_Adv.ecp (in C:\_sw\_Authorization)
PostgreSQL users
• Database Platform: PostgreSQL
• Instance: <Host name>
• Database: manhattan
• Database Administrator: postgres
• Database Administrator Password: Esri.4.GIS
• Geodatabase Administrator Password: Esri.4.GIS
• Tablespace Name: Leave blank
• Authorization File: 107_Server_Adv.ecp (in C:\_sw\_Authorization)
8-24
Applying the geodatabase workflow
g In the Catalog pane, right-click Databases and choose New Database Connection.
h Create a connection to the database administrator account using the following parameters
associated with your RDBMS.
SQL Server
• Database Platform: SQL Server
• Instance: <Host name>
• Authentication Type: Database Authentication
• User Name: sa
• Password: Esri.4.GIS
• Database: manhattan
Oracle
• Database Platform: Oracle
• Instance: manhattan
• Authentication Type: Database Authentication
• User Name: sys
• Password: Esri.4.GIS
PostgreSQL
• Database Platform: PostgreSQL
• Instance: <Host name>
• Authentication Type: Database Authentication
• User Name: postgres
• Password: Esri.4.GIS
• Database: manhattan
j Create a connection to the geodatabase administrator account using the following parameters
associated with your RDBMS.
SQL Server
• Database Platform: SQL Server
• Instance: <Host name>
• Authentication Type: Database Authentication
• User Name: sde
• Password: Esri.4.GIS
• Database: manhattan
8-25
LESSON 8
Oracle
• Database Platform: Oracle
• Instance: manhattan
• Authentication Type: Database Authentication
• User Name: sde
• Password: Esri.4.GIS
PostgreSQL
• Database Platform: PostgreSQL
• Instance: <Host name>
• Authentication Type: Database Authentication
• User Name: sde
• Password: Esri.4.GIS
• Database: manhattan
Data from a file geodatabase must be uploaded to the Manhattan enterprise geodatabase.
a In the Geoprocessing pane, search for and open the Create Database User tool.
b Run the Create Database User tool using the following parameters:
• Input Database Connection: Manhattan_Admin
• Database User: gisowner
• Database User Password: Esri.4.GIS
Oracle users: For Database User Password, be sure to enclose the password in quotation
marks.
c In the Catalog pane, create a database connection to the Manhattan database using the
gisowner credentials and name it Manhattan_GISowner.
e In the MMGD folder connection, expand the Database folder and the ManhattanKS file
geodatabase.
8-26
Applying the geodatabase workflow
The city of Manhattan has two departments using the geodatabase. The wastewater department
maintains a sewer network, and the GIS department maintains basemap data. Your next task is to
implement security so that each department has access to the data needed to do its work.
a Search for and run the Create Role tool using the following parameters:
• Input Database Connection: Manhattan_Admin
• Role: wastewater
c Search for and run the Create Database User tool with the following parameters:
• Input Database Connection: Manhattan_Admin
• Database User: gilligan
• Database User Password: Esri.4.GIS
• Role: wastewater
e In the Geoprocessing pane, search for and open the Change Privileges tool.
8-27
LESSON 8
g Using the following table, set up the geodatabase privileges for the remaining feature dataset
and feature classes.
h Create database connections for Gilligan, Skipper, Ginger, and Mary Ann, and then verify that
they have access to the correct datasets.
Because you have not registered any feature layers as versioned, edits cannot be discarded
or undone. Any edits that you make will automatically be applied.
The feature datasets contain geometric networks and/or topologies, so you will not be
able to edit them. You can edit only non-versioned simple data-points, lines, polygons,
annotation, and relationships. You cannot edit feature classes in a topology, network
dataset, or geometric network. This is because, when you edit a feature in a network or
topology, not all the features in the network or topology lock, which means that other
editors can edit another part of the network or topology in a way that could conflict with
your edits.
8-28
Applying the geodatabase workflow
After consulting with your users, you have found that many parcel searches involve parcel ID
numbers, owner names, and parcel values. To make these searches more efficient, you will build
indexes for these fields.
a Using your Manhattan_Ginger connection, add the Parcels_Poly feature class (in the
ParcelManagement feature dataset) to a new map.
b In the Catalog pane, right-click the Manhattan_GISowner connection and choose Add To New
Projects.
c If you receive a warning message notifying you that a copy of the connection file will be
placed under the Favorites folder, click OK.
Next, you will pretend to be the owner of the dataset who is responsible for maintaining indexes.
You will leave the current ArcGIS Pro project open and start a new ArcGIS Pro session in which you
will act as the owner who performs such maintenance tasks.
f Double-click the ArcGIS Pro desktop shortcut to start a second ArcGIS Pro session.
h In the Catalog pane, expand Databases, and then using the Manhattan_GISowner connection,
expand the ParcelManagement feature dataset.
8-29
LESSON 8
i If your connections do not show up in the Catalog pane, perform the following steps:
• From the Insert tab, in the Project group, click Connections and choose Add Database.
• Browse to C:\EsriTraining\MMGD\Manhattan and add the desired connection.
j Open the Properties for the Parcels_Poly feature class and create separate indexes for the PID,
OWNER1, and Z9TOTALVAL fields.
k Exit the Manhattan ArcGIS Pro project (the project that you created at the beginning of this
exercise).
The locks created by the connections in this project are now released. A second option would be
to use the Geodatbase Administration dialog box to disconnect Ginger. However, it is
recommended that you avoid disconnecting active sessions. You should always first attempt to
contact the user and have them close their session.
l Close the Feature Class Properties dialog box, and then reopen the Properties for the
Parcels_Poly feature class.
n Name the index PID_index and add the PID field to the selected fields.
o Click OK.
p Repeat the process to create two more indexes with the values shown in the following table:
Name Field
OWNER_index OWNER1
VALUE_index Z9TOTALVAL
8-30
Applying the geodatabase workflow
q In the Geoprocessing pane, search for and run the Rebuild Indexes tool with the following
parameters:
• Input Database Connection: Manhattan_GISowner
• Include System Tables: <Cleared check box> (if necessary)
• Datasets To Rebuild Indexes For: Manhattan.GISOWNER.ParcelManagement/
Manhattan.GISOWNER.Parcels_Poly
• Rebuild Delta Tables Only: <Cleared check box>
6. In addition to creating and maintaining indexes, what else can you do to maintain the
performance of feature classes in a geodatabase?
Analyze datasets to rebuild statistics.
r In the Geoprocessing pane, search for and run the Analyze Datasets tool with the following
parameters:
• Input Database Connection: Manhattan_GISowner
• Include System Tables: <Cleared check box> (if necessary)
• Datasets To Analyze: Manhattan.GISOWNER.ParcelManagement/
Manhattan.GISOWNER.Parcels_Poly
7. What is the best way to ensure that these tools are run periodically to maintain
performance?
Script and schedule them.
8-31
Appendix
-32
Esri data license agreement
A
Esri data license agreement
ENVIRONMENTAL SYSTEMS RESEARCH INSTITUTE, INC. ("ESRI"), IS WILLING TO LICENSE THE
ENCLOSED ELECTRONIC VERSION OF THE TRAINING MATERIALS TO THE STUDENT ("YOU")
ONLY UPON THE CONDITION THAT YOU ACCEPT ALL TERMS AND CONDITIONS
CONTAINED IN THIS ESRI DATA LICENSE AGREEMENT ("AGREEMENT"). PLEASE READ THE
TERMS AND CONDITIONS CAREFULLY. BY CLICKING, "I ACCEPT", YOU ARE INDICATING
YOUR ACCEPTANCE OF THE ESRI DATA LICENSE AGREEMENT. IF YOU DO NOT AGREE TO
THE TERMS AND CONDITIONS AS STATED, ESRI IS UNWILLING TO LICENSE THE TRAINING
MATERIALS TO YOU.
Training Materials Reservation of Ownership. This Agreement gives You certain limited rights to
use electronic and tangible versions of the digital or printed content required to complete a
course, which may include, but are not limited to, workbooks, data, concepts, exercises, and
exams ("Training Materials"). Esri and its licensor(s) retain exclusive rights, title, and ownership to
the copy of Training Materials, software, data, and documentation licensed under this Agreement.
Training Materials are protected by United States copyright laws and applicable international
copyright treaties and/or conventions. All rights not specifically granted in this Agreement are
reserved to Esri and its licensor(s).
Grant of License. Esri grants to You a personal, nonexclusive, nontransferable license to use
Training Materials for Your own training purposes. You may run and install one (1) copy of Training
Materials and reproduce one (1) copy of Training Materials. You may make one (1) additional copy
of the original Training Materials for archive purposes only, unless Esri grants in writing the right to
make additional copies.
Training Materials are intended solely for the use of the training of the individual who registered
and attended a specific training course. You may not (i) separate the component parts of the
Training Materials for use on multiple systems or in the cloud, use in conjunction with any other
software package, and/or merge and compile into a separate database(s) or documents for other
analytical uses; (ii) make any attempt to circumvent the technological measure(s) (e.g., software or
hardware key) that effectively controls access to Training Materials; (iii) remove or obscure any
copyright, trademark, and/or proprietary rights notices of Esri or its licensor(s); or (iv) use audio
and/or video recording equipment during a training course.
Term. The license granted by this Agreement will commence upon Your receipt of the Training
Materials and continue until such time that (1) You elect to discontinue use of the Training
Materials or (2) Esri terminates this Agreement for Your material breach of this Agreement. This
Agreement will be terminated automatically without notice if You fail to comply with any provision
of this Agreement. Upon termination of this Agreement in either instance, You will return to Esri or
destroy all copies of the Training Materials, including any whole or partial copies in any form, and
deliver evidence of such destruction to Esri, and which evidence will be in a form acceptable to
A-1
Appendix A
Esri in its sole discretion. The parties hereby agree that all provisions that operate to protect the
rights of Esri and its licensor(s) will remain in force should breach occur.
Limited Warranty. Esri warrants that the media on which Training Materials is provided will be
free from defects in materials and workmanship under normal use and service for a period of
ninety (90) days from the date of receipt.
Disclaimer of Warranties. EXCEPT FOR THE LIMITED WARRANTY SET FORTH ABOVE, THE
TRAINING AND TRAINING MATERIALS CONTAINED THEREIN ARE PROVIDED "AS IS,"
WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, AND NONINFRINGEMENT. ESRI DOES NOT WARRANT THAT THE TRAINING OR
TRAINING MATERIALS WILL MEET YOUR NEEDS OR EXPECTATIONS; THAT THE USE OF
TRAINING MATERIALS WILL BE UNINTERRUPTED; OR THAT ALL NONCONFORMITIES,
DEFECTS, OR ERRORS CAN OR WILL BE CORRECTED. THE TRAINING DATABASE HAS BEEN
OBTAINED FROM SOURCES BELIEVED TO BE RELIABLE, BUT ITS ACCURACY AND
COMPLETENESS, AND THE OPINIONS BASED THEREON, ARE NOT GUARANTEED. THE
TRAINING DATABASE MAY CONTAIN SOME NONCONFORMITIES, DEFECTS, ERRORS, AND/
OR OMISSIONS. ESRI AND ITS LICENSOR(S) DO NOT WARRANT THAT THE TRAINING
DATABASE WILL MEET YOUR NEEDS OR EXPECTATIONS, THAT THE USE OF THE TRAINING
DATABASE WILL BE UNINTERRUPTED, OR THAT ALL NONCONFORMITIES CAN OR WILL BE
CORRECTED. ESRI AND ITS LICENSOR(S) ARE NOT INVITING RELIANCE ON THIS TRAINING
DATABASE, AND YOU SHOULD ALWAYS VERIFY ACTUAL DATA, SUCH AS MAP, SPATIAL,
RASTER, OR TABULAR INFORMATION. THE DATA CONTAINED IN THIS PACKAGE IS SUBJECT
TO CHANGE WITHOUT NOTICE. IN ADDITION TO AND WITHOUT LIMITING THE PRECEDING
PARAGRAPH, ESRI DOES NOT WARRANT IN ANY WAY TRAINING DATA. TRAINING DATA MAY
NOT BE FREE OF NONCONFORMITIES, DEFECTS, ERRORS, OR OMISSIONS; BE AVAILABLE
WITHOUT INTERRUPTION; BE CORRECTED IF ERRORS ARE DISCOVERED; OR MEET YOUR
NEEDS OR EXPECTATIONS. YOU SHOULD NOT RELY ON ANY TRAINING DATA UNLESS YOU
HAVE VERIFIED TRAINING DATA AGAINST ACTUAL DATA FROM DOCUMENTS OF RECORD,
FIELD MEASUREMENT, OR OBSERVATION.
Exclusive Remedy. Your exclusive remedy and Esri's entire liability for breach of the limited
warranties set forth above will be limited, at Esri's sole discretion, to (i) replacement of any
defective Training Materials; (ii) repair, correction, or a workaround for Training Materials; or (iii)
return of the fees paid by You for Training Material that do not meet Esri's limited warranty,
provided that You uninstall, remove, and destroy all copies of the Training Materials and execute
and deliver evidence of such actions to Esri.
IN NO EVENT WILL ESRI BE LIABLE TO YOU FOR COSTS OF PROCUREMENT OF SUBSTITUTE
GOODS OR TRAINING; LOST PROFITS; LOST SALES; BUSINESS EXPENDITURES;
INVESTMENTS; BUSINESS COMMITMENTS; LOSS OF ANY GOODWILL; OR ANY INDIRECT,
SPECIAL, EXEMPLARY, CONSEQUENTIAL, OR INCIDENTAL DAMAGES ARISING OUT OF OR
RELATED TO THIS AGREEMENT, HOWEVER CAUSED OR UNDER ANY THEORY OF LIABILITY,
EVEN IF ESRI HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. ESRI'S TOTAL
CUMULATIVE LIABILITY HEREUNDER, FROM ALL CAUSES OF ACTION OF ANY KIND, WILL IN
NO EVENT EXCEED THE AMOUNT ACTUALLY PAID BY YOU FOR THE PORTION OF THE
A-2
Esri data license agreement
A-3
Appendix A
A-4
Answers to lesson review questions
B
Answers to lesson review questions
Lesson 1: What is a multiuser geodatabase? (page 1-45)
4. If you create a database in RDBMS tools with a non-default location and then use the
Create Enterprise Geodatabase tool to turn it into a geodatabase, what does the tool do?
It creates the SDE user and the repository.
B-1
Appendix B
1. One must always create client connections using the Database Connection dialog box from
the Catalog pane.
b. False
B-2
Lesson 3: Loading data into the geodatabase
1. Why might you use the Append tool instead of the Simple Data Loader?
You can use the Append tool in automation situations.
3. Why is the Truncate Table tool the fastest way to empty an existing feature class?
It uses RDBMS truncate procedures that do not use database transactions, so there is
no logging.
B-3
Appendix B
2. Why would you use RDBMS tools instead of geoprocessing tools to create a user?
To have more control over the privileges that a user has in the database
3. How can you secure your credentials when sharing resources like map documents and
connection files?
Deselect the Save User/Password check box in the connection properties, or use
operating system authenticated users.
B-4
Lesson 5: Managing storage
3. What are the four steps for creating or modifying a keyword in DBTUNE?
1. Export DBTUNE to a file.
2. Edit in text editor.
3. Import the DBTUNE file.
4. Use the modified or new keyword to load data.
B-5
Appendix B
B-6
Lesson 7: Associating data
1. How does the storage of database views and query layers differ?
Database views are stored in the database. Query layers are stored in projects or layer
files.
3. What extra functionality can you get using database views rather than query layers?
Limiting access to only certain attributes
B-7
Appendix B
1. What techniques have you learned for implementing a multiuser geodatabase that you will
apply in your own work?
Answers will vary depending on organizational structure but can include creating the
geodatabase, data-loading strategies, role-based privilege structures, and automating
performance tasks with Python.
B-8
Activity 8A: Geodatabase tasks
C
Activity scripts
Step 1: Tasks
a Give the students time to brainstorm a list of tasks specific to their organization, associating
each task with the corresponding step in the geodatabase workflow.
b Give an example, such as "I already have the RDBMS installed, but I do need to create the
geodatabase," or "I must create a data owner account to own all of our data."
c After students have completed their lists, ask for volunteers to share parts of their list. Record
their tasks on the board or in the workbook PDF file using Acrobat's annotation tools.
b Collect and record the answers from the User Account column.
C-1
Demo 1A: Create an enterprise geodatabase
D
Demo scripts
You do not need to configure the ArcGIS Enterprise site. You only need the keycodes file
generated when licensing ArcGIS Enterprise to authorize the geodatabase. It must be an
enterprise authorization file and in the form of a .ecp file.
b In the Catalog pane, search for and open the Create Enterprise Geodatabase tool.
d If using the Geodata VM, refer to the following RDBMS administrative account information:
• SQL Server: sa/Esri.4.GIS
• Oracle: sys/Esri.4.GIS
• PostgreSQL: postgres/Esri.4.GIS
e Explain that you will use the Create Enterprise Geodatabase tool for almost all situations but
that you may want to manually do some steps (like creating the database using RDBMS tools).
D-1
Appendix D
This approach allows you to configure your database with non-default settings but still take
advantage of the ease of use of the Create Enterprise Geodatabase tool.
Do not worry about explaining the parameters for other RDBMSs. Tell students that there
are instructions for SQL Server, Oracle, and PostgreSQL in the current lesson in the
workbook and detailed instructions in the ArcGIS Help system.
b Leave the RDBMS management tool open for the next demonstration.
D-2
Demo 1B: Explore the repository
You can allude to coming back to locks and process information in later lessons.
b Ask the learners what they think would happen if the DBA were to drop any ArcGIS
database users or tables using RDBMS tools. Make sure that they understand that if that
were to happen, many objects would be orphaned, and their geodatabase would almost
certainly be corrupted. Similarly, if users were to add information, such as inserting a
column, directly in the RDBMS, it would not be registered with the repository and would
not appear in the client applications.
D-3
Appendix D
c Expand the Manage Geodatabases topic and point out the topics labeled Manage
geodatabases in <RDBMS> so that learners know that this option exists for searching all the
topics related to their RDBMS.
D-4
Demo 1C: Orientation to the course exercise environment
b Point out, or ask students to identify, how the virtual environment relates to the ArcGIS Client
tier and RDBMS tier, and where the primary components reside.
D-5
Appendix D
You can also mention that there are geoprocessing tools that can be used to create
database connections:
• Create Database Connection: To connect to a database, or an enterprise, workgroup, or desktop
geodatabase
• Create ArcSDE Connection File: To connect to an enterprise geodatabase using an ArcSDE service
(pre-10.3)
d Open the Connection Properties and discuss the implications of selecting the Save User/
Password check box.
e You may also choose to discuss that some organizations prefer to use OS instead of database
authentication. Make sure that they know that if they are interested in that option, it must be
supported by their RDBMS and must be configured in their RDBMS before making any
connections. Indicate that there are help topics referenced in the Authentication methods
section of the workbook.
f Open the Geodatabase Connection Properties and discuss the options for connecting to
versions (both transactional and historical) and user-schema geodatabases (Oracle only). If
user-schema geodatabases are configured, they appear in the Geodatabase Connection
Properties dialog box as alternate transactional versions.
D-6
Demo 3A: Create the data owner account
5 minutes Demo 3A: Create the data owner account (page 3-4)
Purpose
To create a data owner user account using the Create Database User tool.
Explain that creating users is a DBA task, and that even though it can be done from ArcGIS,
it still requires DBA credentials.
c Create a connection to the database using the gisowner user credentials. Rename the
connection Naperville_GISowner.
D-7
Appendix D
Environment settings
b Provide the following situation as a way to explain how changing environment settings at the
application level is one way to enforce your organization's database standards:
Your organization has determined that the most efficient number of records to force a
commitment to the database is 2,500. The default value in ArcGIS is 1,000. By changing the
default value of auto-commit to 2,500 at the application level, you can ensure better database
performance.
c In ArcGIS Pro, open the geoprocessing environments and go to the Geodatabase settings.
d Change the Auto Commit value from 1,000 to 2,500 and click OK.
D-8
Demo 3B: Use ModelBuilder
e Search for the Feature Class To Feature Class tool and open it. Click the Environments tab and
explain that anyone using this tool would then inherit the new value of 2,500.
Batch mode
g Right-click and open the Feature Class To Feature Class tool in batch mode.
h For Output Location, browse for your data owner connection to the demonstration
geodatabase.
Thus, you can quickly load multiple datasets under one geodatabase owner. This can be a
semi-automated option for those workflows that are somewhat repetitive but may not warrant
building a model.
a Create a toolbox in your geodatabase and explain that models must be stored in custom
toolboxes.
c Set the name and label properties to BulkLoad and Bulk Load.
D-9
Appendix D
c Drag the Feature Class To Feature Class tool onto the model.
d Say that you want this tool to run once for each feature class in a folder. Explain that
ModelBuilder provides tools for more complex logic, such as loops and iterators.
b Connect the following iterator outputs to their corresponding Feature Class To Feature Class
tool parameter:
D-10
Demo 3B: Use ModelBuilder
Optionally, you can set default values for the two parameters so that the model becomes
"colorful."
Be sure to mention that you are using the data owner connection so that the loaded
datasets will be owned by that account.
D-11
Appendix D
b There is a bug with using the Create Role tool with SQL Server. You will need to create
the role in SQL Server Management Studio instead. There are no special properties of the
role. Just open the properties of the database in SQL Server Management Studio and
browse to Security > Roles > Database Roles > New > Database Role.
b Click Add.
c Emphasize that both users and roles can be added to the feature class.
d Explain that you will add the roles to the feature classes so that additional staff members only
have to be added to roles, and not to all feature classes to which they need access.
D-12
Demo 4A: Manage users
You will repeat the process for two more feature classes, but you will show how to grant privileges
for both of them at the same time.
i Select both the Stores and Zoning feature classes and click Manage and then Privileges.
j In the tool, for User, type the Commerce role and grant View and Edit privileges.
b Open the connection and show that he has access to only the Streets feature class.
c Repeat the process, connecting as Deb, who can see both the Stores and Zoning feature
classes.
D-13
Appendix D
b Using the geodatabase administrator account (SDE), save the output file to the desktop and
name it DBTUNE.txt.
For Oracle, you could change one of the PCTFREE values in a similar fashion.
D-14
Demo 5A: Create and update keywords
e Explain that the UI_TEXT parameter must be set for the keyword to appear in the ArcGIS
interface.
b Using the SDE connection (geodatabase administrator account), browse to the modified
DBTUNE file and import it.
When finished, the new data will appear as a layer in the map.
b Right-click the geodatabase administrator connection to the geodatabase, point to New, and
choose View.
d For Output View Name, type vw_SDE_Layers, and for View Definition, type SELECT * FROM
SDE.SDE_layers.
e Click Run.
D-15
Appendix D
The vw_SDE_Layers view will appear in the table of contents as a stand-alone table.
g Identify which record corresponds to the new feature class (table_name), and then scroll to the
right and show the layer_config value indicating that the custom keyword was used.
D-16
Demo 6A: Manage attribute indexes and statistics
d Open the feature class properties using the data owner connection and go to the Indexes tab
to show the new index.
You may also want to explain that the Rebuild Delta Tables Only check box can be used when
data has been versioned, which it has not been in this case.
b Run the Rebuild Indexes tool again, but use the SDE connection to rebuild the system tables.
D-17
Appendix D
If desired, explain why users would choose to analyze delta and archive tables.
If you get a warning that the function had no effect, you can explain that because the data
has not changed since it was created, the statistics have not changed.
d Run the tool again using the SDE connection to analyze the system tables.
e Keep ArcGIS Pro open for the next demonstration because you will use the geoprocessing
Results window to access the Python code.
D-18
Demo 6B: Manage performance tasks with Python
b In the Catalog pane, using a data owner connection, choose the feature class from the
previous demonstration to register as versioned.
e Search for and open the Compress tool, type your SDE connection, and run the tool.
g Right-click the Compress tool result and choose Save As Python Script.
h In File Explorer, browse to and right-click C:\DemoData, name the fileGDB_Compress, and
click Save.
j Show that the code contains all of the parameters from the run of the tool.
D-19
Appendix D
Explain that you now have a script that can be run outside of ArcGIS Pro any time you want to
compress the geodatabase.
a Click the Windows Search button, search for scheduler, and open Task Scheduler.
e Explain that you now have a completely automated script that will ensure optimal performance
of the geodatabase.
D-20
Demo 6C: View and clear locks
b With any connection that has sufficient privileges, try to make a schema change to the same
feature class.
c Expand the Connections section and click Show Connected Users And Locks.
g Induce an error message by attempting to view the attribute table of the feature class you
added to the map earlier.
D-21
Appendix D
Purpose
To demonstrate how to create a query layer.
b Preview the tables for the Stores feature class and the Store_Revenue table. Specify the key
fields that will be used (StoreID and Store_ID, respectively).
The expression will be similar to this one: Select Shape, StoreID, Name from Stores.
d Explain that by using the query builder, anyone can build an expression to create a query
layer. You are only showing attributes from one table for now just to show how easy it is to
interactively build a query.
D-22
Demo 7A: Create query layers
This time, you will use a more detailed expression to join the tables.
g Create a query layer and use the statement provided in the Views_and_Query_Layers.txt file.
h Open the table for the query layer and point out the attributes that came from both tables.
i Explain that there is not a new object in the geodatabase; the query layer exists only in the
ArcGIS Pro project.
k Show the Save As Layer File option and other sharing options. Explain that one can reuse the
query layer in other maps, as well as save and share the project to preserve the query layer.
D-23
Appendix D
Purpose
To demonstrate how to create a database view.
c Symbolize the StoresWithRevenue layer by using the Revenue attribute (the new column that
originates from the Store_Revenue table).
D-24