Similar documents
Geodatabase Programming with SQL

Prerequisites Attended the previous technical session: Understanding geodatabase editing workflows: Introduction

Supported DBMS platforms DB2. Informix. Enterprise ArcSDE Technology. Oracle. GIS data. GIS clients DB2. SQL Server. Enterprise Geodatabase 9.

Troubleshooting SQL Server Enterprise Geodatabase Performance Issues. Matthew Ziebarth and Ben Lin

ArcGIS 10.1 Geodatabase Administration. Gordon Sumerling & Christopher Brown

GIS Databases With focused on ArcSDE

Administering Your Microsoft SQL Server Geodatabase

An Esri White Paper February 2011 Best Practices for Storing the ArcGIS Data Reviewer Workspace in an Enterprise Geodatabase for SQL Server

ArcSDE Spatial Data Management Roles and Responsibilities

MOC 20462C: Administering Microsoft SQL Server Databases

6231B: Maintaining a Microsoft SQL Server 2008 R2 Database

Enterprise GIS: Database Planning

ArcGIS Server and Geodatabase Administration for 10.2

Working with the Geodatabase Using SQL

Database Servers Tutorial

An Esri White Paper February 2011 Best Practices for Storing the ArcGIS Data Reviewer Workspace in an Enterprise Geodatabase for Oracle

Optimizing Performance. Training Division New Delhi

Chapter 1: Introduction to ArcGIS Server

W I S E. SQL Server 2008/2008 R2 Advanced DBA Performance & WISE LTD.

Administering your PostgreSQL Geodatabase

SQL Server 2012 Optimization, Performance Tuning and Troubleshooting

Microsoft SQL Database Administrator Certification

ArcSDE Configuration and Tuning Guide for Oracle. ArcGIS 8.3

Mississippi Private Schools 2015

ArcSDE for Microsoft SQL Server Administration. Rob Stauder, ESRI

Using CAD Data in ArcGIS

Web Editing Tutorial. Copyright Esri All rights reserved.

Bentley ArcGIS. Connector

50238: Introduction to SQL Server 2008 Administration

Course 2788A: Designing High Availability Database Solutions Using Microsoft SQL Server 2005

Administering a Microsoft SQL Server 2000 Database

Administering Microsoft SQL Server 2012 Databases

DATABASE ANALYST I DATABASE ANALYST II

Destiny system backups white paper

David Dye. Extract, Transform, Load

Topology. Shapefile versus Coverage Views

Geodatabase Tuning and Performance. Gillian Silvertand Greg Cunningham

Spatial data models (types) Not taught yet

Administering your Oracle Geodatabase

Administering a Microsoft SQL Server 2000 Database

2 Working with a Desktop GeoDatabase

GIS Data in ArcGIS. Pay Attention to Data!!!

Introduction. Part I: Finding Bottlenecks when Something s Wrong. Chapter 1: Performance Tuning 3

Exam : Transition Your MCTS on SQL Server 2008 to MCSA: SQL Server 2012, Part 2. Title : The safer, easier way to help you pass any IT exams.

INTRODUCTION TO ARCGIS SOFTWARE

Best Practices for Storing the ArcGIS Workflow Manager Workspace in an Enterprise Geodatabase for SQL Server

Data Modeling Basics. John Auel GIS Technician II United Services Group

Best Practices for Storing the Product Library Workspace in an Enterprise Geodatabase for SQL Server. An Esri White Paper October 2012

ArcGIS 9. Installation Guide: Workgroup for Microsoft SQL Server Express

SQL Server 2008 Designing, Optimizing, and Maintaining a Database Session 1

Contents. SnapComms Data Protection Recommendations

NUTECH COMPUTER TRAINING INSTITUTE 1682 E. GUDE DRIVE #102, ROCKVILLE, MD WEB: TEL:

Creating a File Geodatabase

CA ARCserve and CA XOsoft r12.5 Best Practices for protecting Microsoft SQL Server

Basics on Geodatabases

6231A - Maintaining a Microsoft SQL Server 2008 Database

How To Install The Arcgis For Inspire Server Extension On A Microsoft Gis For Inspire Server Extension (For Microsoft) On A Pc Or Macbook Or Ipa (For Macbook)

ArcGIS Data Models Practical Templates for Implementing GIS Projects

Administering a Microsoft SQL Server 2000 Database

Spatial Database Support

JOB TITLE: CURRENT CLASSIFICATION/GRID POSITION # IT Tech III AD Grid Level 5(e) #121 Database Administrator

Introduction to GIS.

MAIN_SNP_TOPO.dgm_2m

