100% found this document useful (1 vote)
338 views287 pages

Instructor Work Book

Uploaded by

haitham.elwany
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
338 views287 pages

Instructor Work Book

Uploaded by

haitham.elwany
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 287

Deploying and Maintaining a

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

1 What is a multiuser geodatabase?


Author lesson story
Lesson introduction ............................................................................................................................ 1-1
Multi-tier architecture ......................................................................................................................... 1-3
Identifying the appropriate software tier............................................................................................ 1-5
Multiuser geodatabase components.................................................................................................. 1-6
Hierarchy of users ............................................................................................................................... 1-7
Comparing tools for making a multiuser geodatabase...................................................................... 1-9
Create an enterprise geodatabase................................................................................................... 1-11
Explore the repository ...................................................................................................................... 1-15
Exercise flow..................................................................................................................................... 1-17
Orientation to the course exercise environment .............................................................................. 1-18
Exercise 1A: Create a multiuser geodatabase in SQL Server........................................................... 1-19
Confirm services on the RDBMS server ..................................................................................... 1-20
Install RDBMS client software .................................................................................................... 1-20
Create a multiuser geodatabase................................................................................................ 1-21
Exercise 1B: Create a multiuser geodatabase in Oracle .................................................................. 1-27
Confirm services on the RDBMS server ..................................................................................... 1-28
Install RDBMS client software .................................................................................................... 1-28
Create a multiuser geodatabase................................................................................................ 1-32
Exercise 1C: Create a multiuser geodatabase in PostgreSQL.......................................................... 1-37
Confirm services on the RDBMS server ..................................................................................... 1-38
Configure PostgreSQL server .................................................................................................... 1-38
Create a multiuser geodatabase................................................................................................ 1-41
Lesson review ................................................................................................................................... 1-45

2 Connecting to the geodatabase


Author lesson story
Lesson introduction ............................................................................................................................ 2-1
RDBMS client software ....................................................................................................................... 2-2
Create a connection ........................................................................................................................... 2-3
Software version compatibility ........................................................................................................... 2-5
Authentication methods ..................................................................................................................... 2-7
Connection files.................................................................................................................................. 2-8

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

3 Loading data into the geodatabase


Author lesson story
Lesson introduction ............................................................................................................................ 3-1
Data owner account ........................................................................................................................... 3-2
Create the data owner account .......................................................................................................... 3-4
RDBMS considerations ....................................................................................................................... 3-6
Geoprocessing environment settings................................................................................................. 3-7
Choosing a data-loading tool ............................................................................................................ 3-8
Updating datasets .............................................................................................................................. 3-9
Automation....................................................................................................................................... 3-10
Use ModelBuilder............................................................................................................................. 3-11
Exercise 3: Load data into the geodatabase.................................................................................... 3-13
Create the data owner account and connection........................................................................ 3-14
Load multiple datasets into a geodatabase .............................................................................. 3-16
Append data into a single feature class..................................................................................... 3-18
Load data by importing an XML workspace document............................................................. 3-20
Update datasets......................................................................................................................... 3-22
Lesson review ................................................................................................................................... 3-26

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

6 Maintaining the geodatabase


Author lesson story
Lesson introduction ............................................................................................................................ 6-1
Attribute indexes ................................................................................................................................ 6-2
Statistics.............................................................................................................................................. 6-3
Manage attribute indexes and statistics............................................................................................. 6-4
Spatial indexes ................................................................................................................................... 6-7
Maintaining geodatabase performance for versioned data............................................................... 6-8
Scheduling tasks................................................................................................................................. 6-9
Manage performance tasks with Python .......................................................................................... 6-10
Schema locks.................................................................................................................................... 6-11
View and clear locks ......................................................................................................................... 6-12
Exercise 6: Maintain performance in your geodatabase .................................................................. 6-13
Import census data .................................................................................................................... 6-14
Create indexes ........................................................................................................................... 6-14
Update statistics......................................................................................................................... 6-15
Compress the geodatabase....................................................................................................... 6-16
Rebuild indexes ......................................................................................................................... 6-17
Automate performance tasks..................................................................................................... 6-17
Lesson review ................................................................................................................................... 6-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

8 Applying the geodatabase workflow


Author lesson story
Lesson introduction ............................................................................................................................ 8-1
Geodatabase workflow....................................................................................................................... 8-2
Geodatabase responsibilities ............................................................................................................. 8-4
Geodatabase tasks ............................................................................................................................. 8-6
Exercise 8: Configure and manage a multiuser geodatabase............................................................ 8-9
(Oracle only) Drop objects from previous database .................................................................. 8-10
(PostgreSQL only) Configure PostgreSQL server....................................................................... 8-11
Create the Manhattan geodatabase .......................................................................................... 8-12
Load data into the geodatabase ............................................................................................... 8-14
Apply privileges ......................................................................................................................... 8-15
Maintain performance................................................................................................................ 8-16
Lesson review ................................................................................................................................... 8-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

Author course story


This course focuses on creating and maintaining an Enterprise geodatabase. The term multiuser
geodatabase encompasses Desktop, Workgroup, and Enterprise geodatabases. However, the
term should not be emphasized. Whenever possible, refer to each type of geodatabase
specifically.
Enterprise geodatabases are supported on SQL Server, Oracle, PostgreSQL, DB2, and Informix.
This course focuses on generic concepts and functionality across all implementations, with specific
notes for SQL Server, Oracle, and PostgreSQL. These notes are indicated by database icons with
the abbreviations SQL (SQL Server), ORA (Oracle), and PGS (PostgreSQL). Managing the
enterprise geodatabase is possible given new tools and functionality in ArcGIS Desktop.
Concepts covered in the class include creating the geodatabase, connecting to it, loading data,
controlling storage options, assigning privileges, viewing and querying database layers,
performance tools, and locks. These concepts form the basis of a workflow that is followed in the
course, with the goal that, at the end of the course, students will be able to work through the
entire workflow from beginning to end.
Students are expected to have a basic understanding of ArcGIS and RDBMS concepts. Exercises
assume a minimum knowledge in these areas and use fewer scripts than introductory classes.
Students with less experience may have more questions during exercises.
The class does not include versioning. Refer students to Implementing Versioning in the Multiuser
Geodatabase for versioning concepts and workflows.
Instructor page

Instructor icons used in this workbook


Notes point out additional information, exceptions, or special circumstances that apply
to a particular topic or procedure.

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.

Slides support instruction by presenting or clarifying concepts with diagrams,


workflows, maps, and pictures.

Estimated times provide guidance on approximately how many minutes an exercise,


demo, or activity will take to complete.

Warnings alert you to potential problems or to actions that should be avoided.


Introduction
This course prepares you to successfully deploy a multiuser
geodatabase to manage your organization's critical geographic data
assets. You will learn about the multiuser geodatabase architecture
and installation options. You will also learn how to configure the
geodatabase for efficient data storage and delivery of data access
and editing capabilities to many users. Although course exercises use
the Enterprise geodatabase, many course concepts also apply to
Workgroup geodatabases.

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.

Esri GIS Dictionary


http://support.esri.com/other-resources/gis-dictionary
This dictionary includes definitions for GIS terms related to geodata,
analysis, GIS modeling and web-based GIS, cartography, and Esri
software.

Installing the course data


Some exercises in this workbook require data. Depending on the
course format, the data is available on a DVD in the back of a printed
workbook or as a data download. To install the data, place the DVD in
your disc drive or double-click the data download, and follow the
instructions in the installation wizard. The data will automatically be
installed in the C:\EsriTraining folder.

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.

Tips provide brief help for performing a task or clarifying concepts.

External resources provide optional, special-interest information


about course topics.

Esri Training resources provide more in-depth training on related


topics.

Best practices offer industry or professional guidelines, help set goals


or priorities, and save time.

Estimated times provide guidance on approximately how many


minutes an exercise will take to complete.

Warnings alert you to potential problems or to actions that should be


avoided.

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

Total lesson length:


60 minutes
Lesson 1
Instruction: 30 minutes What is a multiuser geodatabase?
Exercises: 30 minutes
Author lesson story
Now that the ArcSDE technology has been fully migrated to the RDBMS and client tiers, there is
no need to mention ArcSDE at all. In place of the deprecated ArcSDE command-line tools, all user
and administrative functions can be performed with ArcGIS Pro. Also, the ArcSDE application
server connection has been deprecated.
The lesson length in the top-left corner of this page reflects the time needed for instruction and a
single exercise. Students will choose a single exercise to complete from three of varying lengths
(shown in the following graphic).

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

Learning objectives Learning objectives

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.

You can point out that the


blue and green colors are
used throughout this lesson
to signify which tier items
generally relate to.
RDBMS
All management tasks that
you will perform are The RDBMS provides storage management for the geodatabase. This
accomplished through management includes storing the data as tables, providing access
either the ArcGIS clients or through database connections, securing the data based on user
the RDBMS. accounts and privileges, and providing backup and recovery tools.
ArcGIS supports the following RDBMSs:
• Oracle
• Microsoft SQL Server
• IBM DB2
• PostgreSQL
• SAP HANA

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

ArcGIS clients include the following applications:


• ArcGIS Desktop (which includes ArcMap, ArcCatalog, and
ArcGIS Pro)
• ArcGIS Enterprise
• ArcGIS Engine

1-4
What is a multiuser geodatabase?

Activity 1A: Identifying the appropriate software tier


Identifying the
Each software tier provides different functionality to the multiuser
appropriate software tier
geodatabase. Understanding the multi-tier architecture helps you
determine which management tool or client software you will use for
10 minutes various tasks.
Which software tier (ArcGIS client or RDBMS) is appropriate to use for
Purpose each of the following scenarios?
To practice identifying the
software tier used to 1. A user will be editing data and wants to take advantage of domains
perform a task. that have been applied to various fields.
Debrief
After students have ____________________________________________________________
recorded their answers in
the workbook, discuss them 2. The administrator must create a backup of the geodatabase.
as a group.
____________________________________________________________

3. The administrator must create a feature class in the geodatabase.

____________________________________________________________

4. The utilities department has decided to create a geometric network


to represent the sewer system.

____________________________________________________________

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

Point out that the main


piece to install is ArcGIS
Desktop and the repository.

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

The geodatabase administrator account is created when you create


the enterprise geodatabase and is normally named SDE. You can
ArcGIS Pro Help: A
think of the SDE account as equivalent to any other geodatabase user
comparison of
account with which you can create geodatabase objects but with
geodatabase owners in
additional geodatabase privileges to support certain administrative
SQL Server
tasks.

The SDE account is generally not assigned to one particular person, a


type of account that is referred to as "headless." Despite this lack of
assignment, the credentials should not be widely shared. If your
organization does not allow any headless accounts, you can use a

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.

In Oracle, the master geodatabase administrative user is


named SDE.

Privileges

When an enterprise geodatabase is created, the geodatabase


administrative user is also created and granted privileges required for
ArcGIS Pro Help:
administering the geodatabase. Privileges include connecting;
Privileges for
creating tables, procedures, views, and triggers; and removing
geodatabases in <your
connections from the database.
RDBMS> (for example,
Privileges for
geodatabases in Oracle)

1-8
What is a multiuser geodatabase?

Comparing tools for


Comparing tools for making a multiuser
making a multiuser geodatabase
geodatabase
There are two geoprocessing tools that you can use to make a
multiuser geodatabase. The enterprise geodatabase is a type of
multiuser geodatabase. Remember that multiuser geodatabases
come in three types: Enterprise, Workgroup, and Desktop.

The Create Enterprise Geodatabase tool properly sets


up a database to be used as a geodatabase. This setup
can include creating a database, tablespace, and SDE
user account. The tool also creates the geodatabase
repository. Specific operations that the tool performs
depend on the underlying RDBMS.

The Enable Enterprise Geodatabase tool adds a


geodatabase repository to an existing database. It can
also pre-create the SDE user as an OS user.

The best tool to use depends on your circumstances.

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?

Demo 1A: Create an Create an enterprise geodatabase


enterprise ArcGIS Pro Help: Create
Before running the Create Enterprise Geodatabase tool, install the
geodatabase an enterprise geodatabase
following items:
(See script page D-1)
• The RDBMS
10 minutes • An ArcGIS client
• An RDBMS client
Purpose
You must have database administrator credentials to run the tool.
To discuss the difference
between the Create
Enterprise Geodatabase Results in different RDBMSs
and the Enable Enterprise Table 1.1
Create Enterprise Function SQL PostgreSQL Oracle
Geodatabase tools. Show
Geodatabase tool Server
how to use geoprocessing
tools to create an functionality.
Creates a database
enterprise geodatabase.
Data
No data, only a running
Creates a tablespace *
RDBMS server and ArcGIS
Server keycodes file
needed Creates a geodatabase
administrative user

Grants administrative user


privileges

Creates a geodatabase repository

*Tablespace must already exist. If left blank, the pg_default


tablespace is used.

1-11
LESSON 1

Creating an enterprise geodatabase in SQL Server

When using the Create Enterprise Geodatabase tool with


SQL Server, the database will be 500 MB with a 125 MB
log file, both created in the default SQL Server location.

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.

Authentication The authentication type. If you chose OS


Type authentication, you must be logged in as a member
of the sysadmin fixed server role.

RDBMS The user name and password of the database


Administrator administrator. If you do not choose OS
and Password authentication, provide the credentials of a sysadmin
user.

SDE Owned Check box that allows you to designate the SDE
Schema user instead of the DBO user as the owner of the
geodatabase.

Geodatabase The user name and password of the geodatabase


Administrator administrator. If you selected the SDE Owned
and Password Schema check box and the SDE user account does
not exist, the user will be created. For DBO schema,
these fields are left blank.

Authorization The keycodes file (.ecp) created when authorizing


File ArcGIS Enterprise.

SDE or DBO schema?


ArcGIS Pro Help: A Choosing between SDE and DBO largely depends on security
comparison of considerations, including access to database administration and the
geodatabase owners in location of user accounts. If you choose SDE schema, you can
SQL Server

1-12
What is a multiuser geodatabase?

separate the SDE and RDBMS administrative tasks. If you choose


DBO schema, the same user does both kinds of tasks.

Creating an enterprise geodatabase in Oracle

When you use the Create Enterprise Geodatabase tool


with Oracle and select the option to create the
tablespace, the database will be 400 MB and stored in
the default location.

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.

RDBMS The user name and password of the database


Administrator administrator (sys).
and
Password

Geodatabase The SDE user name and a password for the master
Administrator geodatabase OR an existing user for a user-schema
and geodatabase.
Password

Tablespace A preconfigured tablespace name to use OR a valid


tablespace name to create. You can also leave it
blank to create a default tablespace called SDE_TBS.

Authorization The keycodes file (.ecp) created when authorizing


File ArcGIS Enterprise.

Multiple geodatabases in one Oracle instance?


Beginning with Oracle 12c, Oracle supports multiple databases in a
single instance. These databases are referred to as pluggable
databases. To create a new pluggable geodatabase, you must create
a global database and configure the net service name of the new
pluggable geodatabase that you intend to create.

1-13
LESSON 1

Creating an enterprise geodatabase in PostgreSQL

When using the Create Enterprise Geodatabase tool with


PostgreSQL, configure it to use a pre-created tablespace.

The public group role will be granted access on the SDE


schema. For higher security, you can revoke public access
and grant it to a more restrictive group.

PostgreSQL requires that you copy the ST_Geometry libraries to the


PostgreSQL server.
ArcGIS Pro Help:
Geodatabases in
PostgreSQL

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.

Database The user name and password of the database


Administrator administrator. If you connect as the postgres
and Password superuser, the user name is postgres by default.

Geodatabase The SDE user name and a password for the


Administrator geodatabase. If the user account does not exist, it
and Password will be created.

Tablespace The name of an existing tablespace to use. If you


leave it blank, the database is created in pg_default.

Authorization The keycodes file (.ecp) created when authorizing


