SlideShare a Scribd company logo
1 of 49
Technical Workshops |
Esri International User Conference
San Diego, California
Administering Your
Microsoft SQL Server
Geodatabase
Thomas Dunn and Shannon Shields
July 25, 2012
Topics for this presentation
• News since last UC
• How do I . . .
- Configure SQL Server to support geodatabases?
- Create databases and geodatabases?
- Choose from among spatial data storage options?
- Organize my data?
- Control access to my data?
- Make sure that my data is safe?
- Improve performance?
Please submit your review of this session at
esri.com/ucsessionsurveys
Session offering #1912
Thank you!
ArcGIS and Microsoft changes since last year
News
Connections to Geodatabases and Databases
• At 10.1 you can easily access spatial data in a database
that is not a geodatabase through a regular connection
(not just with Query Layers or the Data Interoperability
Extension)
• At 10.1, you can easily create a geodatabase in a new or
existing database using GP tools
• SQL Server 2012
- Support for SQL Server 2008 R2-level database functionality
- Support for some new features coming later
• Windows Azure SQL Database
- Support for databases
- … but not geodatabases
• ArcGIS direct connections now support mirrored
databases
Support at 10.1 for new Microsoft database releases
Deprecations at ArcGIS 10.1
• Multiple Database Model geodatabases
- Existing geodatabases continue to work
- Cannot create new MDM-GDBs
- MDM-GDB will become a single database automatically (in
the database named SDE) when the last table is removed
from associated user databases
• SQL Server 2005
- Connections can be made earlier geodatabases via pre-10.1
application server
• Many command line tools are being replaced by Desktop
UI and geoprocessing tools
- SDESETUP is replaced by GP tool
Common questions when working with SQL Server
databases and geodatabases
How do I …?
How do I configure
SQL Server to
support geodatabases?
How do I configure SQL Server to support
geodatabases?
• Install a supported version of SQL
Server
• Database Engine is the only required
component
• Must use Case-Insensitive (CI)
collation
• Can use either Windows or Mixed-
mode authentication
• The SQL Server Browser can be
enabled but not required
What is the SQL Native Client?
• Microsoft stand-alone DLL required for connections to
SQL Server
- Provides support for all data types and commands
- Must be installed on all client machines that connect to SQL
Server
• Use SQL Native Client software at least as new as the
SQL Server database engine
- Multiple versions may be installed side-by-side
- MDAC no longer supported: use SQL Native Client
SQL Native Client Location
SNaC
ArcGIS
Client SQL Server
giomgr
SNaC
App Server
Connection
(SDE commands)
Direct
Connection
(SQL
commands)
Client
Computer
Server
Computer
A note about Compatibility Level
• Upgrade database compatibility level after upgrading
SQL Server
- Sets certain database behaviors
- When databases are upgraded they retain existing
compatibility level
• Using Geography spatial type?
- Upgrade compatibility to 110 when upgrading to 2012 from
2008 or 2008R2
• Description of compatibility level differences
http://msdn.microsoft.com/en-us/library/bb510680
Points to remember
• SQL Server Database Engine is only required component
on the server
• The SQL Native Client is required by applications that
send SQL commands to SQL Server, including ArcGIS
• Only Case-Insensitive collations
How do I create databases
and geodatabases?
How do I create databases and geodatabases?
• A database is a SQL Server object
- There can be many per SQL Server instance
• A geodatabase is an ArcGIS construct hosted in a
database
- One allowed in each database
• Options for creating geodatabases
- Use a GP tool to create a new geodatabase from scratch
- Use a GP tool to create a new geodatabase in an existing
database
Choosing a geodatabase schema
• DBO
- Owned by the DBO built-in
user
- Multiple logins can be
DBO, so a headless login is
not needed
- Easier to use Windows
authentication for
administrator
• SDE
- Owner is the database user
named SDE
- SDE user needs fewer
permissions than DBO
- No geodatabase users
need to be DBO
Demo
Creating
databases and
geodatabases
Points to remember
• Geodatabases are ArcGIS constructs stored in
databases
• GP tools provide a simple way to create a geodatabase
- Enterprise geodatabases are 500MB with a 125MB logfile
• For more control over database storage, first create the
database using SQL Server tools, then create the
geodatabase
• GP tool creates databases in Full Recovery mode
- Change to Simple recovery if you don’t want to manage
backups
• Don’t rename a database that contains a geodatabase
How do I choose from among
spatial data storage options?
How do I choose from among spatial data storage
options?
• All perform on par with one another
• SDEBINARY has characteristics similar to Geometry, but
is stored and indexed differently
• Geometry and Geography can be accessed using T-SQL
How are Microsoft Spatial Types used with
ArcGIS Feature Classes?
SQL Server has few restrictions on how spatial type
columns are used.
ArcGIS feature classes use spatial data type columns in
specific ways:
• Spatial type column appears in Business & Adds tables
• SQL Server creates and maintains spatial index based on
parameters provided by ArcGIS
• All shapes in a column must have same Shape.STSrid
- Controlled by check constraint created by ArcGIS and
enforced with a SQL Server
• All shapes must be same type (point, line, polygon)
How does ArcGIS store non-simple shapes in
Geometry or Geography?
Some ArcGIS feature elements like parametric curves and
point IDs are stored in a side table.
• Named SDE_GEOMETRY<registration_id>
• Contains rows only for each feature that has one or more
of these elements
• Joins to only after it contains rows
What are the rules when using the Geography Spatial
Type with ArcGIS?
• Must have SRID defined in SQL Server data dictionary
(SQL Server rule)
• Cannot violate hemisphere rule (SQL Server 2008 rule)
• Cannot have Z or M dimensions (ArcGIS rule)
- For performance reasons, ArcGIS uses Well-Known Binary
(WKB) interface for validating shapes (hemisphere rule)
- SQL Server WKB implementation uses 1999 OCG
specification for WKB, which does not support Z or M
T-SQL Access to Geometry and Geography
• Query attributes of individual features (area, length)
• Perform spatial queries based on comparing shapes
• Combine spatial and non-spatial attributes in queries
• Leverage T-SQL spatial functions in definition queries
and views
• 20-minute session: Using SQL with your Geodatabase
- Was held on Tuesday 8:30am.
Points to remember
• Three storage types are available: SDEBINARY,
Geometry and Geography
• In Geography, calculations are done using Great Ellipse
line interpolation, while the others use Cartesian
• SQL Server manages spatial indexes on Geometry and
Geography
• Microsoft spatial data types provide SQL access to
spatial data
How do I organize my data?
To understand how to organize you data
(and grant access to your data) you must
first become familiar with the basics of
the SQL Server database structure
SQL Server Principals
• Logins = Authentication
- Who is logging on?
• Users = Authorization
- What can this person do in the database?
• Schemas = Containers
- What are the logical groups of database objects that should
be managed as a whole?
SQL Server Instance
Schemas
Tables and
Views
Procedures
and
Functions
Users
Schemas
Tables and
Views
Procedures
and
Functions
Logins
Databases
User-schema relationship
• ArcGIS requires that the database user name and its
default schema name are the same for users that create
data
- Not a SQL Server requirement
• Users that are DBO all create data in the DBO schema
• Data readers & editors need not have a same-named
schema
User-schema with Windows groups
• A Windows group can be added as a login
- Associate the login with a database user
- Do not create a matching schema
• For logins that will create data, SQL Server automatically
creates corresponding user and schema
• Recommendation: Data should be created through
explicit Windows or SQL Server login
- Associate login with data creator user
- Restrict permission for creating data to those users
- Use group logins for data readers or data editors
How do I control access to my
data?
Access to SQL Server objects are
managed with permissions granted to
logins, users, server roles and database
roles
Limit Permissions for Most Users
Data Owners
Data Editors
Data Readers
Admin
Sysadmin fixed-server role
members are DBO in every
database
Who is DBO?
Database owner
Is DBO in single
database
Db_owner role members
are NOT DBO
Have DBO-like permissions
Permissions needed to read, edit or create data
* Needed to create multiversioned views on versioned data
** Including feature, SDEGEOMETRY, versioning and archiving support
tables, if present
Task Required permissions
Creator CREATE TABLE, CREATE PROCEDURE and
CREATE VIEW*
Editor SELECT, INSERT, UPDATE and DELETE on objects** plus
EXECUTE on stored procedures used to generate sequential
values
Reader SELECT on tables**
Permissions needed to manage users
Task Required permissions
Create geodatabase user Membership in sysadmin fixed server role
Create database role CREATE ROLE
Compress geodatabase SDE-schema: SDE user, DBO user or
member of DB_OWNERS database role
DBO-schema: DBO user or member of
DB_OWNERS database role
Kill geodatabase
connections
Membership in the processadmin fixed
server role, and granted VIEW DEFINITION
database permission
View all geodatabase users VIEW DEFINITION database permission
Permissions needed to manage databases
Task Required permissions
Create enterprise
geodatabase
Membership in sysadmin fixed server role
Upgrade geodatabase DBO user in database
OR
Member of DB_OWNERS fixed database
role
Password Policies
• SQL Server uses Windows password policy
- Password expiration rules
- Complexity rules for strong passwords
- Can be disabled
• Security policy is set in Windows, or the domain
- Policies may vary from site to site
Demo
Managing
permissions
Points to remember
• Creating a user does not give access to data in the
database – it must be granted by the data owner
• ArcGIS tools manage permissions on all parts of a
feature class, not just the business table
• Creating a user with the Create User tool will grant
permissions sufficient for creating data
How do I make sure that my
data is safe?
Backups are the only way to
reliably protect your data
How do I make sure that my data is safe?
• Backups allow you to recover from:
- Media failures
- User errors
- Hardware failures
- Natural disasters
• Also, backups can be used for:
- Copying or moving data between servers
- Setting up database mirroring or AlwaysOn
• Use BACKUP command or Backup task in Management
Studio
Points to remember
Backups are the only way to reliably protect your data
1. Decide how much time you can afford to lose when
disaster strikes and data must be restored
2. Create a restore plan that will achieve that goal
3. Create a backup plan that supports your restore plan
4. Implement your plan
5. Test your recovery plan regularly by using real backup
media to restore to a development system
How can I improve
performance?
Common Performance Tuning Objectives
• Improve spatial query performance
• Improve Query Layer or spatial view performance
• Improve overall geodatabase performance
Demo
Performance
Tuning
Tune a spatial index
Prototype a query
Maintain a geodatabase
• Spatial Index pitfalls
- Gigantic extent
- Improper tessellation settings
• Tune queries beforehand
- Prototype, trace, examine execution plan
• Query Layers and spatial views
- Simple is better (and faster)
• Perform geodatabase maintenance
- Compress regularly
- Update index statistics
- Revisit workflows
Points to remember
Related Demo Theater Presentations
These Demo Theater presentations start in a few minutes
• Working with Microsoft SQL Server Express
Geodatabases
- Demo Theater, Hall C, Wednesday 7/25 from 12:00 to 12:30
• Using Microsoft SQL Server Profiler to Troubleshoot
- Demo Theater, Hall C, Wednesday 7/25 from 12:30 to 1:00
Please submit your review of this session at
esri.com/ucsessionsurveys
Session offering #1912
Thank you!
Steps to evaluate UC sessions
• My UC Homepage >
“Evaluate Sessions”
• Choose session from planner
OR
• Search for session
This is Session
#1912
www.esri.com/ucsurveysessions
tw_242.ppt