SQL Server 2014

Terry Sherman Oklahoma South Central Arc-Users Group th Annual Conference 9/23/2014

WW TSS-02\03 MS SQL Server Extended Performance & Tuning

Explain how to prepare the hardware and other resources necessary to install SQL Server. Install SQL Server. Manage and configure SQL Server.

CHAPTER 8: OPTIMIZATION AND TROUBLESHOOTING

Introduction to the ArcGIS Data Model and Application Structure

MOC Administering Microsoft SQL Server 2014 Databases

Archival Challenges Associated with the Esri Personal Geodatabase and File Geodatabase Formats

GIS Architecture and Data Management Practices Boone County GIS Created and Maintained by the Boone County Planning Commission GIS Services Division

MS-10775: Administering Microsoft SQL Server 2012 Databases. Course Objectives. Required Exam(s) Price. Duration. Methods of Delivery.

LNG Terminals. File Geodatabase Feature Class. Tags natural gas, lng, liquid natural gas, terminals

Stellar Phoenix. SQL Database Repair 6.0. Installation Guide

Getting Started with the ArcGIS Predictive Analysis Add-In

MS Administering Microsoft SQL Server Databases

LocatorHub. Migrating LocatorHub to Version 5.2. The Transition from ArcObjects Based Plug-Ins to ArcGIS for Server Services

GeoManitoba Spatial Data Infrastructure Update. Presented by: Jim Aberdeen Shawn Cruise

Would-be system and database administrators. PREREQUISITES: At least 6 months experience with a Windows operating system.

Maintaining a Microsoft SQL Server 2008 Database

Basic knowledge of the Microsoft Windows operating system and its core functionality Working knowledge of Transact-SQL and relational databases

MCTS Microsoft SQL Server 2005 Implementation & Maintenance

OpenGIS Implementation Specification for Geographic information - Simple feature access - Part 2: SQL option

GEOGRAPHIC INFORMATION SYSTEMS CERTIFICATION

Five Best Practices for Maintaining an Enterprise Geodatabase

MOC 20467B: Designing Business Intelligence Solutions with Microsoft SQL Server 2012

General DBA Best Practices

Working with Geodatabase Topology

Automation Engine AE Server management

Advanced Image Management using the Mosaic Dataset

Microsoft SQL Server performance tuning for Microsoft Dynamics NAV

Working with SQL Profiler

An Esri White Paper August 2009 ArcGIS Server in Practice Series High-Capacity Map Services: A Use Case with CORINE Land-Cover Data

Backups and Maintenance

Course Syllabus. At Course Completion

Syllabus AGET 782. GIS for Agricultural and Natural Resources Management

13/10/2011. Data Integration and Interoperability. Gordon Sumerling & Maree Wilson

Data Validation Online References

Transcription:

Advanced ArcSDE Administration for SQL Server Shannon Shields Tony Wakim

Workshop Format Three topics What's New In-depth Database Administration Trouble-shooting / Performance Selection varies year to year Please let us know if there is a topic you'd like to see next year

Topics What's New in 9.3 SQL Server 2008 spatial types Database backups (for increased job security) How to backup and recover your geodatabase Diagnosing locking issues

SQL Server 2008 Spatial Types GEOGRAPHY GEOMETRY 'CLR' types (available in all editions that use.net framework) Create by defining column data type as 'GEOGRAPHY' or 'GEOMETRY' Large set of spatial methods (functions) OGC and extended Microsoft-provided methods Methods are called on instances MyTown.STContains(CoffeeShop)

GEOGRAPHY data type Stores ellipsoidal geometries Lat,Long coordinates referenced to a known Geographic Coordinate System Specifically, locations on the earth's surface Methods will return true distance/area measurements Each GEOGRAPHY instance uses a predefined SRID EPSG code (European Petroleum Survey Group) Query sys.spatial_references_system for full list Default is 4326 (WGS_1984) No single instance can exceed the size of a hemisphere Minimum bounding circle

Geometry data type Stores planar (x,y) coordinates Calculations are planar Coordinate system is arbitrary SRID does not correspond to any particular coordinate system SRID can be any value from 0 to 99,999 Defaults to 0 Appropriate for projected or unknown coordinate systems

What is all this about SRID? Spatial Reference Identifier Associates geometries with coordinate reference Associated with individual geometries, not entire tables geography::stgeomfromtext('point(37.603936-122.084552)', 4326) Methods comparing two geometries will return NULL results if SRID of inputs do NOT match

ArcSDE Implementation Creating data dbtune keywords control storage Registering 3 rd party data Structure t Storage configuration parameters CAD storage Spatial index Current Status