File ArcGIS Enterprise.

1-14
What is a multiuser geodatabase?

Demo 1B: Explore the Explore the repository


repository ArcGIS Pro Help:
The repository is a set of RDBMS tables that enforces geodatabase
(See script page D-3) Geodatabase system
behavior, stores information about the geodatabase, and tracks the
tables in <RDBMS>
10 minutes data stored in the geodatabase. There are two types of tables:
geodatabase and SDE.
Purpose
To reinforce the concept SDE tables
that the repository supports There are several repository tables that store metadata about feature
multiuser geodatabase classes, versioning, connections, and locks.
behaviors.
Data Table 1.5
Table Use
A selection of SDE tables
Use the geodatabase
and their uses.
created in the previous Table_registry Maintains data about all tables registered in
demonstration to show the geodatabase, not just feature classes
repository tables with
entries. Layers Maintains data about each feature class in the
database, such as spatial types and spatial
reference

Raster_columns Refers to rasters stored in raster tables

Column_registry Manages attribute columns for all registered


datasets

Process_information Collects geodatabase session statistics and


information

Layer_locks Stores information about locks on feature


classes

Versions Tracks versions

In SQL Server and PostgreSQL, the


geodatabase system table names are
prefixed with SDE_.

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)

GDB_ItemTypes Provides information on what type of


object each item is in the GDB_Items
table

GDB_ItemsRelationships Provides information on how


geodatabase objects in the
GDB_Items relate to each other

GDB_ItemsRelationshipTypes Provides information on the type of


relationships between geodatabase
objects

GDB_ReplicaLog Provides information on every replica


import or export operation

GDB_Tables_Last_Modified Validates geodatabase system tables


when they are cached by the client
application

If you create it with ArcGIS tools, manage it with ArcGIS


tools.

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

Demo 1C: Orientation to the course exercise environment


Orientation to
The virtual environment for this course simulates a private network
the course exercise
that consists of a client machine (EBASE) and a separate RDBMS
environment
server (GEODATA). These two machines are members of the same
(See script page D-5)
domain, controlled by the ADSRV2016 machine. The EBASE machine
5 minutes serves as the client machine with which, using ArcGIS Pro, you will
create and manage an enterprise geodatabase that resides on the
Purpose GEODATA machine.
Briefly orient students to Figure 1.7
the exercise VM The exercise environment
environment before they for this course.
begin their exercise.
Data

1-18
What is a multiuser geodatabase?

Exercise introduction 15 minutes Exercise 1A: Create a multiuser geodatabase in


SQL Server
Debrief
Summarize and discuss the
purpose and results of the Complete this exercise only if you use SQL Server in your
exercise. organization.

The workflow to set up and maintain an enterprise geodatabase


includes six major steps. The first step in the workflow is to create the
enterprise geodatabase, which you will do in this exercise.

Figure 1.8

Imagine that you work as a database administrator for the city of


Naperville, Illinois. You have been directed to consolidate the GIS
data used across multiple departments. You have also been asked to
integrate the GIS data with existing nonspatial data that is already in
an RDBMS. Your first step in the process is to create a multiuser
(Enterprise) geodatabase on the RDBMS server.
In this exercise, you will perform the following tasks:
• Install client software to connect to SQL Server.
• Create a multiuser geodatabase.

1-19
LESSON 1

Step 1: Confirm services on the RDBMS server


First, you will connect to the RDBMS server and confirm that the necessary Windows services are
running.

a On the host PC desktop, double-click the GEODATA.rdp shortcut.

b If you are prompted to sign in, use the following credentials:


• User name: adAdmin
• Password: Esri.4.GIS

The GEODATA VM window (orange desktop) appears. The GEODATA VM will serve as your
RDBMS server in this course.

c Click the Windows Start button and type services.

d In the search results, click the Services application.

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.

g Close the Services window.

h Minimize the remote connection to the GEODATA MACHINE (orange desktop).

Step 2: Install RDBMS client software


You will install client software so that this ArcGIS client can communicate with the SQL Server
machine.

a On the host PC desktop, double-click the EBASE.rdp shortcut.

1-20
What is a multiuser geodatabase?

b If you are prompted to sign in, use the following credentials:


• User name: adAdmin
• Password: Esri.4.GIS

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.

e If asked to restart the system, click Yes.

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).

Step 3: Create a multiuser geodatabase


To create a multiuser geodatabase, you need an authorization file. You have been provided with
an authorization file for the purposes of the exercise.

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

d Click OK to create the project.

1-21
LESSON 1

You will use this project for the remainder of the course.

e From the Analysis tab, in the Geoprocessing group, click Tools .

The Geoprocessing pane opens.

f In the Geoprocessing pane, search for create enterprise and open the Create Enterprise
Geodatabase tool.

1-22
What is a multiuser geodatabase?

g Fill in the parameters provided in the following table.

Parameter Description Value to type

Database SQL_Server
Platform

Instance Typically the host name unless more than one <Host name of
instance installed RDBMS server>

Database naperville

Operating <Check box


System cleared>
Authentication

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

Authorization Browse to the C:\_sw\_Authorization directory, 107_Server_Adv.ecp


File select the 107_Server_Adv.ecp license file, and
then click Open.

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

Your Geoprocessing pane should look similar to the following graphic.

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?

Exercise introduction 30 minutes Exercise 1B: Create a multiuser geodatabase in


Oracle
Debrief
Summarize and discuss the
purpose and results of the Complete this exercise only if you use Oracle in your
exercise. organization.

The workflow to set up and maintain an enterprise geodatabase


includes six major steps. The first step in the workflow is to create the
enterprise geodatabase, which you will do in this exercise.

Figure 1.11

Imagine that you work as a database administrator for the city of


Naperville, Illinois. You have been directed to consolidate the GIS
data used across multiple departments. You have also been asked to
integrate the GIS data with existing nonspatial data that is already in
an RDBMS. Your first step in the process is to create a multiuser
(Enterprise) geodatabase on the RDBMS server.
In this exercise, you will perform the following tasks:
• Install client software to connect to Oracle.
• Create a multiuser geodatabase.

1-27
LESSON 1

Step 1: Confirm services on the RDBMS server


First, you will connect to the RDBMS server and confirm that the necessary Windows services are
running.

a On the host PC desktop, double-click the GEODATA.rdp shortcut.

b If you are prompted to sign in, use the following credentials:


• User name: adAdmin
• Password: Esri.4.GIS

The GEODATA VM window (orange desktop) appears. The GEODATA VM will serve as your
RDBMS server in this course.

c Click the Windows Start button and type services.

d In the search results, click the Services application.

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.

g Close the Services window.

h Minimize the remote connection to the GEODATA MACHINE (orange desktop).

Step 2: Install RDBMS client software


a On the host PC desktop, double-click the EBASE.rdp shortcut.

1-28
What is a multiuser geodatabase?

b If you are prompted to sign in, use the following credentials:


• User name: adAdmin
• Password: Esri.4.GIS

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.

Confirm that client files are in the proper file location

c In the EBASE MACHINE (blue desktop), use File Explorer to browse to C:\oracle_client folder.

d Confirm that the folder contents contain the following files.

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

Confirm that the tnsnames file has been updated

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.

e In the EBASE MACHINE, use File Explorer to browse to C:\oracle_client, if necessary.

f Click the tnsnames.ora file, and then press Ctrl and click the tnsnames.ora.orig file.

g Right-click the files, point to Send To, and choose WinDiff.exe.

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.

h Close the WinDiff window.

Confirm path and system variables

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

k Next, type set tns and press Enter.

Your result should look similar to the following graphic. Verify that the TNS_ADMIN variable exists
and has the correct path (C:\oracle_client).

l Close the command prompt window.

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.

If the Create Enterprise


Geodatabase fails, you can Step 3: Create a multiuser geodatabase
recover by opening a
command prompt on the To create a multiuser geodatabase, you need an authorization file. You have been provided with
RDBMS server and typing an authorization file for the purposes of the exercise.
sqlplus system/
Esri.4.GIS@naperville. Make sure that you are working with the EBASE MACHINE (blue desktop) for this step.
Then execute the command
'drop user sde cascade;'.
a In the EBASE MACHINE, start ArcGIS Pro, and then under Blank Templates, click Catalog.
Restart any ArcGIS
applications in the EBASE
MACHINE and run the b In the Create A New Project dialog box, specify the following parameters:
Create Enterprise • Name: CourseProject
Geodatabase tool again. • Location: C:\EsriTraining\MMGD

c Click OK to create the project.

You will use this project for the remainder of the course.

d From the Analysis tab, in the Geoprocessing group, click Tools .

The Geoprocessing pane opens.

e In the Geoprocessing pane, search for create enterprise and open the Create Enterprise
Geodatabase tool.

1-32
What is a multiuser geodatabase?

f Fill in the parameters provided in the following table.

Parameter Description Value to type

Database Oracle
Platform

Instance The net service name naperville

Database Esri.4.GIS
Administrator
Password

Geodatabase "Esri.4.GIS"
Administrator
Password

Tablespace sde_repository_naperville
Name

Authorization Browse to the C:\_sw\_Authorization 107_Server_Adv.ecp


File directory, select the 107_Server_Adv.ecp
license file, and then click Open.

Make sure to enclose the geodatabase administrator password in quotation


marks as you type it in. Because you are specifying a new password that
contains a special character, Oracle expects it to be enclosed in quotation
marks.

1-33
LESSON 1

Your Geoprocessing pane should look similar to the following graphic.

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?

Exercise introduction 30 minutes Exercise 1C: Create a multiuser geodatabase in


PostgreSQL
Debrief
Summarize and discuss the
purpose and results of the Complete this exercise only if you use PostgreSQL in your
exercise. organization.

The workflow to set up and maintain an enterprise geodatabase


includes six major steps. The first step in the workflow is to create the
enterprise geodatabase, which you will do in this exercise.

Figure 1.19

Imagine that you work as a database administrator for the city of


Naperville, Illinois. You have been directed to consolidate the GIS
data used across multiple departments. You have also been asked to
integrate the GIS data with existing nonspatial data that is already in
an RDBMS. Your first step in the process is to create a multiuser
(Enterprise) geodatabase on the RDBMS server.
In this exercise, you will perform the following tasks:
• Configure the ST_GEOMETRY data type.
• Create a multiuser geodatabase.

1-37
LESSON 1

Step 1: Confirm services on the RDBMS server


First, you will connect to the RDBMS server and confirm that the necessary Windows services are
running.

a On the host PC desktop, double-click the GEODATA.rdp shortcut.

b If you are prompted to sign in, use the following credentials:


• User name: adAdmin
• Password: Esri.4.GIS

The GEODATA VM window (orange desktop) appears. The GEODATA VM will serve as your
RDBMS server in this course.

c Click the Windows Start button and type services.

d In the search results, click the Services application.

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.

This service allows clients to make connections to PostgreSQL databases.

g Close the Services window.

h Minimize the remote connection to the GEODATA MACHINE (orange desktop).

Step 2: Configure PostgreSQL server


You will begin by configuring PostgreSQL to use the ST_GEOMETRY data type.

a On the host PC desktop, double-click the EBASE.rdp shortcut.

1-38
What is a multiuser geodatabase?

b If you are prompted to sign in, use the following credentials:


• User name: adAdmin
• Password: Esri.4.GIS

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.

e Paste the st_geometry.dll file to \\geodata\C$\Program Files\PostgreSQL\11\lib.

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).

g In File Explorer, browse to C:\Program Files\PostgreSQL\11\data.

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.

h Select both the pg_hba.conf and pg_hba.conf.orig files.

i Right-click the files, point to Send To, and choose WinDiff.exe.

The color-coded lines near the top of the files will tell you which color represents the original file
(.orig extension).

j Scroll toward the bottom of the files.

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

k Close the WinDiff window.

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.

m Scroll down to the Connections And Authentication section.

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.

n Close the postgresql.conf file without saving any changes.

The PostgreSQL server machine is now configured to use the ST_GEOMETRY data type and allow
EBASE (your client machine) to connect to it.

Client connections to PostgreSQL geodatabases:

With ArcGIS 10.4 and later, client connections to PostgreSQL are built-in. Therefore, there is no
need to install or configure client connections.

Step 3: Create a multiuser geodatabase


To create a multiuser geodatabase, you need an authorization file. You have been provided with
an authorization file for the purposes of the exercise.

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

c Click OK to create the project.

You will use this project for the remainder of the course.

d From the Analysis tab, in the Geoprocessing group, click Tools .

The Geoprocessing pane opens.

e In the Geoprocessing pane, search for create enterprise and open the Create Enterprise
Geodatabase tool.

1-41
LESSON 1

f Fill in the parameters provided in the following table.

Parameter Description Value to type

Database PostgreSQL
Platform

Instance <Host name of


RDBMS server>

Database naperville

Database postgres
Administrator

Database Esri.4.GIS
Administrator
Password

Geodatabase Esri.4.GIS
Administrator
Password

Tablespace Optional <Blank>


Name

Authorization Browse to the C:\_sw\_Authorization directory, 107_Server_Adv.ecp


File select the 107_Server_Adv.ecp license file, and
then click Open.

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?

Your Geoprocessing pane should look similar to the following graphic.

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

1. What is the repository in a geodatabase?


a. A complete backup of the database
b. Information stored to track objects like feature classes and rules
c. A database log file
d. The name of the database vendor and system requirements to indicate patch levels
needed

2. Which management tools would you use to recover your geodatabase?

_____________________________________________________________________________
_____________________________________________________________________________

3. What role does ArcGIS play in the geodatabase?

_____________________________________________________________________________
_____________________________________________________________________________

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

Answers to Lesson 1 questions

Identifying the appropriate software tier (page 1-5)


1. A user will be editing data and wants to take advantage of domains that have been applied
to various fields.
ArcGIS client

2. The administrator must create a backup of the geodatabase.


RDBMS

3. The administrator must create a feature class in the geodatabase.


ArcGIS client

4. The utilities department has decided to create a geometric network to represent the sewer
system.
ArcGIS client

Exercise 1A: Create a multiuser geodatabase in SQL Server (page 1-19)


1. Based on what you see under Messages, what did the tool do?
• Checked privileges
• Created a database
• Created an administrator user
• Validated the authorization file
• Verified that XML support is enabled
• Created geodatabase tables, stored procedures, and schema

1-46
What is a multiuser geodatabase?

Exercise 1B: Create a multiuser geodatabase in Oracle (page 1-27)


1. Based on what you see under Messages, what did the tool do? (Ignore the warning
message for now; it will be revisited later.)
• Checked privileges
• Created a database
• Created an administrator user
• Validated the authorization file
• Verified that XML support is enabled
• Created repository

Exercise 1C: Create a multiuser geodatabase in PostgreSQL (page 1-37)


1. Based on what you see under Messages, what did the tool do?
• Checked privileges
• Created a database
• Created an administrator user
• Validated the authorization file
• Verified that XML support is enabled
• Created geodatabase tables, stored procedures, and schema

1-47
Instructor page
Instructor page

Total lesson length:


60 minutes
Lesson 2
Instruction: 25 minutes Connecting to the geodatabase
Exercise: 35 minutes
Author lesson story
After creating a multiuser geodatabase, you must connect to it before managing or using it.
In the previous lesson, students installed the relevant RDBMS client software on the client
machine to support connections to their chosen RDBMS. In this lesson, they will familiarize
themselves with the parameters necessary to establish a connection. Connections can be created
using the Catalog pane or a geoprocessing tool. After connections exist, you can show the
students where the connection files were created so that they can be distributed to users (or other
applications) as necessary.

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

• Connecting to the RDBMS


• Authentication methods
• Software version compatibility
• Distributing connection files

Learning objectives Learning objectives

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.

In client connections, the ArcGIS client interacts directly with the