More Related Content

Similar to tw_242.ppt

KoprowskiT_SQLSat409_MaintenancePlansForBeginners
KoprowskiT_SQLSat409_MaintenancePlansForBeginnersKoprowskiT_SQLSat409_MaintenancePlansForBeginners
KoprowskiT_SQLSat409_MaintenancePlansForBeginnersTobias Koprowski
 
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginnersKoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginnersTobias Koprowski
 
SQL Server Workshop for Developers - Visual Studio Live! NY 2012
SQL Server Workshop for Developers - Visual Studio Live! NY 2012SQL Server Workshop for Developers - Visual Studio Live! NY 2012
SQL Server Workshop for Developers - Visual Studio Live! NY 2012Andrew Brust
 
Data Handning with Sqlite for Android
Data Handning with Sqlite for AndroidData Handning with Sqlite for Android
Data Handning with Sqlite for AndroidJakir Hossain
 
Dealing with SQL Security from ADO.NET
Dealing with SQL Security from ADO.NETDealing with SQL Security from ADO.NET
Dealing with SQL Security from ADO.NETFernando G. Guerrero
 
Access Data from XPages with the Relational Controls
Access Data from XPages with the Relational ControlsAccess Data from XPages with the Relational Controls
Access Data from XPages with the Relational ControlsTeamstudio
 