Data: M, Z, CAD, etc. Geometry and Geography support Z and M storage ArcSDE does not currently support Z and M with Geography Technical limitation Working on a solution that performs well Implemented and maintained by ArcGIS: CAD, Topology, Terrains, Geometric Networks, Network Datasets, Annotation, Dimensions, Raster, Subtypes, Domains, Relationship classes etc.

Creating data with ArcGIS GEOMETRY_STORAGE Dbtune parameter controls the type of geometry used Keyword Config g_ string DEFAULTS GEOGRAPHY GEOMETRY WKB_GEOMETRY SDEBINARY GEOGRAPHY GEOMETRY OGCWKB Additional keywords to support creation of Networks, Terrains & Topologies with GEOGRAPHY and dgeometryt types

Registering 3 rd party tables with ArcGIS Must register external tables with ArcSDE to see spatial content sdelayer o register -t t <storage_type> either ih GEOGRAPHY or GEOMETRY -R R SRID to associate with existing ArcSDE spatial reference or use other Spatial_Ref_Opts (x/y offsets, cluster tolerance, projection ID or file) to generate new C:\>sdelayer o register l contours,shape e nslc+ -t GEOGRAPHY C ID,SDE x -180,0,11930464.69,0.000000167638 -G 4326 D UC...

Registration and SRID ArcSDE SRID Unique record in SDE_spatial_references table GEOGRAPHY SRID Valid EPSG code from sys.spatial_references_system table GEOMETRY SRID User-defined SDE_spatial_references AUTH_SRID & AUTH_NAME columns Populated with GEOGRAPHY or GEOMETRY SRIDs

Registration Workflow Easy workflow for registration Use ArcGIS to create a 'template' feature class with correct coordinate reference Get ArcSDE SRID from template Use sdelayer o describe Use R <SRID> option when registering SQL Server table Registration ti will not automatically ti build a spatial index Assumption is that existing data would/should already have a spatial index

Registration rules All SQL Server SRIDs must be the same Cannot have different coordinate references in the same layer All geometries must be the same entity type Cannot mix points, lines, polygons in the same layer Must have suitable ObjectID column Registration can create one for you Use existing column (int, not null, unique) ID NAME 1 Cowichan 2 Fraser 3 Sooke SHAPE

Structure: Storage configuration parameters New dbtune DEFAULTS parameters B_MS_SPINDEX, A_MS_SPINDEX Sets SQL Server spatial index parameters GEOM_SRID_CHECK Creates a check constraint on spatial column to ensure consistent SRID values MyLocation.STSRID = 4326 Default is 1 (on) If inserts are NEVER performed at SQL level this can be disabled GEOMTAB_% Controls CAD side table storage