RDBMS to query the geodatabase without any other software in the
middle.
The maker of the RDBMS creates the RDBMS client software, which
allows a user to connect to a database and execute SQL statements
against that database. You must install the appropriate client software
for your RDBMS. ArcGIS uses the client software to make the
connection to the geodatabase.

2-2
Connecting to the geodatabase

Demo 2A: Create a Create a connection


connection
(See script page D-6)
The Database Connection dialog box in ArcGIS Pro
5 minutes allows you to create direct connections to databases and
geodatabases. It appears differently based on the
Purpose RDBMS you choose. The connection file is initially stored
in your ArcGIS Pro project folder.
To explore the interface for
creating a direct
connection. You can copy and paste connection files to alternate folders using the
Data Catalog pane.

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

Database The RDBMS in which your geodatabase is stored.


Platform

Instance SQL Server: <hostname> for the default instance


and port OR <hostname>\<instance> for named
instance
Oracle: <Oracle Net Service Name> OR
<hostname>:<port>/<DB Service Name>
PostgreSQL: <hostname> for default port OR
<hostname>,<port>
for non-standard port

Authentication OS or database authentication. The default value is


Type OS for SQL Server and database for Oracle and
PostgreSQL. You must supply a user name and
password if you choose database authentication.

Database The name of the database you want to connect to.


Oracle: Not applicable

Connecting to a specific geodatabase version


The Database Connection dialog box, accessed through the Catalog
pane, always connects to the default version. But after creating the

2-3
LESSON 2

connection, you can modify the Geodatabase Connection Properties


and choose a transactional or historical version.

Esri Training course: Archiving Data in a Multiuser


Geodatabase

The Create Database Connection tool allows you to


create database and geodatabase connections. It takes
the same parameters as the Database Connection dialog
box, but it also allows you to specify a version to connect
to.

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.

Software upgrades and functionality


If the geodatabase and client are of the same software version, clients
will have all the functionality available for that software version of the
geodatabase. However, if the client is accessing a geodatabase of a
newer software version, then there may be limited or no support for
datasets with newer functionality. For example, a 10.0 client cannot
access the updated functionality for mosaic datasets, network
datasets, and parcel fabrics in a 10.1 geodatabase, but all other
functionality is supported.

2-5
LESSON 2

This support allows organizations to have more flexibility when


planning upgrade strategies for their geodatabases and client
software.

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

To prompt users for their credentials before accessing the


database (database authentication only), clear the Save The
User Name And Password Before Distributing Connection Files
check box.

2-8
Connecting to the geodatabase

GIS resources and connection information


Be aware that other GIS resources, such as projects and layer files, can
also embed connection information, just as connection files do. When
a user's credentials are saved in a connection file, any project or layer
file that uses the connection will also save the user's credentials. Any
users who use the connection or resource will access the data using
the saved credentials, not their own.

2-9
Connecting to the geodatabase

Exercise introduction 35 minutes Exercise 2: Configure connections to a multiuser


geodatabase
In this exercise, students
will create a connection to In this exercise, you will connect to the geodatabase.
their multiuser geodatabase
using two different Figure 2.5

methods. The connection step of


the geodatabase
workflow.
Debrief
Summarize and discuss the
purpose and results of the
exercise.

You can use these connections to do everything from viewing data to


administering the geodatabase. There are two ways to connect to a
geodatabase: interactively (such as by using the Catalog pane) and
geoprocessing tools.
In this exercise, you will perform the following tasks:
• Create a connection using the Catalog pane.
• Create a connection using a geoprocessing tool.
• Manage connections.

2-11
LESSON 2

If you were to view the


connection properties to a Step 1: Create a connection using the Catalog pane
connection to an Oracle
geodatabase, you would You will start by creating a client connection to the multiuser geodatabase that you created
notice that the instance earlier.
name reverted to the old
direct connection syntax Remember that the prerequisite for creating a connection is installing the RDBMS client software
that references Oracle 11g. that you can download from the My Esri site. You have already installed the client software for
While this is incorrect, it your particular RDBMS, so the next step is to create the connection.
does not adversely affect
the connection
a In the EBASE MACHINE (blue desktop), start ArcGIS Pro and restore the course project.
(NIM085231).

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.

SQL Server users


• Database Platform: SQL Server
• Instance: <RDBMS server name>
• Authentication Type: Database Authentication
• User Name: sde
• Password: Esri.4.GIS
• Database: naperville

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

Your dialog box should look like the following graphic.

Oracle users
• Database Platform: Oracle
• Instance: naperville (net service name)
• Authentication Type: Database Authentication
• User Name: sde
• Password: Esri.4.GIS

Your dialog box should look like the following graphic.

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

Your dialog box should look like the following graphic.

All RDBMS users

d Rename the connection Naperville_SDE.

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.

Step 2: Manage active connections


Now that you have a connection to your RDBMS, you will view the active connection information.

a In the Catalog pane, right-click your connection and choose Properties.

2-14
Connecting to the geodatabase

b Click Connections to expand the section.

As a geodatabase administrator, you can prevent new connections to the geodatabase by


unchecking the Geodatabase Is Accepting Connections check box.

c Click Show Connected Users And Locks.

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.

Step 3: Connect to a specific version


Versioning is one of the fundamental benefits of a multiuser geodatabase. Connections can be
modified to connect to different versions, both transactional and historical. ArcGIS Pro also allows
connections using branch versioning, which facilitates the WebGIS model by allowing multiuser
editing scenarios and long transactions through feature services.

For more information regarding versions, refer to the following resources:


• ArcGIS Desktop Help: An overview of versioning
• Esri Training: In a web browser, go to https://www.esri.com/training/catalog/search, and
then in the Search Courses field, type versioning and press Enter.

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.

b Close the Geodatabase Connection Properties dialog box.

Step 4: Create a folder connection


Before you create a connection using a geoprocessing tool, you will create a folder to store
connection files that you intend to distribute to other users.

2-16
Connecting to the geodatabase

a From the Insert tab, in the Project group, click Add Folder .

b Browse to your C: drive, click New Item, and choose Folder.

c Type muGDB_connections to rename the new folder and press Enter.

d Click the muGDB_connections folder once to select it, if necessary.

e Click OK.

f In the Catalog pane, expand Folders, if necessary.

The muGDB_connections folder now appears in the Catalog pane in the list of folder connections.

Step 5: Create a connection using a geoprocessing tool


Now you are ready to use a geoprocessing tool to create a connection.

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.

b From the list of possible tools, click Create Database Connection.

c In the Create Database Connection tool, click the Help button .

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.

e For Connection File Name, type <RDBMS>_Naperville_SDE.

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.

Step 6: Manage connection files


The connection file that you created with the Create Database Connection tool was explicitly
directed to C:\muGDB_connections. By contrast, the Naperville_SDE.sde connection file that you
created directly in the Catalog pane was automatically saved in the project folder.

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.

For database-authenticated connections, user credentials are saved by default


in ArcGIS Pro projects. If such a project was shared with another user, that user
would be logged in to the database with the saved credentials.

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.

d Under Folders, right-click the muGDB_connections folder and choose Paste.

e Rename the pasted connection file to published_connection.

f Exit ArcGIS Pro and choose to save changes.

Step 7: (Optional) Remove Oracle APEX tables


Oracle users only

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 connect the user as the sysdba.

b Type drop user apex_040000 cascade; and press Enter.

This action will remove the apex tables, and it may take some time to complete.

c Type drop user hr cascade; and press Enter.

2-20
Connecting to the geodatabase

The hr tables refer to Human Resources sample schema.

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. An ArcGIS 10.7 client can connect to a 10.2 geodatabase.


a. True
b. False

2-22
Instructor page

Total lesson length:


90 minutes
Lesson 3
Instruction: 60 minutes Loading data into the geodatabase
Exercise: 30 minutes
Author lesson story
Now that students have created a geodatabase and connected to it, they are ready to load data.
Several settings and workflows within ArcGIS and the RDBMS can improve the data-loading
process, making it faster and more successful. The rest of the course focuses on either
modifications to the data-loading process or workflows applied to data after it is loaded. This
lesson explores the data owner account, RDBMS settings, ArcGIS settings, and tools and
workflows associated with loading data in the geodatabase.
Loading data into the geodatabase

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

• Data owner user account


• Geoprocessing environment settings
• RDBMS settings
• Data-loading tools and workflows
• Automation

Learning objectives Learning objectives

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

Data owner account


Data owner account
The most important part of The user account that is used to load data into the geodatabase,
this slide is to explain why a maintain that data, and assign user privileges is called the data owner.
headless data owner user is The data owner is responsible for various data management tasks and
important. has broader privileges than other database users have.

Figure 3.1
Data owner
responsibilities.

Because the data owner is responsible for several important


maintenance tasks, it is best to create a headless user account (one
not assigned to a particular person) to serve as the data owner. This
type of account gives several people the ability to perform
management tasks. You can also pass credentials from person to
person as staffing issues require.

3-2
Loading data into the geodatabase

Headless user accounts are valuable when the responsible person is


unavailable. Imagine, for example, that John Smith owns the data. If
the user account were assigned only to him and he left the company,
no one would be able to maintain the data. But if he loaded the data
using a headless account, he could pass the credentials to the new
data manager before leaving.

SQL Server and Oracle have the option of using only OS


authentication, which can make a headless account
impractical. Alternatively, you could map an OS user
login to a database user in SQL Server and Oracle,
allowing you to log in with OS credentials but keep your
data owned by a headless entity. Then, if the person
responsible for data ownership changes, you can alter the
mapping.

Creating a data owner account

The database administrator creates the geodatabase data owner in


the same way as any other geodatabase user. The Create Database
The database
User tool grants to the data owner the privileges that are required in
administrator must create
the RDBMS to create geodatabase objects. By using this tool, the
a user in the database
database administrator does not need to look up the required
before the data owner can
privileges as described in the ArcGIS Help nor use RDBMS tools to
grant that user privileges
grant the specific privileges in the database.
to use data.

Figure 3.2
Creating a data owner
User and object creation.
account

3-3
LESSON 3

Demo 3A: Create the Create the data owner account


data owner account
(See script page D-7)
You can use the Create Database User tool to create
5 minutes users in your database without using RDBMS tools. To
create users, you must use a connection to the database
Purpose that uses database administrator credentials.

To create a data owner user


account using the Create Table 3.1
Database User tool. Parameter Description
Data
Input A connection file for the database in which you want
None
Database to create a user. The connection must use database
Connection administrator credentials.

Create SQL Server and Oracle only


Operating Option to add an OS user to the database. The user
System must already exist in the Operating System or
Authenticated Windows Domain.
User

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.

Tablespace Oracle and PostgreSQL only


Name The default tablespace for the user, new or existing.
If you leave it blank, the user's default tablespace will
be used.

3-4
Loading data into the geodatabase

The tool gives different user-specific privileges in each RDBMS.

• Create procedure
• Create view
• Create table

• Create session
• Create sequence
• Create trigger
• Create view
• Create table

• Use on sde schema


• Access public.geometry_columns and
public.spatial_ref_systable if PostGIS is installed
• Authorize on the user's own schema
• Use on all other schemas that contain data that data
creators must access

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.

Logging Disable transaction logging to accelerate the


data-loading operation.

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

Geographic The geographic transformation that is applied if the


Transformations output is reprojected and requires a different
geographic coordinate system

Output The keyword used when creating a dataset in a


CONFIG geodatabase used to specify storage parameters
Keyword

3-7
LESSON 3

Activity 3A: Choosing a data-loading tool


Choosing a
You can use various tools to load data into your geodatabase. The
data-loading tool
appropriate tool depends on several factors.

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.

The Truncate Table tool removes all rows from a


database table or feature class using truncate
procedures in the database. The operation is faster than
row-by-row deletion.

The Truncate Table tool has the following qualities:


• Takes a single parameter: the input table
• Must be run by the owner of the data
• Does not support complex or versioned data
Think about the steps that would be required if you had to regularly
delete and replace datasets in your geodatabase.

1. Why would you update a dataset rather than deleting it and


creating a new one?

____________________________________________________________
____________________________________________________________

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

Demo 3B: Use Use ModelBuilder


ModelBuilder ArcGIS Pro Help: What is
ModelBuilder allows you to create models—workflows that chain
(See script page D-8) ModelBuilder? and Create
tools together and accept user input for parameters. Models can be
a model tool
10 minutes used just as geoprocessing tools, such as ArcGIS applications, Python
scripts, and other models, are used. ModelBuilder is graphical in
Purpose nature. You can easily create, edit, and manage your workflows
without writing code.
To highlight an example of
how ModelBuilder can be Figure 3.7
used to automate data A model for bulk loading
loading. multiple feature classes.
Data
Shapefiles located in demo\
ModelBuilder and a
demonstration enterprise
geodatabase with a data
owner account.
You must create models inside a custom toolbox in one of two ways:

• Right-click the custom toolbox and choose to create a model.


• Use ModelBuilder to create a model and save it to a custom
Toolboxes can be stored
toolbox.
in a file system folder or a
geodatabase. You can run models from the ModelBuilder view or from the Catalog
pane and toolbox as with any other tool.
Models can contain the following elements.

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

using ovals in different shades of blue and green based on whether


they are data or value variables and inputs or outputs of a tool. It is
important to note that output variables from a tool are often reused
as input for another tool.

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

Exercise introduction 30 minutes Exercise 3: Load data into the geodatabase


This lesson assumes that In this exercise, you will explore the tools, users, and settings involved
students can run a in data loading.
data-loading tool
Figure 3.8
independently with no
The loading data step.
direction for locating it or
setting parameters.
Students with less
experience might need
additional help. You may
also want to do a short
demonstration to explain
that creating the DB user
must be done with the
In this exercise, you will perform the following tasks:
RDBMS DBA credentials,
but the remainder of the • Create a data owner account.
exercise is done with the • Load new datasets into the geodatabase.
data owner credentials. • Update datasets using a model.

Debrief
Summarize and discuss the
purpose and results of the
exercise.

3-13
LESSON 3

Step 1: Create the data owner account and connection


The user who owns datasets in the geodatabase has many management responsibilities. To make
sure that those management tasks can still be performed if staffing changes, you will create a
headless user account to own all GIS data. To add the new user account in the RDBMS, you must
have access to the database administrator's credentials.

You will now create the database administrator connection.

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.

d Rename the connection Naperville_Admin.

1. Why are you connecting using the database administrator's credentials?

_____________________________________________________________________________

Now you will create the data owner account.

3-14
Loading data into the geodatabase

e In the Geoprocessing pane, search for and open the Create Database User tool.

f In the Create Database User tool, set the following parameters:


• Input Database Connection: Naperville_Admin
• Create Operating System Authenticated User: <Cleared check box>
• Database User: gisowner
• Database User Password: Esri.4.GIS

PostgreSQL users will not see the Create Operating System Authenticated User check box.

Your Geoprocessing pane should look similar to the following graphic.

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.

Now you will create the data owner connection.

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.

Now you are ready to load data.

3-15
LESSON 3

Step 2: Load multiple datasets into a geodatabase


You will load datasets into your geodatabase using several tools. First, you will export multiple
shapefiles to your geodatabase using your data owner account.

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.

d From the Catalog pane, select only the following shapefiles:


• FEMAFloodZone.shp
• LandUseCurrent.shp
• ZoningDistrict.shp
Hint: Press and hold Ctrl, and then click each one.

3-16
Loading data into the geodatabase

e Right-click the selected shapefiles, point to Export, and choose Feature Class(es) To
Geodatabase.

The Feature Class To Geodatabase tool opens in the Geoprocessing pane.

f For Output Geodatabase, browse to and add the Naperville_GISowner connection.

g Click Run.

It may take a few minutes to export the datasets to the geodatabase.

h Close the Geoprocessing pane.

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

Step 3: Append data into a single feature class


Now you will combine two input feature classes into one output feature class.

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.

2. How might you accomplish this task?

_____________________________________________________________________________