KoprowskiT_HUG-MSSQL_AdHocMaintenancePlansForBeginners
KoprowskiT_HUG-MSSQL_AdHocMaintenancePlansForBeginnersKoprowskiT_HUG-MSSQL_AdHocMaintenancePlansForBeginners
KoprowskiT_HUG-MSSQL_AdHocMaintenancePlansForBeginnersTobias Koprowski
 
TechEvent 2019: Oracle to PostgreSQL - a Travel Guide from Practice; Roland S...
TechEvent 2019: Oracle to PostgreSQL - a Travel Guide from Practice; Roland S...TechEvent 2019: Oracle to PostgreSQL - a Travel Guide from Practice; Roland S...
TechEvent 2019: Oracle to PostgreSQL - a Travel Guide from Practice; Roland S...Trivadis
 
Optimizing Access with SQL Server
Optimizing Access with SQL ServerOptimizing Access with SQL Server
Optimizing Access with SQL ServerPRPASS Chapter
 
Sqlite
SqliteSqlite
SqliteKumar
 
FOSS4G 2017 Spatial Sql for Rookies
FOSS4G 2017 Spatial Sql for RookiesFOSS4G 2017 Spatial Sql for Rookies
FOSS4G 2017 Spatial Sql for RookiesTodd Barr
 
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginnersSQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginnersTobias Koprowski
 