Structure: CAD storage CAD entity type is automatically enabled if data created using ArcGIS Desktop / ArcObjects Enables storage of true curves etc. Must enable manually y( (c entity type) if data created with ArcSDE CAD features are stored in a side table SDE_GEOMETRY<layer_id> Spatial column contains densified version of CAD curves Once table is populated, all spatial queries will join to CAD table If table is not populated, join will not occur Use caution if editing geometries outside ArcGIS Only ArcGIS can maintain the CAD feature

Spatial Index GEOMETRY and GEOGRAPHY spatial index Database index based on b-tree Can have up to 249 spatial indexes on a single spatial column ArcSDE will create a single, default spatial index Based on config_string value of A/B_MS_SPINDEX in dbtune Specify density (number of cells) per level Specify cells per object ArcSDE will provide default bounding box (current layer extents) ArcSDE returns index type 'SPIDX_MSSQL' and -6

Current Status SQL Server 2008 is not in final release Estimated Q3 2008 ArcSDE 9.3 works with SQL Server 2008 CTP6 and RC0 but IS NOT certified. ESRI will certify SQL Server 2008 when it is final Until then please test, but do not use in production 9.3 SP1 will contain several fixes Improvements to registration process

Topics What's New in 9.3 SQL Server 2008 spatial types Database backups (for increased job security) How to backup and recover your geodatabase Diagnosing locking issues

Five excuses not to backup your databases Nothing is going g to happen to my data It will take too long My data is read-only no one edits it Backups take too much space I have copies of all my original data

Five reasons why you MUST backup your databases 1. Natural disasters, media or hardware failures, mistakes 2. Backing up a database takes less time than: Reloading all your data Explaining to your boss where all the data went Finding a new job... 3. Read-only data needs to be backed up at least one (see reason #2) 4. Disks are much cheaper than data. Always factor backup space requirements into hardware capacity planning. 5. All edits will be lost if you have to reload original data instead of restoring a backup.

Backup planning 1. Determine how much data you can afford to lose 2. Work out a restore strategy based on acceptable data loss and data usage patterns How often does data change? What changes? All data, only certain tables Are modifications consistent or does editing volume vary over time? 3. Implement backups defined by restore strategy 4. Test, test, and test again Test and verify backups Test restore procedures 5. Re-evaluate evaluate and modify as needed

ArcSDE Geodatabases Active repository tables Heavily edited data, e.g. versioned feature classes Read-only data, e.g. large raster stores Edited Data Read-only Data

Managing read-only data in a read-write database Full database backups simplest way to prevent data loss Consume largest amount of disk-spacespace Take longest time to complete Not efficient for databases with significant amount of read-only data Partial backups Introduced at SQL Server 2005 Backup of read-write filegroups and optional read-only filegroups Work on any recovery model (simple, full etc)

Configuring geodatabases for partial backups 1. Create filegroups Segregate data onto read-write and read-only filegroups 2. Create dbtune keywords that direct data to correct filegroup %_STORAGE and %_INDEX_% parameters Add 'ON' argument WITH FILLFACTOR = 100 ON FG1 By default indexes are stored on same filegroup as base table 3. Load data using new dbtune keywords Can manually move existing indexes/tables to different filegroups DROP INDEX MOVE TO CREATE INDEX WITH DROP EXISTING 4. Mark specific filegroups as Read-only

Performing partial backup of geodatabase Start with an initial backup of all data Then on schedule, perform partial backups according to backup plan Partial backups contain: Primary filegroup All read-write filegroups Optional read-only filegroups (must specify) Must use BACKUP statement with READ_WRITE_FILEGROUPS argument Include FILEGROUP argument for inclusion of read-only filegroups Can make differential partial backups too

SQL Server geodatabase backup hints Use default settings for ArcSDE logfiles Creates logfiles in tempdb (9.2 and later) Logfile activity is NOT recorded in geodatabase's transaction logs You must backup your entire geodatabase Multiple database instances where data is spread over multiple databases with central (sde) repository present additional backup/restore complexity SDE database repository tables record activity in all related databases E.g. States, Lineages, Versions, etc Therefore MUST synchronize backup and restore of all databases in the geodatabase

Topics What's New in 9.3 SQL Server 2008 spatial types Database backups (for increased job security) How to backup and recover your geodatabase Diagnosing locking issues

Diagnosing Locking Issues What is a lock? How do locks affect workflow; Blocking issues Some tools used to identify locks Activity it Monitor SQL Server Profiler sp_lock / sp_who stored procedures Sys.dm_os_waiting_tasks

What is a lock? Locks are used to ensure data integrity when multiple users are accessing data at the same time Locks block other transactions from modifying resources that are used by current transaction Most common types of locks Shared Exclusive

Resources that can be locked Data Page Database Row Table Extent = 8 pages

How do locks affect workflow? Users might have to wait for a lock to be freed from a resource before being able to use it. The user is Blocked from using this resource. Lock escalation: : When a group of locks at a lower level is promoted to a lock at a higher level Deadlocks: : A deadlock occurs when two or more tasks permanently block each other from acquiring a lock on a resource

Demo: ArcMap non-versioned editing

How to check for blocking Activity Monitor: : A SQL Server tool that shows: List of processes and locks by process or by object SQL Server 2008 adds Resource waits, Recent Expensive Queries, Data File I/O sp_lock _ / sp_who stored procedures sys.dm_os_waiting_tasks

Using SQL Server Profiler to detect deadlocks Graphical Interface to Monitor Activity in an Instance Can capture data about events you specify Data captured can be saved for future reference

Demo: Monitoring locks and Deadlocking

Other related sessions to attend ArcSDE Configuration, Direct Connect and Upgrade Strategies Tue 8:30-9:45 (8) & Thu 3:15-4:45 (14B) Using SQL and Spatial Types with the Geodatabase Wed 10:15-11:3011:30 (4) & Thu 3:15-4:30 (4) Enterprise Geodatabase Tuning Tips and Tricks Tue 1:30-2:45 (6D) & Thu 8:30-10:15 (6D) Geodatabase Editing Workflows Intro Wed 8:30-9:45 (6C) & Thu 1:30-2:45 (6C) Geodatabase Editing Workflows Advanced Wed 10:15-11:3011:30 (6C) & Thu 3:15-4:30 (6C)

Questions? Thank you for attending