a Search for and open the Create Feature Class tool.

b For Feature Class Location, browse to and add the Naperville_GISowner connection.

c For Feature Class Name, type LandUsePlanned.

d For Geometry Type, confirm that Polygon is selected.

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.

h In the Import Coordinate System dialog box, browse to the ..\EsriTraining\MMGD\Database\


LandUsePlanning folder, select one of the LandUsePlanned shapefiles, and click OK.

3-18
Loading data into the geodatabase

i Click OK to close the Coordinate System dialog box.

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.

Step 4: Load data by importing an XML workspace document


Now you will load the sewer and storm water network into the geodatabase by importing an XML
workspace document.

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.

d When finished, view the SewerStormwater feature dataset in the geodatabase.

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.

e Right-click the Naperville_GISowner connection, point to Import, and choose Feature


Class(es).

f For Input Features, browse to the ..\MMGD\Database\Elections folder, select both shapefiles,
and click OK.

g Click Run to import the shapefiles into the geodatabase.

3-21
LESSON 3

h Your Naperville_GISowner connection should look similar to the following graphic:

i If any datasets are missing, load them into the geodatabase using the skills that you have
learned.

Step 5: Update datasets


Occasionally, you will receive new versions of datasets from outside sources, such as new flood
zones from FEMA. When you receive these updates, you must replace the contents of the existing
datasets with the new data by truncating the table and then appending the new records into it.
You will update data often enough that you have decided to create a model to automate the
process.

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.

b Right-click the toolbox, point to New, and choose Model.

c From the ModelBuilder tab, in the Model group, click Properties.

d Name the model UpdateDataset and label it Update Dataset.

e Click OK to close the Tool Properties dialog box.

f From the ModelBuilder tab, in the Model group, click Save.

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.

j In the menu that appears, choose Target Dataset.

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 .

o Verify that your model is similar to the following graphic.

p Double-click the Append tool to open it.

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.

r Save and close the model view.

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

u Click Run to run the model.

v In the bottom-right corner of the map view, click the Refresh button to see the updated
FEMAFloodZone feature class.

4. Did anything change after clicking Refresh? If so, what?

_____________________________________________________________________________

w Close the map view.

x Exit ArcGIS Pro and choose to save changes.

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?

_____________________________________________________________________________
_____________________________________________________________________________

2. Why should the data owner account be a headless user?

_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________

3. Why is the Truncate Table tool the fastest way to empty an existing feature class?

_____________________________________________________________________________
_____________________________________________________________________________

3-26
Loading data into the geodatabase

Answers to Lesson 3 questions

Choosing a data-loading tool (page 3-8)


1. Fill in the table with information about the data-loading tools.

Conversion Simple Data Append


Tools Loader

Description Convert Loads more Loads more


datasets data into an data into an
between existing existing
formats using dataset using dataset using a
import and the load GP tool
export options option in the
Catalog pane

Best use Converting Quickly Loading data


case formats loading data into existing
without into simple datasets with
combining datasets automation
datasets

Limitations Each input No complex Must have an


becomes a datasets existing
separate feature class to
output load into

Automation? Yes No Yes

Updating datasets (page 3-9)


1. Why would you update a dataset rather than deleting it and creating a new one?
Much of the functionality is defined based on the dataset, such as geodatabase
behavior and privileges, that would have to be recreated and applied to the new
dataset.

3-27
LESSON 3

Exercise 3: Load data into the geodatabase (page 3-13)


1. Why are you connecting using the database administrator's credentials?
Database administrator access is required to create user accounts.

2. How might you accomplish this task?


Create the LandUsePlanned feature class and use the Simple Data Loader to load both
feature classes into it.

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

4. Did anything change after clicking Refresh? If so, what?


Yes, there is a large triangular flood zone in northwest Naperville.

3-28
Instructor page

Total lesson length:


90 minutes
Lesson 4
Instruction: 60 minutes Configuring privileges
Exercise: 30 minutes
Author lesson story
Now that students have loaded data into the geodatabase, they can set privileges to allow access
to it.
Privileges are used to grant read or write capability to data in the geodatabase. Authentication
and authorization are handled by the RDBMS, but conceptually, privileges work the same in all
RDBMSs. This lesson will explore types of users, roles for groups of users, and tools for creating
users and roles and assigning privileges.
Configuring privileges

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

• OS and database users


• Roles
• Applying privileges
• Securing credentials

Learning objectives Learning objectives

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

Creating data users


Creating data users
Continue the discussion Remember that the database administrator creates all users, including
from the earlier lesson the data user. Data users require at least the read privilege to view
about how only the DBA geodatabase objects, and they may also require the write privilege if
can create data owners. they must edit them.
Geodatabase users are no
Figure 4.2
different. They must be
Allowing data users to
created by the DBA before
access data.
the data owner can grant
privileges to the data.

With OS authentication, your user name and password for logging on


to the computer are passed to ArcGIS and used to connect to the
database. OS users are created and stored in the computer's
operating system or the domain.
When using database authentication, users log on to the
geodatabase with a user account known only by the RDBMS, not the
operating system. This type of authentication requires that users
supply an additional user name and password in ArcGIS to create the
connection. User accounts are created and stored in the RDBMS.

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

Elections staff Maintain Polling_Places, Read and write


members Voting_Precincts, and (Select, Insert,
Election_Districts feature Update, and
classes Delete)

County Use Polling_Places, Read (Select)


commissioners Voting_Precincts, and
Election_Districts feature
classes

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.

Using roles makes maintaining privileges much easier—simply define


roles, place people in them, and then give those roles privileges to
appropriate datasets. By granting access to the role, everyone in the
role has access. As personnel and responsibilities change, you can
add and remove people from roles to grant or revoke privileges.

4-5
LESSON 4

Demo 4A: Manage Manage users


users
(See script page D-12) Creating users
20 minutes
You can use the Create Database User tool to create
Purpose users in your database or add OS users to the database
To assign privileges to users without using RDBMS tools. You must use a connection
and roles you create. to the database that uses database administrator
Because students have credentials.
already used the Create
Database User tool, have
Table 4.2
them tell you how to use it. Parameter Description
Data
File names of Input Database A connection file for the database in which you
demonstration data (for Connection want to create a user. The connection must use
example, CraterLake.gdb) database administrator credentials.

Create SQL Server and Oracle only


Operating Option to add an already-existing OS user to the
System database.
Authenticated
User

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.

Tablespace Oracle only


Name The default tablespace for the user, new or existing.
If blank, the Oracle user's default tablespace will be
used.

Geoprocessing or RDBMS tools?


ArcGIS Pro Help: Create You can create users with geoprocessing tools or RDBMS tools. The
Database User geoprocessing tool makes creating a user quick and easy, but it does
use default settings that you may want to adjust.

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

The Create Role tool is used to create roles in the


RDBMS. It can also be used to manage roles, granting
the role to or revoking the role from a user. To run the
Create Role tool, you must use a connection to the
database that uses database administrator credentials.

Table 4.3
Parameter Description

Input Database Connection file to the geodatabase using the


Connection DBA user credentials

Role Name for a new role or an existing role to


manage

Grant To Or Choice to either grant privileges to or revoke


Revoke From privileges from the specified list of users
User(s)

User Name(s) Optional


Comma-separated list of users to add or remove
from the role

4-7
LESSON 4

Assigning privileges

The Privileges dialog box is used to add users or roles to


a dataset and set select, insert, update, and/or delete
privileges for the user or role.

To grant privileges, connect to the database as the


dataset owner.

To access the Privileges dialog box, right-click the


dataset, point to Manage, and choose 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

Manage the Read and write on sewer network Water


sewer network feature dataset management
editor

Use the sewer Read on sewer network feature Water


network dataset management
viewer

Maintain the Read and write on flood zone, land Planning


planning use, and zoning feature classes editor
layers

Use the Read on flood zone, land use, and Planning


planning zoning feature classes viewer
layers

4-9
LESSON 4

Activity 4A: Designing Designing roles


roles
Roles are the easiest way to manage privileges in your geodatabase.
To set up roles, you must determine how to divide your users into
15 minutes roles and what each role needs access to.
In the following table, identify and record the general category of
Purpose users and the datasets that they need access to (include R or R/W
Have students focus on access). Then group those users into roles that you would use to
these basic questions: manage privileges.
• Who are the users?
• What data do they need 1. Scenario: A local government is consolidating public safety data
to access? into a centralized geodatabase for ease of access. Fire and rescue,
• What privileges do they police, and dispatch personnel will all use the geodatabase. The
need? datasets include fire districts and stations, police districts and
stations, live tracking of fire and police units (two separate feature
From this information,
classes), crime levels, hospitals, and basemap layers, such as roads,
specify the roles.
lots, and water.
Debrief
After students have
designed their role
Users Data and Privileges Role
strategies and recorded
them in the workbook,
choose a volunteer that
used the sample scenario.
Discuss his or her answer
and record it on the board
or in the note pad. Then
ask for a couple of
volunteers who created
roles for their own
organization, and discuss
them.

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

Exercise introduction 30 minutes Exercise 4: Configure privileges for data use


In the Naperville government, several departments must access the
Debrief geodatabase but only to read or edit some of its data. You will create
Summarize and discuss the roles for each department, assign users to roles, and apply privileges
purpose and results of the to feature classes to ensure that users can access only the data that
exercise. they need.

Figure 4.5
The privileges step.

In this exercise, you will perform the following tasks:


• Create roles and users.
• Apply privileges.

4-13
LESSON 4

Step 1: Create roles


Before you begin creating users and roles and applying privileges, you must consider a role
strategy. Assume that the geodatabase administrator determined the roles and necessary
privileges based on user requirements. The results are shown in the following table.

a Review the roles and the required privileges in the table.

Role Privileges

WaterManagement • SewerStormwater feature dataset (View/Edit)


• FEMAFloodZone (View)
• LandUseCurrent (View)
• LandUsePlanned (View)
• ZoningDistrict (View)

Planning • LandUseCurrent (View/Edit)


• LandUsePlanned (View/Edit)
• ZoningDistrict (View/Edit)
• FEMAFloodZone (View)

Elections • PollingPlaces (View/Edit)


• StateSenateDistrict (View/Edit)

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.

c Search for and open the Create Role tool.

d For Input Database Connection, browse to your Naperville_Admin connection.

4-14
Configuring privileges

e For Role, type WaterManagement.

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.

Step 2: Create users


Next, you will create three users, one in each role, by using the Create Database User tool. To
expedite this process, you will use a ModelBuilder model. The ability of geoprocessing tools to be
used in models and Python scripts can be an advantage when creating or using automated tasks.

a In the Catalog pane, expand the MMGD and Privileges folders, and then expand the
Privileges toolbox.

b Right-click the Create Users model and choose Edit.

This model creates three new database users and assigns each to a role.

Database User Password Role

pat Esri.4.GIS WaterManagement

kim Esri.4.GIS Planning

sam Esri.4.GIS Elections

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.

d Close the Create Database User Pat dialog box.

e Close the Create Users model view.

f If you are prompted to save changes to the model, click No.

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.

i For User Password, type Esri.4.GIS.


Hint: Oracle users: Remember to enclose the new password in quotation marks.

j Click Run.

4-16
Configuring privileges

Three new database users have been created and added to the appropriate role.

Step 3: Apply privileges


You are now ready to apply privileges to feature classes.

1. Which user account can set up privileges on a feature class in the Naperville geodatabase?

_____________________________________________________________________________

a Search for and open the Change Privileges tool.

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.

Be sure to use the Naperville_GISowner connection, as this is the data owner.

2. Which role should be added to the SewerStormwater feature dataset?

_____________________________________________________________________________

c For User, type WaterManagement.

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

We use the geoprocessing


tool instead of the f Click Run to apply the privileges.
Privileges dialog box to
grant privileges due to g Use the following table to set up privileges for the remaining feature classes in the
BUG-000115301. However, geodatabase.
this can be a good point to
mention that
Feature class Role and access level
geoprocessing tools can be
used for automation.
FEMAFloodZone • WaterManagement (View)
• Planning (View)

LandUseCurrent • WaterManagement (View)


• Planning (View/Edit)

LandUsePlanned • WaterManagement (View)


• Planning (View/Edit)

PollingPlaces • Elections (View/Edit)

StateSenateDistrict • Elections (View/Edit)

ZoningDistrict • WaterManagement (View)


• Planning (View/Edit)

h In the Catalog pane, expand the Naperville_GISowner connection, if necessary.

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.

j Close the Privileges dialog box.

Step 4: Test privileges


a Using Pat's credentials, create a connection to the Naperville database called Naperville_Pat.

3. Which data can Pat see?

_____________________________________________________________________________

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.

c Exit ArcGIS Pro and choose to save changes.

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

1. What are roles used for?

_____________________________________________________________________________
_____________________________________________________________________________

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

Answers to Lesson 4 questions

Designing roles (page 4-10)


1. Scenario: A local government is consolidating public safety data into a centralized
geodatabase for ease of access. Fire and rescue, police, and dispatch personnel will all use
the geodatabase. The datasets include fire districts and stations, police districts and
stations, live tracking of fire and police units (two separate feature classes), crime levels,
hospitals, and basemap layers, such as roads, lots, and water.

Users Data and privileges Role

Firefighters • FireDistricts, R/W Fire_Rescue


Fire command • FireStations, R/W
Rescue teams • LiveTrackingFRUnits, R/W
• Hospitals, R
• Basemap layers, R

Police officers • PoliceDistricts, R/W Police


Police command • PoliceStations, R/W
• LiveTrackingPUnits, R/W
• CrimeLevels, R/W
• Basemap layers, R

Emergency dispatch operators • FireDistricts, R Dispatch


• PoliceDistricts, R
• FireStations, R
• PoliceStations, R
• LiveTrackingFRUnits, R
• LiveTrackingPUnits, R
• Hospitals, R
• Basemap layers, R

Exercise 4: Configure privileges for data use (page 4-13)


1. Which user account can set up privileges on a feature class in the Naperville geodatabase?
The data owner (gisowner)

4-21
LESSON 4

2. Which role should be added to the SewerStormwater feature dataset?


WaterManagement

3. Which data can Pat see?


The SewerStormwater feature dataset and the FEMAFloodZone, LandUseCurrent,
LandUsePlanned, and ZoningDistrict feature classes

4-22
Instructor page

Total lesson length:


60 minutes
Lesson 5
Instruction: 35 minutes Managing storage
Exercise: 25 minutes
Author lesson story
Data in the geodatabase relies on the underlying storage mechanisms of the RDBMS.
Configuration keywords can help you configure exactly how the data is stored.
ArcGIS uses configuration parameters when creating tables and indexes in the RDBMS.
Configuration keywords stored in the DBTUNE table allow for the storage of groups of
configuration parameters to make them easy to select and use. You can update parameters in
keywords or add new keywords with custom specific values for parameters. This lesson explores
creating and customizing keywords to control the way that database objects like tables and
indexes are created in the RDBMS when data is loaded.
Scope of discussion
This lesson is a high-level view of DBTUNE and configuration parameters. The goal is for students
to understand what DBTUNE is, how to modify it, and where (in Help) to look for information
about their RDBMS configuration parameters. Try not to delve deeply into individual parameters.
If a student asks about one, discuss it during a class break, if possible.
Managing storage

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

Learning objectives Learning objectives

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.

When ArcGIS creates objects in the geodatabase, it must tell the


database how to store them—whether they are tables, indexes, or
ArcGIS Pro Help:
even raster or text attributes—as well as spatial data. To do so, ArcGIS
<RDBMS> configuration
uses configuration parameters that modify the SQL statements used
parameters
to create these objects. You can customize storage by setting
configuration parameters.
Configuration parameters can control where a table or index is stored
in the database (which Oracle or PostgreSQL tablespace or SQL
Server file group), how densely to pack indexes, whether to use
unicode character encoding, and which spatial type to use to store
features.
Many configuration parameters are available, but they differ based on
the RDBMS.

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.