Dealing with SQL Security from ADO.NET
Dealing with SQL Security from ADO.NETDealing with SQL Security from ADO.NET
Dealing with SQL Security from ADO.NETFernando G. Guerrero
 
Sage 300 ERP: Technical Tour of Diagnostic Tools
Sage 300 ERP: Technical Tour of Diagnostic ToolsSage 300 ERP: Technical Tour of Diagnostic Tools
Sage 300 ERP: Technical Tour of Diagnostic ToolsSage 300 ERP CS
 
Evolutionary database design
Evolutionary database designEvolutionary database design
Evolutionary database designSalehein Syed
 
Java Developers, make the database work for you (NLJUG JFall 2010)
Java Developers, make the database work for you (NLJUG JFall 2010)Java Developers, make the database work for you (NLJUG JFall 2010)
Java Developers, make the database work for you (NLJUG JFall 2010)Lucas Jellema
 

Similar to tw_242.ppt (20)

SQLDay2013_ChrisWebb_CubeDesign&PerformanceTuning
SQLDay2013_ChrisWebb_CubeDesign&PerformanceTuningSQLDay2013_ChrisWebb_CubeDesign&PerformanceTuning
SQLDay2013_ChrisWebb_CubeDesign&PerformanceTuning
 
KoprowskiT_SQLSat409_MaintenancePlansForBeginners
KoprowskiT_SQLSat409_MaintenancePlansForBeginnersKoprowskiT_SQLSat409_MaintenancePlansForBeginners
KoprowskiT_SQLSat409_MaintenancePlansForBeginners
 
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginnersKoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
 
SQL Server Workshop for Developers - Visual Studio Live! NY 2012
SQL Server Workshop for Developers - Visual Studio Live! NY 2012SQL Server Workshop for Developers - Visual Studio Live! NY 2012
SQL Server Workshop for Developers - Visual Studio Live! NY 2012
 
Data Handning with Sqlite for Android
Data Handning with Sqlite for AndroidData Handning with Sqlite for Android
Data Handning with Sqlite for Android
 
Lecture 9: Dynamic web application
Lecture 9: Dynamic web applicationLecture 9: Dynamic web application
Lecture 9: Dynamic web application
 
Dealing with SQL Security from ADO.NET
Dealing with SQL Security from ADO.NETDealing with SQL Security from ADO.NET
Dealing with SQL Security from ADO.NET
 
Access Data from XPages with the Relational Controls
Access Data from XPages with the Relational ControlsAccess Data from XPages with the Relational Controls
Access Data from XPages with the Relational Controls
 
KoprowskiT_HUG-MSSQL_AdHocMaintenancePlansForBeginners
KoprowskiT_HUG-MSSQL_AdHocMaintenancePlansForBeginnersKoprowskiT_HUG-MSSQL_AdHocMaintenancePlansForBeginners
KoprowskiT_HUG-MSSQL_AdHocMaintenancePlansForBeginners
 
SQL Server 2016 BI updates
SQL Server 2016 BI updatesSQL Server 2016 BI updates
SQL Server 2016 BI updates
 