ArcGIS provides several predefined keywords, including the


DEFAULTS keyword. The DEFAULTS keyword gives you default values
ArcGIS Desktop Help:
for all configuration parameters for your RDBMS. ArcGIS uses the
Configuration keywords
DEFAULTS keyword when creating datasets in the geodatabase.
for enterprise
Situations may arise in which you want to modify one or more of the
geodatabases
existing parameters associated with the DEFAULTS keyword.
Other configuration
keywords can be created
using the appropriate
keyword syntax.

5-3
LESSON 5

Figure 5.3
Configuration
A non-default predefined
keywords (continued)
keyword.

ArcGIS also provides predefined keywords for common non-default


configurations. For example, in SQL Server there is a keyword for
using the geography spatial type rather than the default geometry
type. Non-default predefined keywords typically have only a few
configuration parameters set—only those that have different values
from what DEFAULTS has. ArcGIS will use the values from DEFAULTS
for all parameters that are not specified in a named keyword.

Custom

Figure 5.4
An example of a custom
keyword.

5-4
Managing storage

Figure 5.5
A custom keyword called
READ_ONLY.

You can also create your own keywords to provide a custom


configuration suited to your needs. An example would be a keyword
After a configuration
that specifies not using unicode character encoding. You could use a
keyword has been used to
custom keyword when you are loading read-only data (for example,
load a dataset, it cannot
##READ_ONLY). You may want to set the B_INDEX_ROWID
be altered.
parameter with a custom FILLFACTOR = 100. For read-only data, it
would make sense to use a higher FILLFACTOR because the data will
not be edited.

5-5
LESSON 5

Supported spatial types


Supported spatial types differ by RDBMS, including which spatial type
is the default (marked with a "D" in the following table).

Table 5.1
Supported spatial types in
SQL Server, Oracle, and
PostgreSQL.

Esri ST_Geometry

Esri SDE Binary

SQL Server Geometry

SQL Server Geography

Oracle Spatial

PostGIS Geometry

Esri ST_Geometry is a user-defined data type that allows for defining


columns that store spatial data in your business tables. ST_Geometry
The ArcGIS Desktop Help
is the default spatial type for Oracle and PostgreSQL geodatabases.
provides documentation
for all supported spatial Esri SDE Binary uses a binary mechanism for storing geometry. The
types, including geometry is compressed by the client and passed to the database for
preconfiguration storage, meaning that the client must know how to compress and
requirements. decompress the geometry. SDE Binary also uses multiple tables to
store the feature class information, including the business table for
attributes, the feature table for geometry, and a spatial index table.
The client must be aware of all these tables. SDE Binary is an older
format that was used extensively in SQL Server and Oracle, but it is
no longer the default spatial type in any RDBMS. SDE Binary is still a
great choice for storing features that have many vertices, such as
coastline data.
SQL Server Geometry is similar to existing GIS spatial types in that it
stores coordinates in an arbitrary plane, allowing for both geographic

5-6
Managing storage

and projected coordinate systems. The geometry is stored in a


column in the business table. SQL Server comes standard with two
spatial types, so no additional installation is necessary. This is the
default spatial type for geodatabases in SQL Server.
SQL Server Geography is similar to SQL Server Geometry, but it can
store coordinates only in geographic coordinate systems using
latitude and longitude. Using the Geography type gives you access to
SQL functions that calculate distance and area on a curved surface.
Oracle Spatial is an optional feature of the Oracle Database
Enterprise Edition that uses the SDO_Geometry type to store
geographic information as a column in the business table. The
SDO_Geometry type can also be used with Oracle Locator, which is a
standard feature of Oracle Database Standard and Enterprise editions
and a subset of Oracle Spatial. In addition to the SDO_Geometry
type, Oracle Spatial and Oracle Locator provide geospatial
capabilities and an SQL API. ArcGIS is capable of reading and
creating feature classes that use SDO_Geometry for their storage
mechanism.
PostGIS Geometry is a spatial type that PostGIS adds to PostgreSQL
using OGC well-known text or binary specifications for representing
geometry. ArcGIS supports the Geometry type but not the
Geography type. Geometry is stored in a column in the business
table. PostGIS is an additional installation that you must perform after
installing PostgreSQL, which creates a PostGIS template database
that you must use to create a database to use as your geodatabase.
Using PostGIS requires you to manually create your database.

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).

DEFAULTS GEOMETRY_STORAGE GEOMETRY

DEFAULTS UNICODE_STRING TRUE

GEOGRAPHY GEOMETRY_STORAGE GEOGRAPHY

GEOGRAPHY UI_TEXT Geography

READ_ONLY B_INDEX_ROWID WITH FILLFACTOR = 100

READ_ONLY UI_TEXT Read-Only Data

When ArcGIS creates a dataset, it retrieves all parameters for the


keyword that you indicate (and additional parameters from DEFAULTS
ArcGIS Pro Help:
if the keyword you indicate does not specify them) and uses them to
Configuration
define the objects in the RDBMS.
keywords-Manage
geodatabases in
<RDBMS> Implementing changes to the DBTUNE table
A simple workflow allows you to modify the contents of the DBTUNE
table to customize how your geodatabase stores data.

Figure 5.6
Workflow for updating
DBTUNE.

Use the following steps to create or modify a configuration keyword:

5-8
Managing storage

1. Use the Export Geodatabase Configuration Keywords tool to


Implementing changes export the DBTUNE table to a text file. This step requires a
to the DBTUNE table geodatabase administrator connection.
2. Edit the text file to modify or create a keyword.
3. Use the Import Geodatabase Configuration Keywords tool to
import the edited text file back into the repository. This step
requires a geodatabase administrator connection.
4. Load data and use the modified or new keyword with a data
owner connection.

5-9
LESSON 5

Demo 5A: Create and Create and update keywords


update keywords
(See script page D-14)
The Export Geodatabase Configuration Keywords tool
10 minutes exports the DBTUNE table to a text file. After modifying
the text file, you can import the table back into the
Purpose database repository using the Import Geodatabase
Configuration Keywords tool.
To demonstrate how to
create a keyword.
Data You might want to modify DBTUNE for the following reasons:

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

Exercise introduction 25 minutes Exercise 5: Customize storage using configuration


keywords
This exercise is brief
because you do not want to In this exercise, you will customize the data-loading portion of the
overemphasize DBTUNE. geodatabase workflow.
At the end, students load
data using a modified Figure 5.7

DEFAULTS keyword. There The loading data step.

are SQL queries for each


RDBMS in the MMGD\
DBTUNE folder in case
students want to verify that
the changed parameter was
used. They are named
<RDBMS>_query_
modified_keyword.txt.
You have decided to modify one of the DEFAULTS parameters to
optimize storage of the business tables for some data that is intended
Debrief to be edited extensively. In addition, you have decided to store
Summarize and discuss the read-only data with tightly packed indexes to make the best use of
purpose and results of the database storage. To do so, you will create in DBTUNE a custom
exercise. configuration keyword that users can use when loading read-only
data.
In this exercise, you will perform the following tasks:
• Modify the DEFAULTS configuration keyword.
• Create a custom configuration keyword.
• Use your modified DEFAULTS and custom keyword to load data.

5-11
LESSON 5

Step 1: Investigate Help documentation


Because configuration parameters control the storage of objects in a database, they are specific
to the RDBMS. You can view a list of supported parameters for each RDBMS in the ArcGIS Help.

a Open a web browser and browse to https://pro.arcgis.com/en/pro-app/help.

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).

d Take a few minutes to familiarize yourself with this page.

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.

e Close the web browser.

For the remainder of the exercise, you will follow the workflow to implement to the DBTUNE table
changes described earlier in this lesson.

Step 2: Export DBTUNE


To create a configuration keyword, you will start by exporting the existing DBTUNE table to a text
file, where you will be able to view and edit it.

a Start ArcGIS Pro and restore the course project.

b Search for and open the Export Geodatabase Configuration Keywords tool.

c For Input Database Connection, browse to the Naperville_SDE connection.

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.

f In File Explorer, browse to ..\EsriTraining\MMGD\DBTUNE.

g Open the DBTUNE file with Notepad.

h Look through the file.

1. What appears at the top and bottom of each keyword?

_____________________________________________________________________________
_____________________________________________________________________________

2. How are parameters and values formatted?

_____________________________________________________________________________

Step 3: Modify the DEFAULTS keyword


Imagine that your organization determines that it would be beneficial to provide more storage for
changes to data indexes (in other words, the B or business table indexes). Your task is to change
the parameter that controls the amount of free space in the business tables (the parameter name
differs for each RDBMS). That way, when people in the organization load or create data without

5-13
LESSON 5

specifying a keyword, they will be using the modified DEFAULTS keyword and conforming to the
organizational policies.

a Locate the DEFAULTS keyword in the DBTUNE text file.

b Perform the following steps for your specific RDBMS.

SQL Server users


• Scroll down in Notepad until you find the section with multiple parameters that all begin
with B_INDEX.

• In Notepad, change all the FILLFACTOR values to 65.

Oracle users
• Scroll down in Notepad until you find the section with multiple parameters that all begin
with B_.

• In Notepad, change all the PCTFREE values to 35.

5-14
Managing storage

PostgreSQL users
• Scroll down in Notepad until you find the section with multiple parameters that all begin
with B_INDEX.

• In Notepad, change all the FILLFACTOR values to 65.

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.

Step 4: Create a custom keyword


Now you will create in DBTUNE a keyword for data owners who will be loading read-only
datasets. You will create a custom keyword called READ_ONLY that will store business tables with
much less free space (90 percent filled and 10 percent free).

a In File Explorer, browse to ..\EsriTraining\MMGD\DBTUNE, if necessary.

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).

d Close the <RDBMS>_read_only 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

g Save and close the DBTUNE file.

Step 5: Import DBTUNE


a Restore the ArcGIS Pro course project, and then search for and open the Import Geodatabase
Configuration Keywords tool.

b For Input Database Connection, use the geodatabase administrator connection


(Naperville_SDE).

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

Step 6: Load data using modified and new keywords


a In the Catalog pane, in the MMGD folder connection, expand the Database and
AdministrativeArea folders.

b Right-click MunicipalBoundary.shp, point to Export, and choose Feature Class To Feature


Class.

c In the Feature Class To Feature Class tool, set the following parameters:
• Output Location: Naperville_GISowner connection
• Output Feature Class: MunicipalBoundary

d Expand Geodatabase Settings (near the bottom of the Geoprocessing pane).

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.

Your Geoprocessing pane should look similar to the following graphic.

e Click Run.

f Repeat the export procedure to export CountyBoundary.shp to the Naperville geodatabase.


• Name the feature class CountyBoundary.
• Expand Geodatabase Settings, and then for Configuration Keyword, from the drop-down
list, choose READ_ONLY.

5-18
Managing storage

Your Geoprocessing pane should look similar to the following graphic.

3. How could you verify that the new feature classes were loaded using the appropriate
keywords?

_____________________________________________________________________________

g Exit ArcGIS Pro and choose to save changes.

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

1. What are configuration parameters?

_____________________________________________________________________________
_____________________________________________________________________________

2. What are configuration keywords?

_____________________________________________________________________________
_____________________________________________________________________________

3. What are the four steps for creating or modifying a keyword in DBTUNE?

_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________

5-20
Managing storage

Answers to Lesson 5 questions

Exercise 5: Customize storage using configuration keywords (page 5-11)


1. What appears at the top and bottom of each keyword?
##KEYWORD_NAME
END

2. How are parameters and values formatted?


Each parameter has its own line, and the value is separated from the parameter name
using tabs.

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

Total lesson length:


75 minutes
Lesson 6
Instruction: 40 minutes Maintaining the geodatabase
Exercise: 35 minutes
Author lesson story
Now that data is in the geodatabase, the students will look at tasks to help maintain the
performance for people using that data.
Users modifying the database statistics and indexes becoming outdated cause the geodatabase
to perform poorly. It is crucial to maintain the geodatabase by updating statistics and creating
and updating indexes. Run these tasks after the data is loaded and periodically as it is used. The
best way to keep up on these tasks is to script them and run the script on a schedule using
operating system scheduling tools. This lesson explores maintenance tasks, including automating
them using Python.
Maintaining the geodatabase

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

Learning objectives Learning objectives

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.

To create effective indexes, you must know on which attribute or


combination of attributes your users query. Multicolumn indexes can
Attribute indexes are more
be faster than separate indexes on the participating columns if they
likely to be used when
are frequently queried together.
there is a high degree of
uniqueness to the values For example, if you regularly query column A, sometimes column B,
in the field. and sometimes columns A and B, you could choose from the
following approaches:
• Create a multicolumn index on A and B. This approach will be
faster for queries involving both columns. It will also perform
well when you query only column A.
• Create a separate index using column B to be used when you
query only column B.
Keep in mind that, while attribute indexes allow for quicker query
performance, editors may experience slower performance due to
index updates.

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.

There are database jobs that maintain statistics in the database.


However, statistics can become temporarily outdated as the table or
feature class is edited, either through editing sessions or through bulk
data loads. Therefore, ArcGIS provides tools to update statistics either
manually or automatically. Note that users may experience diminished
performance if you are updating statistics while users are using the
data.

Updating statistics is an I/O-intensive operation and therefore


should be run during non-peak-use hours for your database.

6-3
LESSON 6

Demo 6A: Manage Manage attribute indexes and statistics


attribute indexes and
statistics Create indexes
(See script page D-17)

10 minutes Attribute indexes can be created and deleted in the


feature class or table Properties dialog box on the
Purpose Indexes tab.
To create and update an
attribute index and
You can use the geoprocessing tools Add Attribute
calculate statistics.
Index and Remove Attribute Index to manage attribute
Data
indexes.
Streets feature class in
demonstration
geodatabase Table 6.1
Parameter Description
Parameters for creating an
attribute index.
Input Table Table or feature class requiring an index

Fields To One or more columns to index


Index

Index Unique name for the index that describes the table and
Name columns

6-4
Maintaining the geodatabase

Update indexes

You can use the Rebuild Indexes tool to rebuild all


indexes on a feature class or table and/or on some of the
system tables in the geodatabase.

Table 6.2
Parameter Description
Parameters for the Rebuild
Indexes tool.
Input Database Connection to database as the owner of the
Connection datasets

Include System Option to include system tables in the list of


Tables datasets to process, which requires an SDE
user connection

Datasets To Rebuild A list of all feature classes and tables for


Indexes For which to rebuild indexes

Rebuild Delta Tables Option to rebuild indexes only on delta


Only tables, not business tables

6-5
LESSON 6

Calculate statistics

You can update statistics using the Analyze or Analyze


Datasets tools. Analyze will update statistics for one
feature class or table, whereas Analyze Datasets will
update multiple feature classes or tables at once,
including system tables.

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

Datasets To A list of feature classes and tables to analyze


Analyze

Analyze Base Option to include the business tables in the analysis


Tables

Analyze Delta Option to include the delta tables in the analysis


Tables

Analyze Option to include the archive tables in the analysis


Archive Tables

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

Demo 6B: Manage Manage performance tasks with Python


performance tasks
The ArcPy site package provides the ability to access geoprocessing
with Python
functionality within Python scripts, including such data management
(See script page D-19)
tasks as a geodatabase compression. But the same strategy could be
5 minutes used for any number of performance-related tasks.
An easy way to create a Python automation script is to run one or
Purpose more tools in ArcGIS Pro and save the geoprocessing history as a
To show how the Python script.
geoprocessing tool results
can be an easy way to Steps to create a Python automation script
create a Python script to
automate that task. Figure 6.6
The automation process
Data
for maintaining
Enterprise geodatabase
geodatabase
with Streets demonstration
performance.
data

1. Run one or more tools from ArcGIS Pro.


2. Right-click one or more geoprocessing history entries and
choose to save as a Python script.
3. Use the Python script in a batch file or in a Python toolbox in
ArcGIS Desktop. Scripts can be further automated with the
Windows Task Scheduler or Linux Cron.

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.

If a user tries to make a schema change to a dataset with a schema


lock, an error message will be generated and the user will not be
ArcGIS Pro Help: Manage
allowed to make the change.
geodatabase
locks-Manage The following situations are sources of schema locks:
geodatabases in
• Another user is viewing or editing datasets in ArcGIS clients.
<RDBMS>
• Datasets are being shared in ArcGIS Server services.

6-11
LESSON 6

Demo 6C: View and View and clear locks


clear locks
(See script page D-21)
The Locks tab of the Geodatabase Administration
10 minutes dialog box displays information about schema locks,
including the user account associated with each lock.
Purpose
Locks can be cleared by disconnecting the lock owner.
To demonstrate how to Connections can be disconnected using the Connection
view locks and disconnect tab or right-clicking the lock in the Locks tab.
users. Disconnecting users can be done by the database
Data administrator or the geodatabase administrator if they
Any data in an enterprise have the default privileges granted by the Create
geodatabase Enterprise Geodatabase tool.

Disconnect users to clear locks only if you cannot contact them


(for example, if a user left for the day with their session still
open).

6-12
Maintaining the geodatabase

Exercise introduction 35 minutes Exercise 6: Maintain performance in your


geodatabase
Debrief
In this exercise, you will implement the performance portion of the
Summarize and discuss the geodatabase workflow.
purpose and results of the
exercise. Figure 6.8
The maintaining
geodatabase performance
step.

Maintaining performance is a vital aspect of managing your enterprise


geodatabase. As users begin using your geodatabase, performance
will begin to suffer unless you routinely update indexes and statistics.
In this exercise, you will perform the following tasks:
• Create indexes.
• Update indexes and statistics.
• Automate performance tasks with Python.

6-13
LESSON 6

Step 1: Import census data


a Start ArcGIS Pro and restore the course project.

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.

Step 2: Create indexes


The first step in maintaining optimal geodatabase performance is to create indexes for common
user situations.

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.

a In the Catalog pane, expand the Naperville_GISowner connection.

b Right-click ZoningDistrict and choose Properties, and then click the Indexes tab.

1. How many attribute indexes already exist for this feature class?

_____________________________________________________________________________

c Click Add to create an index.

d Name the index Zoning_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

h In the Feature Class Properties dialog box, click OK.

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.

i If necessary, in the Catalog pane, refresh your Naperville_GISowner database connection to


view the CensusBlocksStats table.

j Right-click the CensusBlocksStats table and choose Properties.

k Click the Indexes tab, and then click Add.

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.

n Name the index Pop_and_Dens and click OK.

The multicolumn index will take a moment to be built.

o Using your knowledge gained from previous steps, create a single-column index for
POPDENS, naming the index anything that you like.

Step 3: Update statistics


The next step to maintaining optimal geodatabase performance is to keep statistics up to date.
Statistics should be updated when data is loaded or the feature classes change because of
editing. Only the data owner can update statistics on geodatabase objects using ArcGIS tools.

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.

Your Geoprocessing pane should look similar to the following graphic.

2. Could you clear any of the three check boxes at the bottom of the Geoprocessing pane?
Why or why not?

_____________________________________________________________________________
_____________________________________________________________________________

b Click Run.

Statistics have been updated for the feature class.

Step 4: Compress the geodatabase


If you are using versioning in your multiuser geodatabase, running the Compress tool periodically
is recommended to maintain geodatabase performance. Only the geodatabase administrator can
run the Compress tool. Therefore, you will need to use the SDE user connection to the
geodatabase.

a Search for and open the Compress tool.

b For Input Database Connection, browse to the Naperville_SDE connection.

c Click Run to run the tool.

6-16
Maintaining the geodatabase

Step 5: Rebuild indexes


In a previous step, you created indexes. Next, you will learn how to rebuild them. Indexes should
be rebuilt after data is loaded into a feature class or periodically as edits alter the feature class.

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.

Your Geoprocessing pane should look similar to the following graphic.

b Click Run.

Step 6: Automate performance tasks


You can run the Rebuild Indexes and Analyze Datasets tools manually whenever you want, but it is
easier to automate the process. If you create a Python script, you can automate retrieving all
feature classes and tables in the geodatabase and running the tools on them. Automation makes
the process easier as feature classes and tables are added or removed from the geodatabase.

6-17
LESSON 6

a At the top of the Catalog pane, click the History tab.

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.

c Scroll down to the bottom of the list of entries.

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.

f In the Export Script dialog box, browse to the ..\EsriTraining\MMGD\GDBMaintenance folder.

g For File Name, type Naperville_Census_Maintenance.

h Click Save.

6-18
Maintaining the geodatabase

i In File Explorer, browse to the ..\EsriTraining\MMGD\GDBMaintenance folder, right-click the


Naperville_Census_Maintenance.py file, and choose Edit With IDLE.

Your Python file should contain the following Python script.

j Close the Python file.

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.

k Exit ArcGIS Pro and choose to save changes.

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

1. Which tools should be run periodically to maintain geodatabase performance?

_____________________________________________________________________________
_____________________________________________________________________________

2. Why is the Analyze Datasets tool important?

_____________________________________________________________________________
_____________________________________________________________________________

3. What are the advantages of automating performance tasks with Python?

_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________

6-20
Maintaining the geodatabase

Answers to Lesson 6 questions

Exercise 6: Maintain performance in your geodatabase (page 6-13)


1. How many attribute indexes already exist for this feature class?
There is one index for the OBJECTID field.

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

Total lesson length:


70 minutes
Lesson 7
Instruction: 40 minutes Associating data
Exercise: 30 minutes
Author lesson story
Query layers and database views provide ways to associate data in the geodatabase. Query layers
give users a way to explore joins and view subsets of data for which they have privileges. In
addition, users can simply build a query layer using a query builder interface.
Database views have similar functionality to query layers but are stored in the database and allow
data owners to share data with the database users. The database view can also allow users to see
a subset of rows or columns of a table or feature class by giving users access to the view but
denying them privileges to the underlying tables.
Associating data

7
Associating data
Introduction

Key terms Often, additional information related to features is stored in


nonspatial tables. ArcGIS provides many options for linking tables:
database views
joins, relates, query layers, and database views. The advantage of
query layers query layers and database views is that they are executed in the
RDBMS and the results are passed to the client application.

Topics covered

• Database views
• Query layers

Learning objectives Learning objectives

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).

Query layers are defined using a SQL query statement associating


one or more tables in the database. The query can be constructed
interactively by using a query builder and is stored as a layer or table
in the map document. To create the query layer, the connected user
must have privileges to access the tables referenced in the query
expression. You can reuse the query layer by saving it as a layer file or
by saving the map document.
Query layers make a suitable choice for specialized queries that will
not be used often or will be used by only one or two people because
they eliminate the need to create and maintain another database
object.

For the best performance, attribute indexes should be built on


the key fields used to join tables.

7-2
Associating data

Demo 7A: Create Create query layers


query layers
(See script page D-22)
Query layers can be created from the Map tab in ArcGIS
5 minutes Pro by clicking the Add Data down arrow and choosing
Query Layer.
Purpose
To demonstrate how to
The Make Query Layer geoprocessing tool can also be
create a query layer.
used to create query layers.
Data
Stores feature class and
Store_Revenue table
loaded into a Table 7.1
demonstration enterprise Parameter Description
Parameters for Add Query
geodatabase Layer.
Connection Connection to the database

Name Name for the new query layer

Query SQL statement for defining the query layer, which


requires fully qualified table names

Table 7.2
Parameter Description
Parameters for Make
Query Layer tool.
Input Connection to the database
Database

Output Name for the new query layer


Layer Name

Query SQL statement for defining the query layer, which


requires fully qualified table names

Example SQL statement for joining tables:


You must use the correct SELECT gisowner.Stores.OBJECTID, gisowner.Stores.Name,
SQL syntax for your
gisowner.Stores.Address, gisowner.Stores.Shape,
gisowner.Store_Revenue.Revenue
RDBMS. FROM gisowner.Stores, gisowner.Store_Revenue
WHERE Stores.StoreID = Store_Revenue.Store_ID

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.

As with query layers, for the best performance, attribute


indexes should be built on the key fields used to join tables.

Registering tables and views with the geodatabase

It is now possible to register both database views and stand-alone


tables with the geodatabase.

7-4
Associating data

Registering tables or views with the geodatabase has several


advantages:
ArcGIS Pro Help: Register
a table or view with the • Allows table or view to participate in geodatabase functionality,
geodatabase such as subtypes and domains
• Can add metadata
• Improves performance when adding the table or view to a map
• For views, it stores the spatial reference and unique identifier, so
you will not be prompted when adding it to a map
• A view can be included in read-only feature services

7-5
LESSON 7

Demo 7B: Create Create database views


database views
(See script page D-24)
Database views can be created by right-clicking a
5 minutes database connection, pointing to New, and choosing
View. This action opens the Create Database View tool.
Purpose
To demonstrate how to
The Create Database View geoprocessing tool can also
create a database view.
be used to create database views.
Data
Stores feature class and
Store_Revenue table
loaded into a Table 7.3
demonstration enterprise Parameter Description
Parameters for Create
geodatabase Database View.
Input Database Database connection in which to create
Connection the view

Output View Name Name for the new view

View Definition SQL statement for defining the view

Example SQL statement for joining tables:


You must use the correct SELECT gisowner.Stores.OBJECTID, gisowner.Stores.Name,
SQL syntax for your
gisowner.Stores.Address, gisowner.Stores.Shape,
gisowner.Store_Revenue.Revenue
RDBMS. FROM gisowner.Stores, gisowner.Store_Revenue
WHERE Stores.StoreID = Store_Revenue.Store_ID

7-6
Associating data

Choosing between query layers and database


views
Determining whether to create a query layer or a database view
depends on several factors:
• How many users will need to use it
• How frequently the query might change
• Whether you must secure underlying tables
• Whether the users have sufficient SQL skills to create their own
queries
Query layers tend to be the more appropriate choice when fewer
users are in need of the same query. In other words, if the queries are
more unique to each user, then it makes more sense for users to
create their own query layers. Also, if queries are changing frequently,
it would not make much sense to create database views because a
high number of views with limited use would be that much more to
manage in the geodatabase.
Alternatively, database views are a better choice if queries must be
accessed frequently by many users over longer time periods.
Maintaining views as geodatabase objects would be well worth the
additional maintenance and could be optimized to perform better.
Database views are also a good choice if users do not possess the
skills necessary for creating the SQL query themselves. Furthermore,
database views are an excellent way to provide access to a view
without granting privileges to any underlying tables that you want to
keep secure.

7-7
LESSON 7

Activity 7A: Determining whether to create query layers or


Determining whether database views
to create query layers or
database views Read each scenario and determine whether query layers or database
views would be the better choice. Circle your choice and justify it in
the space provided.
20 minutes
Scenario 1: Land management personnel create various reference and
analytical maps based on parcel, land use, and zoning information.
Purpose
Your geodatabase includes a parcel fabric, buildings and parks feature
Identify what scenarios classes, and tables containing information about parcel ownership,
would lend themselves to building permits, site addresses, tax value, land use, and zoning.
creating query layers or
database views. Conditions: Within the organization, a few users of the data tend to
use the same data regularly. Additionally, a public-facing website
Debrief
allows external customers to look up a small subset of data (only
After students have made certain columns of data from some of the stand-alone tables, such as
their choices for each tax values) associated with their properties.
scenario, ask volunteers to
discuss why the association
1. The better choice for Scenario 1 is query layers/database views.
type was chosen for each
(Discuss your reasoning below.)
scenario.
____________________________________________________________
____________________________________________________________
____________________________________________________________

Scenario 2: A small environmental services company has been


engaged to remediate a gasoline station site with leaky storage tanks.
The project team includes a biologist, geophysicist, and project lead,
each requiring a unique set of maps and analytical tools to perform
his or her duties.
Conditions: All team members rely heavily on weekly field reports that
relate changes to key soil parameters as the remediation efforts
progress. As the field reports come in, the soil parameter data is
migrated to a set of stand-alone tables in the geodatabase. The team
members are comfortable building their own SQL queries to access
the data in the stand-alone tables to associate with the soil sample
locations. Additionally, all team members have sufficient access to the
feature classes and tables that they need to construct their maps and
run their analyses.

7-8
Associating data

2. The better choice for Scenario 2 is query layers/database views.


(Discuss your reasoning below.)

____________________________________________________________
____________________________________________________________
____________________________________________________________

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

Step 1: Create a query layer


You will store U.S. Census data as a feature class and a stand-alone table in your geodatabase.
You have found that users typically use only one or two of the many Census demographic fields
available. You will explore creating query layers in ArcGIS Pro.

a Start ArcGIS Pro and restore the course project.

In an earlier exercise, as the Naperville_GISowner, you loaded two Census-related datasets: a


CensusBlock feature class and a CensusBlocksStats table.

b Using the Change Privileges geoprocessing tool, grant View (Select) privileges to the Planning
role for the following datasets:
• CensusBlock (feature class)
• CensusBlocksStats (table)

c Insert a new map to the project.


Hint: From the Insert tab, in the Project group, click New Map.

d From the Map tab, in the Layer group, click the Add Data down arrow and choose Query
Layer.

e From the Connection drop-down list, choose the Naperville_Kim connection.

f Name the query layer CensusPop.

g In File Explorer, browse to ..\EsriTraining\MMGD\AssociatingData.

h Open the Census.txt file.

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

In Oracle, the tables do not have "naperville." prefixes.

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.

p Close the attribute table and close the map view.

Step 2: Explore election data


Every election, new sets of results will be collected and stored in the geodatabase for each
political race. You will explore these datasets before constructing database views for users.

a In the Catalog view, browse to the ElectionResults geodatabase in the ..\EsriTraining\MMGD\


Database\ElectionResults.gdb folder.

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?

_____________________________________________________________________________

2. Which field is used to uniquely identify a voting precinct?

_____________________________________________________________________________

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.

c Import the ELECTIONRESULTSNORMALIZED.xml into your enterprise geodatabase.


• Find it in the ..\EsriTraining\MMGD\Database folder.
• Use the Naperville_GISowner connection.

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

Step 3: Create database views


Now that the data has been normalized and stored in your geodatabase, you will create database
views to make using voting precinct polygons and results easy for users.

a In File Explorer, browse to ..\EsriTraining\MMGD\AssociatingData.

b Open Congress13thDistrictView.txt in Notepad and copy all the text.

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.

d Create the view by setting the following parameters:


• Output View Name: Congress13thDistrictView
• View Definition: paste <the SQL statement from Congress13thDistrictView.txt>

e Close the Congress13thDistrictView text file.

f Create two more views using the following parameters:


• USSenateView: <the SQL statement from USSenateView.txt> (copy and paste it)
• PresidentofUSView: <the SQL statement from PresidentofUSView.txt> (copy and paste it)

g Take a look at each view in the Catalog pane or Catalog 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.

h In the Catalog pane, right-click Congress13thDistrictView, point to Manage, and choose


Register With Geodatabase.

i In the Register With Geodatabase tool, set the following parameters:


• Object ID Field: OBJECTID
• Shape Field: SHAPE

j Click Run.

k Repeat the process to register the other views with the geodatabase.

l If necessary, close all the Notepad windows.

m Add one of the views to a new map.

7-16
Associating data

n View the attribute table for the layer.

All the fields specified in each database view definition are available in each layer.

Step 4: Use database views


Now that you have created several database views, you will see how one behaves in ArcGIS Pro
by using one of the database user accounts created in an earlier exercise.

a In ArcGIS Pro, insert a new map.

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.

d Close all open map views.