TechEvent 2019: Oracle to PostgreSQL - a Travel Guide from Practice; Roland S...
TechEvent 2019: Oracle to PostgreSQL - a Travel Guide from Practice; Roland S...TechEvent 2019: Oracle to PostgreSQL - a Travel Guide from Practice; Roland S...
TechEvent 2019: Oracle to PostgreSQL - a Travel Guide from Practice; Roland S...
 
Optimizing Access with SQL Server
Optimizing Access with SQL ServerOptimizing Access with SQL Server
Optimizing Access with SQL Server
 
Sqlite
SqliteSqlite
Sqlite
 
FOSS4G 2017 Spatial Sql for Rookies
FOSS4G 2017 Spatial Sql for RookiesFOSS4G 2017 Spatial Sql for Rookies
FOSS4G 2017 Spatial Sql for Rookies
 
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginnersSQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
SQLSaturday#290_Kiev_WindowsAzureDatabaseForBeginners
 
Dealing with SQL Security from ADO.NET
Dealing with SQL Security from ADO.NETDealing with SQL Security from ADO.NET
Dealing with SQL Security from ADO.NET
 
Sage 300 ERP: Technical Tour of Diagnostic Tools
Sage 300 ERP: Technical Tour of Diagnostic ToolsSage 300 ERP: Technical Tour of Diagnostic Tools
Sage 300 ERP: Technical Tour of Diagnostic Tools
 
Manageability Enhancements of SQL Server 2012
Manageability Enhancements of SQL Server 2012Manageability Enhancements of SQL Server 2012
Manageability Enhancements of SQL Server 2012
 
Evolutionary database design
Evolutionary database designEvolutionary database design
Evolutionary database design
 
Java Developers, make the database work for you (NLJUG JFall 2010)
Java Developers, make the database work for you (NLJUG JFall 2010)Java Developers, make the database work for you (NLJUG JFall 2010)
Java Developers, make the database work for you (NLJUG JFall 2010)
 

Recently uploaded

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 

Recently uploaded (20)

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 