e Exit ArcGIS Pro and choose to save changes.

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?

_____________________________________________________________________________
_____________________________________________________________________________

2. What can database views and query layers be used for?

_____________________________________________________________________________
_____________________________________________________________________________

3. What extra functionality can you get using database views rather than query layers?

_____________________________________________________________________________
_____________________________________________________________________________

7-19
LESSON 7

Answers to Lesson 7 questions

Determining whether to create query layers or database views (page 7-8)


1. The better choice for Scenario 1 is query layers/database views. (Discuss your reasoning
below.)
Database views
• Many organizational users use common queries frequently.
• Queries do not change frequently.
• The public-facing website requires access to a few columns while securing much
of the underlying data.

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.

2. Which field is used to uniquely identify a voting precinct?


NAME (Precinct Name)

7-20
Instructor page

Total lesson length:


120 minutes
Lesson 8
Instruction: 75 minutes Applying the geodatabase workflow
Exercise: 45 minutes
Author lesson story
Now that students have progressed all the way through the workflow, they will take a step back in
this lesson and bring together all that they have learned.
This lesson gives students an opportunity to look at the full process as a whole rather than in
small, isolated chunks. Much of it is activity-based—reviewing content from the class, expanding
on additional tasks such as backup and recovery, and applying tasks to a real-world workplace.
This lesson also includes a large culminating exercise.
Applying the geodatabase workflow

8
Applying the geodatabase
workflow
Introduction

To configure and manage a geodatabase, you move through a


sequence of tasks that include installing client software, creating a
geodatabase, choosing an authentication method, loading data,
assigning privileges, maintaining performance, and managing the
geodatabase. Each of these tasks must be performed by users with
the proper credentials and privileges in the geodatabase.

Topics covered

• Geodatabase workflow
• Geodatabase users

Learning objectives Learning objectives

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.

Database administrator responsibilities:


• Create database
• Create database users and roles
• Grant database privileges
• Back up and recover data
• Configure storage
Geodatabase administrator responsibilities:
• Own repository
• Configure DBTUNE
• Perform maintenance tasks
• Manage top-level version
Data owner responsibilities:
• Manage privileges
• Manage fields
• Register data as versioned
• Manage indexes

8-4
Applying the geodatabase workflow

Data user responsibilities:


• View maps and data
• Create maps
• Perform analysis
• Create and maintain features

8-5
LESSON 8

Activity 8A: Geodatabase tasks


Geodatabase tasks
As you configure and manage your geodatabase, you must identify
(See script page C-1)
tasks to be completed and assign those tasks to people.
45 minutes Complete the table with at least one task for each step of the
geodatabase workflow along with the responsible user account and
Purpose person in your organization.
Develop a list of tasks to be
performed, assigning them
Step Task User Account Person
to the appropriate person.
Create

Connect

Load
Data

Table 8.1

8-6
Applying the geodatabase workflow

Step Task User Account Person

Privileges

Performance

Management

Table 8.2

8-7
Applying the geodatabase workflow

Exercise introduction 45 minutes Exercise 8: Configure and manage a multiuser


geodatabase
Debrief
The city of Manhattan, Kansas, is ready to migrate from a file
Summarize and discuss the geodatabase to an enterprise geodatabase. You will create the
purpose and results of the geodatabase, migrate the data, and configure privileges. You will
exercise. then manage user interaction with the geodatabase and optimize
performance.
The instructions in this culminating exercise are intentionally less
specific than the instructions in prior exercises. If you are uncertain
about how to proceed, refer back to the relevant lesson.
In this exercise, you will perform the following tasks:
• Create an enterprise geodatabase.
• Load data into the geodatabase.
• Configure privileges.
• Improve performance.

Figure 8.3
Deploying and
maintaining a
geodatabase includes all
aspects of the
geodatabase workflow.

8-9
LESSON 8

Step 1: (Oracle only) Drop objects from previous database


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.

a In the EBASE MACHINE (blue desktop), open File Explorer.

b Browse to the C:\EsriTraining\MMGD\Installers\Oracle Express 11.2 folder and copy the


DropOracleUsers.txt file.

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.

d Double-click the DropOracleUsers.txt file to open it.

e Open a command prompt window.


Hint: Click the Windows Start button, type cmd, and press Enter.

f Copy all the text from the DropOracleUsers.txt file and paste it into the command prompt by
right-clicking next to the prompt.

The commands will automatically be executed.

8-10
Applying the geodatabase workflow

Some of the commands may take a few minutes.

g When all the SQL commands have been completed, type exit, and then press Enter to log out
of SQL.

h Close all the open windows.

i In the EBASE MACHINE (blue desktop), exit ArcGIS Pro, if necessary.

Make sure that you exit ArcGIS client applications as you do not want any locks
to persist.

Step 2: (PostgreSQL only) Configure PostgreSQL server


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.

a In the EBASE MACHINE (blue desktop), open File Explorer.

b Browse to the C:\EsriTraining\MMGD\Installers\PostgreSQL 11 folder and copy the


st_geometry.dll file.

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.

f From the GEODATA MACHINE desktop, copy the st_geometry.dll file.

g Open File Explorer and browse to C:\Program Files\PostgreSQL\11\lib.

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.

Step 3: Create the Manhattan geodatabase


Now that the city of Manhattan is ready to migrate to an enterprise geodatabase, your first task is
to create it.

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

c Click OK to create the project.

8-12
Applying the geodatabase workflow

Now you will create a geodatabase appropriate for your RDBMS.

d Open the Create Enterprise Geodatabase tool.

SQL Server and PostgreSQL users


• For the instance name, use <host name>.
• Name the geodatabase manhattan.
• Use database authentication for the database administrative user. The database
administrative account is:
• SQL Server: sa/Esri.4.GIS
• PostgreSQL: postgres/Esri.4.GIS
• For the geodatabase administrative account, use a user named sde and a password of
Esri.4.GIS.
• Leave the tablespace name blank (for PostgreSQL only).
• Browse to C:\_sw\_Authorization and select the 107_Server_Adv.ecp license file.

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.

1. Go to the RDBMS server.


2. Open a command prompt window.
3. Type sqlplus system/Esri.4.GIS@manhattan and press Enter.
4. Type drop user sde cascade; and press Enter.
5. Close the command prompt window and return to the client PC.
6. Restart ArcGIS Pro.

All RDBMS users

e Create connections to the manhattan geodatabase for both the database administrator and
the geodatabase administrator accounts.

f Rename the database administrator Manhattan_Admin and rename the geodatabase


administrator connection Manhattan_SDE.

Step 4: Load data into the geodatabase


Data from a file geodatabase must be uploaded to the Manhattan enterprise geodatabase.

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.

b Create a folder connection to the C:\EsriTraining\MMGD folder.


Hint: In the Catalog pane, right-click Folders and choose Add Folder Connection.

c Load all the datasets from ..\MMGD\Database\ManhattanKS.gdb into your enterprise


geodatabase, using any data-loading tools that you think will work best.

8-14
Applying the geodatabase workflow

Step 5: Apply privileges


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 perform its job
functions.

a Create users and roles and apply privileges according to the following table.

Role Users Access

wastewater • gilligan • SewerSystem (View/Edit)


• skipper • ParcelManagement (View)
• Buildings (View)
• Cityboundary (View)
• Streets (View)

gis • ginger • ParcelManagement (View/Edit)


• mary_ann • Buildings (View/Edit)
• Cityboundary (View/Edit)
• Streets (View/Edit)

b In ArcGIS Pro, create connections for the users that you just created.

c Use each of the user connections to test their privileges.

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.

1. Which datasets can Skipper see?

_____________________________________________________________________________

8-15
LESSON 8

2. Can Gilligan edit Streets?

_____________________________________________________________________________

3. Can Ginger edit Buildings?

_____________________________________________________________________________

d Save your ArcGIS Pro project.

Step 6: Maintain performance


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


(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 Repeat the process to add the Manhattan_SDE connection 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.

d Minimize ArcGIS Pro.

e Double-click the ArcGIS Pro desktop shortcut to start a second ArcGIS Pro session.

f Under New, click Start Without A Template.

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.

4. Is the Add button grayed out? If so, why?

_____________________________________________________________________________

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.

5. Which tools should be run periodically to maintain performance?

_____________________________________________________________________________

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

Answers to Lesson 8 questions

Exercise 8: Configure and manage a multiuser geodatabase (page 8-9)


1. Which datasets can Skipper see?
SewerSystem, ParcelManagement, Buildings, Cityboundary, and Streets

2. Can Gilligan edit Streets?


No

3. Can Ginger edit Buildings?


Yes

4. Is the Add button grayed out? If so, why?


The other connections from previous steps have established one or more locks on this
data.

5. Which tools should be run periodically to maintain performance?


Rebuild Indexes and Analyze Datasets

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

Exercise 8 solution: Configure and manage a multiuser geodatabase


The city of Manhattan, Kansas, is ready to migrate from a file geodatabase to an enterprise
geodatabase. You will create the geodatabase, migrate the data, and configure privileges. You
will then manage user interaction with the geodatabase and optimize performance.
In this exercise, you will perform the following tasks:
• Create an enterprise geodatabase.
• Load data into the geodatabase.
• Configure privileges.
• Improve performance.

Step 1: (Oracle only) Drop objects from previous database

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.

a In the EBASE MACHINE (blue desktop), open File Explorer.

b Browse to the C:\EsriTraining\MMGD\Installers\Oracle Express 11.2 folder and copy the


DropOracleUsers.txt file.

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.

The commands will automatically be executed.

8-21
LESSON 8

Some of the commands may take a few minutes.

f When all the SQL commands have been completed, type exit to log out of SQL.

g Close all the open windows.

h In the EBASE MACHINE (blue desktop), exit ArcGIS Pro, if necessary.

Make sure that you exit ArcGIS client applications as you do not want any locks
to persist.

Step 2: (PostgreSQL only) Configure PostgreSQL server

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.

a In the EBASE MACHINE (blue desktop), open File Explorer.

b Browse to the C:\EsriTraining\MMGD\Installers\PostgreSQL 11 folder and copy the


st_geometry.dll file.

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.

f From the GEODATA MACHINE desktop, copy the st_geometry.dll file.

g Open File Explorer and browse to C:\Program Files\PostgreSQL\11\lib.

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.

Step 3: Create the Manhattan 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

c Click OK to create the project.

8-23
LESSON 8

Now you will create a geodatabase appropriate for your RDBMS.

d In the Geoprocessing pane, search for and open the Create Enterprise Geodatabase tool.

e Set the following parameters associated with your RDBMS.

SQL Server users


• Database Platform: SQL Server
• Instance: <Host name>
• Database: manhattan
• Operating System Authentication: <Cleared check box>
• Database Administrator: sa
• Database Administrator Password: Esri.4.GIS
• Sde Owned Schema: <Selected check box>
• Geodatabase Administrator Password: Esri.4.GIS
• Authorization File: 107_Server_Adv.ecp (in C:\_sw\_Authorization)

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)

f Run the tool.

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

i Rename the database administrator account connection Manhattan_Admin.

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

k Rename the geodatabase administrator account connection Manhattan_SDE.

l Save your ArcGIS Pro project.

Step 4: Load data into the geodatabase

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.

d Create a folder connection to the C:\EsriTraining\MMGD folder.

e In the MMGD folder connection, expand the Database folder and the ManhattanKS file
geodatabase.

8-26
Applying the geodatabase workflow

f In the ManhattanKS file geodatabase, select the ParcelManagement feature dataset.

g Right-click and choose Copy.

h Right-click the Manhattan_GISowner connection and choose Paste.

i Repeat the process for every dataset in the ManhattanKS database.

Step 5: Apply privileges

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

b Repeat the process to create the GIS role.

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

d Create the other three users with the following parameters.

Database User Database Password Role

skipper Esri.4.GIS wastewater

ginger Esri.4.GIS gis

mary_ann Esri.4.GIS gis

e In the Geoprocessing pane, search for and open the Change Privileges tool.

8-27
LESSON 8

f In the Change Privileges tool, set the following parameters:


• Input Dataset: SewerSystem feature dataset (make sure to use the Manhattan_GISowner
connection)
• User: wastewater
• View (Select): Grant View Privileges
• Edit (Update/Insert/Delete): Grant Edit Privileges

g Using the following table, set up the geodatabase privileges for the remaining feature dataset
and feature classes.

Dataset wastewater gis

ParcelManagement View (Select) View (Select), Edit (Update/Insert/Delete)

Buildings View (Select) View (Select), Edit (Update/Insert/Delete)

Cityboundary View (Select) View (Select), Edit (Update/Insert/Delete)

Streets View (Select) View (Select), Edit (Update/Insert/Delete)

h Create database connections for Gilligan, Skipper, Ginger, and Mary Ann, and then verify that
they have access to the correct datasets.

i Connect to each of the user connections and test their privileges.

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.

1. Which datasets can Skipper see?


SewerSystem, ParcelManagement, Buildings, Cityboundary, and Streets

8-28
Applying the geodatabase workflow

2. Can Gilligan edit Streets?


No

3. Can Ginger edit Buildings?


Yes

j Save your ArcGIS Pro project.

Step 6: Maintain performance

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.

d Repeat the process to add the Manhattan_SDE connection 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 Minimize ArcGIS Pro.

f Double-click the ArcGIS Pro desktop shortcut to start a second ArcGIS Pro session.

g Under New, click Start Without A Template.

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.

4. Is the Add button grayed out? If so, why?


The other connections from previous steps have established one or more locks on this
data.

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.

The Add button should now be enabled.

m Click Add to create an index.

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

5. Which tool should be run periodically to maintain index performance?


Rebuild Indexes

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

TRAINING UNDER THIS AGREEMENT. THESE LIMITATIONS WILL APPLY NOTWITHSTANDING


ANY FAILURE OF ESSENTIAL PURPOSE OF ANY LIMITED REMEDY.
Export Regulation. You must comply with all applicable laws and regulations of the United States
including, without limitation, its export control laws. You expressly acknowledge and agree not to
export, reexport, transfer, or release Esri-provided Training Materials, in whole or in part, to (i) any
US embargoed country (including to a resident of any US embargoed country); (ii) any person or
entity on the US Treasury Department Specially Designated Nationals List; (iii) any person or entity
on the US Commerce Department Lists of Parties of Concern; or (iv) any person or entity where
such export, reexport, or provision violates any US export control laws or regulations including,
but not limited to, the terms of any export license or licensing provision and any amendments and
supplemental additions to US export laws.
Governing Law. This Agreement is governed by and construed in accordance with the laws of the
state in which training is being held or, in the case of training provided over the Internet, the laws
of the State of California, without reference to its conflict of laws principles.

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)

1. What is the repository in a geodatabase?


a. A complete backup of the database

2. Which management tools would you use to recover your geodatabase?


You would use RDBMS management tools.

3. What role does ArcGIS play in the geodatabase?


ArcGIS provides the geodatabase functionality, such as subtypes and topologies.

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

Lesson 2: Connecting to the geodatabase (page 2-22)

1. One must always create client connections using the Database Connection dialog box from
the Catalog pane.
b. False

2. An ArcGIS 10.7 client can connect to a 10.2 geodatabase.


a. True

B-2
Lesson 3: Loading data into the geodatabase

Lesson 3: Loading data into the geodatabase (page 3-26)

1. Why might you use the Append tool instead of the Simple Data Loader?
You can use the Append tool in automation situations.

2. Why should the data owner account be a headless user?


The data owner is responsible for managing the dataset. Without a headless account,
no one can manage the data if a user owns data and then leaves the organization.

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

Lesson 4: Configuring privileges (page 4-20)

1. What are roles used for?


Grouping users and managing privileges at the group level

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

Lesson 5: Managing storage (page 5-20)

1. What are configuration parameters?


Parameters are name and value pairs that are used to configure storage in the
database.

2. What are configuration keywords?


Keywords are groups of parameters that users can choose when creating their
datasets.

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

Lesson 6: Maintaining the geodatabase (page 6-20)

1. Which tools should be run periodically to maintain geodatabase performance?


Rebuild Indexes, Compress, and Analyze Datasets

2. Why is the Analyze Datasets tool important?


Up-to-date statistics will help the database optimizer make better decisions.

3. What are the advantages of automating performance tasks with Python?


Automating the retrieval of all feature classes and tables from the geodatabase for
processing and easily scheduling the task for off hours

B-6
Lesson 7: Associating data

Lesson 7: Associating data (page 7-19)

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.

2. What can database views and query layers be used for?


Joining tables and filtering attributes

3. What extra functionality can you get using database views rather than query layers?
Limiting access to only certain attributes

B-7
Appendix B

Lesson 8: Applying the geodatabase workflow (page 8-19)

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

45 minutes Activity 8A: Geodatabase tasks (page 8-6)


Purpose
Develop a list of tasks to be performed, assigning them to the appropriate person.

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.

d Move to the Geodatabase responsibilities slide.

Step 2: User accounts and people


a Give students time to complete the last two columns of the table, specifying the user account
(database administrator, geodatabase administrator, or data owner) necessary for each task
and assigning it to a person in their organization.

b Collect and record the answers from the User Account column.

C-1
Demo 1A: Create an enterprise geodatabase

D
Demo scripts

10 minutes Demo 1A: Create an enterprise geodatabase (page 1-11)


Purpose
To discuss the difference between the Create Enterprise Geodatabase and the Enable Enterprise
Geodatabase tools. Show how to use geoprocessing tools to create an enterprise geodatabase.

Before you begin


a Install and license ArcGIS Enterprise with an Enterprise license.

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.

Step 1: Create the geodatabase


a Explain the RDBMS icons in the workbook for RDBMS-specific information.

b In the Catalog pane, search for and open the Create Enterprise Geodatabase tool.

c Fill in the parameters based on your chosen RDBMS.


• Make sure to create a database or tablespace, but discuss why you would create a
database using RDBMS tools rather than the Create Enterprise Geodatabase tool (such as
using non-default storage location).
• Discuss each parameter as you fill it in.

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.

f Run the tool.

Step 2: View the new database or tablespace


a Using RDBMS management tools, show the students the new database or tablespace that the
tool created.

b Leave the RDBMS management tool open for the next demonstration.

D-2
Demo 1B: Explore the repository

10 minutes Demo 1B: Explore the repository (page 1-15)


Purpose
To reinforce the concept that the repository supports multiuser geodatabase behaviors.

Step 1: View repository tables


a Using RDBMS tools, show that the geodatabase has many repository tables owned by SDE.

Tables to point out in particular: (descriptions provided in student takeaway)


• Table_registry
• Layers
• Raster_columns
• Column_registry
• Process_information
• Layer_locks
• Versions

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.

Step 2: Show ArcGIS Pro help


You can transition from the topic of the geodatabase repository to show how users would find
additional information about their RDBMS configuration using the ArcGIS Pro help. The web help
is very useful, but it is also good for learners to know that there is another way to view the help
that puts topics related to their RDBMS in a more traditional tree structure.

a From ArcGIS Pro, open the online help documentation.

b Expand the Data topic, and then the Geodatabases topic.

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

5 minutes Demo 1C: Orientation to the course exercise environment


(page 1-18)
Purpose
Briefly orient students to the exercise VM environment before they begin their exercise.

Before you begin


a Start the VM.

Step 1: Explain the course environment


a Explain the course VM architecture, and note that students will spend most of their time in the
EBASE VM, with GEODATA acting as a separate database server.

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

5 minutes Demo 2A: Create a connection (page 2-3)


Purpose
To explore the interface for creating a direct connection.

Step 1: Connect to your geodatabase


a Expand Databases in the Catalog pane.

b Add a database connection.

c Fill in the parameters to connect to your geodatabase, explaining as you go.


• Use the SDE user to connect.

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.

Step 1: Create the data owner account


a Create a connection to a database using the database administrator credentials.

Explain that creating users is a DBA task, and that even though it can be done from ArcGIS,
it still requires DBA credentials.

b Search for and run the Create Database User tool.


• Use your DBA connection
• User name: gisowner
• Password: Training12345
• Role: none

c Create a connection to the database using the gisowner user credentials. Rename the
connection Naperville_GISowner.

d Optionally, show the new user in RDBMS tools.

D-7
Appendix D

10 minutes Demo 3B: Use ModelBuilder (page 3-11)


Purpose
To highlight an example of how ModelBuilder can be used to automate data loading.

Before you begin


You will create a model to load multiple feature classes from a single folder into the geodatabase.

Step 1: Show the environment settings and batch mode option


You may want to create the model ahead of time. If you do, make sure that you use the
current version of the software.

Environment settings

a Explain the hierarchy of 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.

f Close the tool.

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.

i Close the tool.

Step 2: Create a toolbox and model


If you have more advanced students, you might want to have them give you instructions for
some steps.

a Create a toolbox in your geodatabase and explain that models must be stored in custom
toolboxes.

b Create a model in the toolbox.

c Set the name and label properties to BulkLoad and Bulk Load.

d Show that the label is used in the Catalog pane.

Step 3: Add tools


a Search for the Feature Class To Feature Class tool.

b Open the tool and discuss its functionality and parameters.


• In particular, focus on the Input Features, Output Location, and Output Feature Class
parameters.

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.

e Add a Feature Classes iterator and discuss its output.

Step 4: Connect the iterator to the tool


a Remind students that the Feature Class To Feature Class tool needs input features and the
output feature class name, and that the iterator generates similar values.

b Connect the following iterator outputs to their corresponding Feature Class To Feature Class
tool parameter:

Iterator output Feature Class To Feature Class parameter

Feature class Input Features

Name Output Feature Class

Step 5: Create model parameters


a Explain that now each output feature class from the iterator will be processed by the Feature
Class To Feature Class tool, but that the iterator does not know where to get feature classes
and the Feature Class To Feature Class tool does not know where to put them.

b Create a variable from the iterator.


• Use the Workspace or Feature Dataset parameter.
• Rename it Input Workspace.

c Create a variable from the Feature Class To Feature Class tool.


• Use the Output Location parameter.
• Rename it Output Workspace.

d Set both variables as model parameters.


• Set the Input Workspace as a model parameter first so that it will be the top parameter in
the tool dialog box.

D-10
Demo 3B: Use ModelBuilder

Optionally, you can set default values for the two parameters so that the model becomes
"colorful."

e Save and close the model.

Step 6: Run the model


a Run the model from the Catalog window.
• Use demo\ModelBuilder as the input workspace.
• Use the data owner connection to your geodatabase for the output workspace.

Be sure to mention that you are using the data owner connection so that the loaded
datasets will be owned by that account.

b Show the new datasets in the geodatabase.

D-11
Appendix D

20 minutes Demo 4A: Manage users (page 4-6)


Purpose
To assign privileges to users and roles you create. Because students have already used the Create
Database User tool, have them tell you how to use it.

Step 1: Create users and roles


This demonstration assumes that you have a geodatabase with all the previous
demonstrations' data loaded into it.

a Search for and run the Create Role tool.


• Create two roles called Commerce and Transportation.
• Explain that the administrator connection is required because you must be a database
administrator to create roles or users.

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.

c Search for and run the Create Database User tool.


• Create two users in the database named Joe and Deb.
• Add Deb to Commerce and Joe to the Transportation role.
• Again, note that you are using the administrator connection.

Step 2: Set privileges


a Open the Privileges dialog box for the Streets feature class.

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.

e Add the Transportation role.

D-12
Demo 4A: Manage users

f Discuss the Select, Insert, Update, and Delete privileges.

g Give Transportation full privileges.

h Click OK to close the Privileges dialog box.

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.

Step 3: Test privileges


a Create a connection to the database using Joe's credentials.

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

10 minutes Demo 5A: Create and update keywords (page 5-10)


Purpose
To demonstrate how to create a keyword.

Before you begin


a Make sure that you have an enterprise geodatabase created. You must use a geodatabase
administrator connection (SDE) to export and import, as well as create a view of a repository
table. You will also need a data owner connection to load data using a custom keyword.

Step 1: Export DBTUNE


a Start ArcGIS Pro and search for the Export Geodatabase Configuration Keywords tool.

b Using the geodatabase administrator account (SDE), save the output file to the desktop and
name it DBTUNE.txt.

Step 2: Edit in a text editor


a Edit the DBTUNE file in Notepad.

b Scroll through the file and describe the formatting.

You could reinforce the best


practice of loading data c Change one of the parameters associated with the DEFAULTS keyword, such as one of the
without specifying a fillfactors.
keyword by using the
DEFAULTS keyword. So it d Describe creating a custom keyword. At the bottom of the file, insert a new keyword.
may make sense to use a
lower fillfactor to allow This example works for SQL Server and PostgreSQL:
more room for edited data
for most of the
##LOWER_FILLFACTOR
organization's data.
B_INDEX_ROWID "WITH FILLFACTOR = 65"
UI_TEXT ""
END

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.

f Save and close the file.

Step 3: Import DBTUNE


a Search for the Import Geodatabase Configuration Keywords tool and open it.

b Using the SDE connection (geodatabase administrator account), browse to the modified
DBTUNE file and import it.

Step 4: Use keywords


a In the Catalog pane, right-click your data owner connection, point to Import, and choose
Feature Class.

b Import one of the shapefiles from C:\DemoData\SpatialTypes.

c Type an output feature class name that is easy to locate.

d Expand the Geodatabase Settings, choose your custom configuration keyword


(LOWER_FILLFACTOR) and click OK to load the data.

When finished, the new data will appear as a layer in the map.

Step 5: Create a view for the SDE_LAYERS table


a Mention that when data was loaded using a custom keyword, that keyword is not shown to
users. A user would need to look in the repository to know what keyword was used.

b Right-click the geodatabase administrator connection to the geodatabase, point to New, and
choose View.

c For Input Database Connection, use the SDE connection.

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.

f Right-click and open the vw_SDE_Layers 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

10 minutes Demo 6A: Manage attribute indexes and statistics (page


6-4)
Purpose
To create and update an attribute index and calculate statistics.

Before you begin


a Make sure that you have data in the demonstration geodatabase.

Step 1: Create an attribute index


a Search for and open the Add Attribute Index tool.

b Create an attribute index on one of the demonstration geodatabase feature classes.


• Use the data owner connection.
• Add a field to Fields To Index.
• Give it any index name that you like.

c Run the tool.

d Open the feature class properties using the data owner connection and go to the Indexes tab
to show the new index.

Step 2: Update indexes


Convey that the Rebuild Indexes tool works on one or more indexes within the geodatabase
owned by the user. Note that if users want to include system tables, it must be done with the SDE
(geodatabase administrator) connection.

a Search for and run the Rebuild Indexes tool.


• Use the data owner connection.
• Check the dataset to rebuild indexes for.
• Deselect the Rebuild Delta Tables Only check box.

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

Step 3: Analyze datasets


a Search for and run the Analyze Datasets tool.
• Use the gisowner connection.
• Add the feature class to the list of datasets to process.

b Deselect the following check boxes:


• Analyze Delta Tables
• Analyze Archive Tables

If desired, explain why users would choose to analyze delta and archive tables.

c Run the tool.

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

5 minutes Demo 6B: Manage performance tasks with Python (page


6-10)
Purpose
To show how the geoprocessing tool results can be an easy way to create a Python script to
automate that task.

Step 1: Create Python script from geoprocessing results


Rather than explaining specific Python syntax, promote copying the code from the GP Results
window. That way, one does not need to know Python scripting language to be able to automate
data maintenance tasks.

a Start ArcGIS Pro.

b In the Catalog pane, using a data owner connection, choose the feature class from the
previous demonstration to register as versioned.

c Explain that compressing a geodatabase is an important performance strategy and relates to


any versioned data within the geodatabase. Mention that Esri has an instructor-led course
(IVGD) that covers versioning extensively. (Because some students may not take it, now is a
good opportunity to impress upon them the importance of frequent use of the Compress
tool.)

d Make sure that you have an SDE connection to the geodatabase.

e Search for and open the Compress tool, type your SDE connection, and run the tool.

f Open the geoprocessing history in the Catalog pane.

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.

i Right-click the file and choose Edit With IDLE.

j Show that the code contains all of the parameters from the run of the tool.

k Close the GDB_Compress.py file.

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.

Step 2: Schedule script


Explain that now that you have a script that can be run outside of ArcGIS Pro, you can easily
schedule it to run periodically without having to remember to run it manually.

a Click the Windows Search button, search for scheduler, and open Task Scheduler.

b Create a Basic Task:


• Name: Compress Geodatabase
• Daily
• 3 a.m.
• Start a program
• Browse to C:\DemoData\Performance\GDB_Compress.py
• Finish

c Click the Task Scheduler folder to show the scheduled task.

d Explain that Linux has an analogous scheduler called Cron.

e Explain that you now have a completely automated script that will ensure optimal performance
of the geodatabase.

f When finished, delete the task from the scheduler.

D-20
Demo 6C: View and clear locks

10 minutes Demo 6C: View and clear locks (page 6-12)


Purpose
To demonstrate how to view locks and disconnect users.

Step 1: Create a schema lock


a Set up a schema lock scenario by viewing a feature class in ArcGIS Pro. Use any connection
other than SDE.

b With any connection that has sufficient privileges, try to make a schema change to the same
feature class.

Step 2: View and clear the lock


a Connect the SDE connection to your geodatabase.

b In the Catalog pane, right-click the connection and choose Properties.

c Expand the Connections section and click Show Connected Users And Locks.

d View and discuss the Connections tab.

e View and discuss the Locks tab.

f Show how to disconnect a user from either tab.

g Induce an error message by attempting to view the attribute table of the feature class you
added to the map earlier.

h Discuss the error message.

i Optionally, make a schema change to the feature class.

D-21
Appendix D

5 minutes Demo 7A: Create query layers (page 7-3)


Data path
C:\DemoData\AssociatingData\StoreData.gdb

Purpose
To demonstrate how to create a query layer.

Before you begin


a Make sure that both the Stores feature class and Stores_Revenue table are loaded into the
demonstration enterprise geodatabase of your choice.

Step 1: Create a query layer


a In ArcGIS Pro, from the Map tab, in the Layer group, click the Add Data down arrow and
choose Query Layer.
• Use the data owner connection.
• For Name, type StoresRevenueQueryLayer.
• Use the query from C:\DemoData\AssociatingData\Views_and_Query_Layers.txt.

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).

c Create the query layer interactively by using the query builder.


• Double-click a table name to add it to the query.
• Delete the attributes after the Select statement and double-click to insert an attribute.
• Add a couple more attributes to the query, separating them with commas. Make sure that
Shape is one of the attributes.

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.

e Click Validate, Next, and Finish to show the query layer.

f Remove the query layer that you just made.

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.

j Symbolize the stores using the revenue attribute, if you like.

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

5 minutes Demo 7B: Create database views (page 7-6)


Data path
C:\DemoData\AssociatingData\StoreData.gdb

Purpose
To demonstrate how to create a database view.

Before you begin


a In the Catalog pane, browse to C:\DemoData\AssociatingData\StoreData.gdb and copy the
Stores feature class and the Store_Revenue table.

b Paste them into your gisowner connection to the database of choice.

Step 1: Create a database view


a In ArcGIS Pro, create a view in the geodatabase.
• Use the gisowner connection.
• Name it StoresWithRevenue.
• Use the SQL statement from C:\DemoData\AssociatingData\
Views_and_Query_Layers.txt.

b Add StoresWithRevenue view to a map.


• Choose OBJECTID as the unique field.

c Symbolize the StoresWithRevenue layer by using the Revenue attribute (the new column that
originates from the Store_Revenue table).

D-24

You might also like