tw_242.ppt

  • 1. Technical Workshops | Esri International User Conference San Diego, California Administering Your Microsoft SQL Server Geodatabase Thomas Dunn and Shannon Shields July 25, 2012
  • 2. Topics for this presentation • News since last UC • How do I . . . - Configure SQL Server to support geodatabases? - Create databases and geodatabases? - Choose from among spatial data storage options? - Organize my data? - Control access to my data? - Make sure that my data is safe? - Improve performance? Please submit your review of this session at esri.com/ucsessionsurveys Session offering #1912 Thank you!
  • 3. ArcGIS and Microsoft changes since last year News
  • 4. Connections to Geodatabases and Databases • At 10.1 you can easily access spatial data in a database that is not a geodatabase through a regular connection (not just with Query Layers or the Data Interoperability Extension) • At 10.1, you can easily create a geodatabase in a new or existing database using GP tools
  • 5. • SQL Server 2012 - Support for SQL Server 2008 R2-level database functionality - Support for some new features coming later • Windows Azure SQL Database - Support for databases - … but not geodatabases • ArcGIS direct connections now support mirrored databases Support at 10.1 for new Microsoft database releases
  • 6. Deprecations at ArcGIS 10.1 • Multiple Database Model geodatabases - Existing geodatabases continue to work - Cannot create new MDM-GDBs - MDM-GDB will become a single database automatically (in the database named SDE) when the last table is removed from associated user databases • SQL Server 2005 - Connections can be made earlier geodatabases via pre-10.1 application server • Many command line tools are being replaced by Desktop UI and geoprocessing tools - SDESETUP is replaced by GP tool
  • 7. Common questions when working with SQL Server databases and geodatabases How do I …?
  • 8. How do I configure SQL Server to support geodatabases?
  • 9. How do I configure SQL Server to support geodatabases? • Install a supported version of SQL Server • Database Engine is the only required component • Must use Case-Insensitive (CI) collation • Can use either Windows or Mixed- mode authentication • The SQL Server Browser can be enabled but not required
  • 10. What is the SQL Native Client? • Microsoft stand-alone DLL required for connections to SQL Server - Provides support for all data types and commands - Must be installed on all client machines that connect to SQL Server • Use SQL Native Client software at least as new as the SQL Server database engine - Multiple versions may be installed side-by-side - MDAC no longer supported: use SQL Native Client
  • 11. SQL Native Client Location SNaC ArcGIS Client SQL Server giomgr SNaC App Server Connection (SDE commands) Direct Connection (SQL commands) Client Computer Server Computer
  • 12. A note about Compatibility Level • Upgrade database compatibility level after upgrading SQL Server - Sets certain database behaviors - When databases are upgraded they retain existing compatibility level • Using Geography spatial type? - Upgrade compatibility to 110 when upgrading to 2012 from 2008 or 2008R2 • Description of compatibility level differences http://msdn.microsoft.com/en-us/library/bb510680
  • 13. Points to remember • SQL Server Database Engine is only required component on the server • The SQL Native Client is required by applications that send SQL commands to SQL Server, including ArcGIS • Only Case-Insensitive collations
  • 14. How do I create databases and geodatabases?
  • 15. How do I create databases and geodatabases? • A database is a SQL Server object - There can be many per SQL Server instance • A geodatabase is an ArcGIS construct hosted in a database - One allowed in each database • Options for creating geodatabases - Use a GP tool to create a new geodatabase from scratch - Use a GP tool to create a new geodatabase in an existing database
  • 16. Choosing a geodatabase schema • DBO - Owned by the DBO built-in user - Multiple logins can be DBO, so a headless login is not needed - Easier to use Windows authentication for administrator • SDE - Owner is the database user named SDE - SDE user needs fewer permissions than DBO - No geodatabase users need to be DBO
  • 18. Points to remember • Geodatabases are ArcGIS constructs stored in databases • GP tools provide a simple way to create a geodatabase - Enterprise geodatabases are 500MB with a 125MB logfile • For more control over database storage, first create the database using SQL Server tools, then create the geodatabase • GP tool creates databases in Full Recovery mode - Change to Simple recovery if you don’t want to manage backups • Don’t rename a database that contains a geodatabase
  • 19. How do I choose from among spatial data storage options?
  • 20. How do I choose from among spatial data storage options? • All perform on par with one another • SDEBINARY has characteristics similar to Geometry, but is stored and indexed differently • Geometry and Geography can be accessed using T-SQL
  • 21. How are Microsoft Spatial Types used with ArcGIS Feature Classes? SQL Server has few restrictions on how spatial type columns are used. ArcGIS feature classes use spatial data type columns in specific ways: • Spatial type column appears in Business & Adds tables • SQL Server creates and maintains spatial index based on parameters provided by ArcGIS • All shapes in a column must have same Shape.STSrid - Controlled by check constraint created by ArcGIS and enforced with a SQL Server • All shapes must be same type (point, line, polygon)
  • 22. How does ArcGIS store non-simple shapes in Geometry or Geography? Some ArcGIS feature elements like parametric curves and point IDs are stored in a side table. • Named SDE_GEOMETRY<registration_id> • Contains rows only for each feature that has one or more of these elements • Joins to only after it contains rows
  • 23. What are the rules when using the Geography Spatial Type with ArcGIS? • Must have SRID defined in SQL Server data dictionary (SQL Server rule) • Cannot violate hemisphere rule (SQL Server 2008 rule) • Cannot have Z or M dimensions (ArcGIS rule) - For performance reasons, ArcGIS uses Well-Known Binary (WKB) interface for validating shapes (hemisphere rule) - SQL Server WKB implementation uses 1999 OCG specification for WKB, which does not support Z or M
  • 24. T-SQL Access to Geometry and Geography • Query attributes of individual features (area, length) • Perform spatial queries based on comparing shapes • Combine spatial and non-spatial attributes in queries • Leverage T-SQL spatial functions in definition queries and views • 20-minute session: Using SQL with your Geodatabase - Was held on Tuesday 8:30am.
  • 25. Points to remember • Three storage types are available: SDEBINARY, Geometry and Geography • In Geography, calculations are done using Great Ellipse line interpolation, while the others use Cartesian • SQL Server manages spatial indexes on Geometry and Geography • Microsoft spatial data types provide SQL access to spatial data
  • 26. How do I organize my data? To understand how to organize you data (and grant access to your data) you must first become familiar with the basics of the SQL Server database structure
  • 27. SQL Server Principals • Logins = Authentication - Who is logging on? • Users = Authorization - What can this person do in the database? • Schemas = Containers - What are the logical groups of database objects that should be managed as a whole?
  • 28. SQL Server Instance Schemas Tables and Views Procedures and Functions Users Schemas Tables and Views Procedures and Functions Logins Databases
  • 29. User-schema relationship • ArcGIS requires that the database user name and its default schema name are the same for users that create data - Not a SQL Server requirement • Users that are DBO all create data in the DBO schema • Data readers & editors need not have a same-named schema
  • 30. User-schema with Windows groups • A Windows group can be added as a login - Associate the login with a database user - Do not create a matching schema • For logins that will create data, SQL Server automatically creates corresponding user and schema • Recommendation: Data should be created through explicit Windows or SQL Server login - Associate login with data creator user - Restrict permission for creating data to those users - Use group logins for data readers or data editors
  • 31. How do I control access to my data? Access to SQL Server objects are managed with permissions granted to logins, users, server roles and database roles
  • 32. Limit Permissions for Most Users Data Owners Data Editors Data Readers Admin
  • 33. Sysadmin fixed-server role members are DBO in every database Who is DBO? Database owner Is DBO in single database Db_owner role members are NOT DBO Have DBO-like permissions
  • 34. Permissions needed to read, edit or create data * Needed to create multiversioned views on versioned data ** Including feature, SDEGEOMETRY, versioning and archiving support tables, if present Task Required permissions Creator CREATE TABLE, CREATE PROCEDURE and CREATE VIEW* Editor SELECT, INSERT, UPDATE and DELETE on objects** plus EXECUTE on stored procedures used to generate sequential values Reader SELECT on tables**
  • 35. Permissions needed to manage users Task Required permissions Create geodatabase user Membership in sysadmin fixed server role Create database role CREATE ROLE Compress geodatabase SDE-schema: SDE user, DBO user or member of DB_OWNERS database role DBO-schema: DBO user or member of DB_OWNERS database role Kill geodatabase connections Membership in the processadmin fixed server role, and granted VIEW DEFINITION database permission View all geodatabase users VIEW DEFINITION database permission
  • 36. Permissions needed to manage databases Task Required permissions Create enterprise geodatabase Membership in sysadmin fixed server role Upgrade geodatabase DBO user in database OR Member of DB_OWNERS fixed database role
  • 37. Password Policies • SQL Server uses Windows password policy - Password expiration rules - Complexity rules for strong passwords - Can be disabled • Security policy is set in Windows, or the domain - Policies may vary from site to site
  • 39. Points to remember • Creating a user does not give access to data in the database – it must be granted by the data owner • ArcGIS tools manage permissions on all parts of a feature class, not just the business table • Creating a user with the Create User tool will grant permissions sufficient for creating data
  • 40. How do I make sure that my data is safe? Backups are the only way to reliably protect your data
  • 41. How do I make sure that my data is safe? • Backups allow you to recover from: - Media failures - User errors - Hardware failures - Natural disasters • Also, backups can be used for: - Copying or moving data between servers - Setting up database mirroring or AlwaysOn • Use BACKUP command or Backup task in Management Studio
  • 42. Points to remember Backups are the only way to reliably protect your data 1. Decide how much time you can afford to lose when disaster strikes and data must be restored 2. Create a restore plan that will achieve that goal 3. Create a backup plan that supports your restore plan 4. Implement your plan 5. Test your recovery plan regularly by using real backup media to restore to a development system
  • 43. How can I improve performance?
  • 44. Common Performance Tuning Objectives • Improve spatial query performance • Improve Query Layer or spatial view performance • Improve overall geodatabase performance
  • 45. Demo Performance Tuning Tune a spatial index Prototype a query Maintain a geodatabase
  • 46. • Spatial Index pitfalls - Gigantic extent - Improper tessellation settings • Tune queries beforehand - Prototype, trace, examine execution plan • Query Layers and spatial views - Simple is better (and faster) • Perform geodatabase maintenance - Compress regularly - Update index statistics - Revisit workflows Points to remember
  • 47. Related Demo Theater Presentations These Demo Theater presentations start in a few minutes • Working with Microsoft SQL Server Express Geodatabases - Demo Theater, Hall C, Wednesday 7/25 from 12:00 to 12:30 • Using Microsoft SQL Server Profiler to Troubleshoot - Demo Theater, Hall C, Wednesday 7/25 from 12:30 to 1:00 Please submit your review of this session at esri.com/ucsessionsurveys Session offering #1912 Thank you!
  • 48. Steps to evaluate UC sessions • My UC Homepage > “Evaluate Sessions” • Choose session from planner OR • Search for session This is Session #1912 www.esri.com/ucsurveysessions