Table of Contents

Open all
Close all
Preface
17
Who Should Read This Book?
17
Structure of This Book
18
Acknowledgments
21
1 Architecture of the SAP HANA Database
23
1.1 The Basics
23
1.2 The Physical View: SAP HANA Servers
26
1.2.1 Data and Processing Layer
27
1.2.2 Persistence Layer
28
1.2.3 Network Layer
29
1.3 The Operating System View: Database Processes
29
1.3.1 System Start
30
1.3.2 Core Database Processes
31
1.3.3 SAP HANA Auxiliary Processes
34
1.3.4 Further Auxiliary Processes
35
1.4 The Logical View: Internal Architecture of the Database
36
1.4.1 Index Server Architecture
37
1.4.2 XS Server Architecture
40
1.5 Distributed SAP HANA Systems
41
1.5.1 The Name Server in Distributed Systems
43
1.5.2 Distributed Index Servers: Data and Query Distribution
44
1.5.3 Distributed Persistence
45
1.6 The Appliance Concept of SAP HANA
46
1.6.1 SAP HANA Appliance Offerings
46
1.6.2 Tailored Data Center Integration
49
1.6.3 Hosting and Cloud Offerings
50
1.6.4 Generic Deployment Considerations
51
1.7 Release Cycles of SAP HANA Database Software
53
1.7.1 Support Package Stacks
54
1.7.2 Revisions
54
1.8 Summary
55
2 SAP HANA Scenarios: Administration Considerations
57
2.1 SAP HANA as a Database in Application Servers
58
2.1.1 SAP HANA Accelerators for SAP Applications
59
2.1.2 SAP HANA as the Primary Database for SAP BW Systems
60
2.1.3 SAP HANA as the Primary Database for SAP Business Suite
62
2.2 SAP HANA as a Development Platform
64
2.2.1 Data Marts with SAP HANA (Standalone Implementation)
65
2.2.2 Applications in SAP HANA
68
2.3 Mixed Scenarios
68
2.3.1 SAP HANA Representations of SAP BW Models
70
2.3.2 Consumption of SAP HANA Models through the SAP BW Layer
72
2.4 Summary
73
3 Installation and Updates
75
3.1 Preparing for Installation and Updates
75
3.1.1 Skill Set
75
3.1.2 Server Hardware
76
3.1.3 Operating System
76
3.1.4 File System Setup
80
3.2 Tools for Installing and Updating SAP HANA Systems
85
3.2.1 Installation Tools
86
3.2.2 Update Tools
87
3.3 Installing an SAP HANA Database
88
3.3.1 Downloading and Preparing the Software
88
3.3.2 Running the Installation Tool
91
3.4 Updating an SAP HANA Database
101
3.4.1 Prerequisites
102
3.4.2 Steps in an Update
106
3.4.3 Running the Update Tool
107
3.5 Installing Multiple Instances of an SAP HANA Database on the Same Physical Server (Nonproduction)
110
3.6 Installation and Update in Batch Mode
111
3.6.1 Password Treatment
112
3.6.2 Preparing the Configuration File
114
3.6.3 Performing the Installation
114
3.6.4 Performing the Update
115
3.7 Installing and Updating Scale-Out Systems
116
3.7.1 Preparation
116
3.7.2 Installing a Scale-Out System with hdblcmgui
117
3.7.3 Updating a Scale-Out System
119
3.8 Troubleshooting
119
3.8.1 Log Files of hdblcm
119
3.8.2 Useful Tests on the Command Line
120
3.9 Summary
121
4 Administration Tools
123
4.1 Introduction to SAP HANA Studio
124
4.1.1 Your First Contact with SAP HANA Studio
124
4.1.2 Connecting to SAP HANA Database Systems
127
4.1.3 Principles of Working with SAP HANA Studio
131
4.2 Database Administration with SAP HANA Studio
135
4.2.1 Managing the Database Configuration
136
4.2.2 Starting and Stopping the Database
140
4.2.3 Starting and Stopping Individual Database Processes
144
4.3 Monitoring the Database with SAP HANA Studio
144
4.3.1 Getting an Overview of the Database System
145
4.3.2 Monitoring Views in the Administration Editor
148
4.3.3 The Statistics Service
149
4.3.4 Other System Monitors
152
4.4 DBA Cockpit for SAP HANA
153
4.5 Summary
156
5 The Persistence Layer
157
5.1 Log and Data Volumes: The Data Image on Disk
158
5.1.1 Memory and Disk
159
5.1.2 Page Management
161
5.1.3 Transaction Logs
161
5.1.4 Data Volumes and the Savepoint Operation
174
5.1.5 System Start Procedure
184
5.2 Log Backup
186
5.2.1 Log Backup Procedure
187
5.2.2 Enabling Log Backups
188
5.2.3 Managing Log Backups
188
5.3 Snapshots
189
5.3.1 The Purpose of Snapshots
190
5.3.2 Lifecycle of a Snapshot
190
5.3.3 Creating a Database Snapshot in SAP HANA Studio
193
5.3.4 Recovering the Database from a Snapshot
195
5.3.5 SQL Syntax for Managing Database Snapshots
198
5.4 Data Backup and Recovery of the SAP HANA Database
199
5.4.1 Supported Backup Mechanisms
199
5.4.2 Properties of Data Backups in SAP HANA
201
5.4.3 Creating Data Backups
205
5.4.4 Concepts of Database Recovery
209
5.4.5 Recovering the Database
213
5.4.6 Technical Recovery Scenarios
221
5.4.7 Copying an SAP HANA System Using Database Backups
222
5.4.8 Managing Backups: The Backup Catalog
228
5.4.9 Sizing the Backup Storage
232
5.4.10 SQL Syntax for Database Backups
233
5.4.11 Relevant System Views and Parameters for Backups
235
5.5 Disaster Recovery Setups and System Replication
236
5.5.1 Storage Replication
239
5.5.2 System Replication
239
5.6 Summary
254
6 Scale-Out Systems and High Availability
255
6.1 Scaling Out SAP HANA Systems
256
6.1.1 The Different Nodes of a Scale-Out System
257
6.1.2 The Master Name Server Concept
259
6.1.3 Distributed Persistence
260
6.1.4 Adding Hosts to a Scale-Out System
262
6.1.5 Removing Hosts
265
6.2 High Availability with Host Autofailover
268
6.2.1 Failover Groups
269
6.2.2 Host Failover
271
6.2.3 Failback
272
6.3 Client Connect in Distributed Systems
273
6.4 Summary
274
7 Objects
275
7.1 Common Properties of Database Objects
276
7.1.1 The Database Catalog
276
7.1.2 Object Naming and Identifiers
278
7.1.3 Users, Schemas, Object Ownership, and Dependencies
279
7.1.4 Object Definition
288
7.1.5 System Limits
289
7.2 Tables
290
7.3 Triggers and Constraints
292
7.3.1 Triggers
292
7.3.2 Constraints
293
7.4 SQL Views
295
7.4.1 View Dependencies
299
7.4.2 Performance of SQL Views
300
7.4.3 Changing Data through SQL Views
302
7.5 Column Views
302
7.6 Sequences
305
7.7 Procedures and Functions
312
7.8 Synonyms
313
7.9 Summary
315
8 Table Types
317
8.1 Common Properties of All Tables
318
8.2 Row Store Tables
319
8.2.1 Properties in SAP HANA
320
8.2.2 Multiversion Concurrency Control
322
8.2.3 Indexes
323
8.3 Column Store Tables
324
8.3.1 Data Storage and Retrieval
324
8.3.2 Changing Data: Inserts, Updates, and Deletes
329
8.3.3 Redo Logging and the Delta Store
330
8.3.4 Data Compression
332
8.3.5 Space Usage and Internal Columns
333
8.3.6 Indexes
335
8.3.7 Multiversion Concurrency Control
338
8.4 Special Types of Tables
338
8.4.1 Flexible Schema Tables
339
8.4.2 Temporary Tables
341
8.4.3 History Tables
343
8.4.4 Special Table DUMMY
344
8.5 Summary
345
9 Working with Tables
347
9.1 Loading Tables to and from Memory
347
9.1.1 Loading and Unloading of Columns
348
9.1.2 Reload of Tables
351
9.1.3 Large Object (LOB) Columns
352
9.1.4 Paged Attributes
353
9.1.5 Hot/Cold Data Aging Concept
354
9.2 Running Delta Merges
356
9.2.1 Automerge
358
9.2.2 Memory Merge
362
9.2.3 Smart Merge
363
9.2.4 Hard and Forced Merge
364
9.2.5 Critical Merge
365
9.3 Partitioning and Distributing Tables
365
9.3.1 Round-Robin Partitioning
366
9.3.2 Hash Partitioning
367
9.3.3 Range Partitioning
370
9.3.4 Multilevel Partitioning
371
9.3.5 Partition Pruning
371
9.3.6 Repartitioning
377
9.3.7 Colocated Partitions and Table Replicas
378
9.4 Optimizing Table Distribution and Partitioning
381
9.5 Importing and Exporting Tables
395
9.5.1 Exporting Data
395
9.5.2 Importing Data
401
9.5.3 Custom Excel File Import
403
9.6 Checking Tables for Consistency
409
9.7 Summary
411
10 Sessions and Transactions
413
10.1 Introduction to Sessions and Transactions
413
10.1.1 Lifetime of a Session
417
10.1.2 The Session Context
424
10.2 Processes and Threads
428
10.2.1 Sessions Running in Threads
431
10.2.2 Stopping Processes and Threads
438
10.2.3 Canceling a Running SQL Command
440
10.2.4 Killing a Session
443
10.2.5 Problems with Session Cancellation
443
10.3 Monitoring Sessions and Transactions
445
10.3.1 Using the Session Monitor
445
10.3.2 Using the Monitoring Views via SQL
447
10.4 Concurrency and Parallelism
451
10.4.1 Types of Parallelism
451
10.4.2 Locks and Blocking
452
10.4.3 Timeouts
457
10.4.4 Multiversion Concurrency Control
458
10.5 Summary
465
11 Working with the Repository
467
11.1 Properties of the SAP HANA Repository
467
11.1.1 Accessing the Repository
467
11.1.2 The Package Structure of the Repository
471
11.1.3 Repository Content
475
11.1.4 The Persistence of the Repository within the Database
476
11.1.5 Ownership of Repository Objects
477
11.2 Creating and Editing Objects in SAP HANA Studio
477
11.2.1 Setting up a Development Project
478
11.2.2 Creating Objects in the Developer Workbench
482
11.2.3 Checking Out a Project
484
11.2.4 Concurrent Development
485
11.3 Deleting Development Objects in SAP HANA Studio
486
11.3.1 Deleting Objects from the Systems View in SAP HANA Studio
487
11.3.2 Deleting Objects from a Development Project
487
11.4 Mechanisms for Exporting and Importing Objects
488
11.4.1 Developer-Mode Export and Import
488
11.4.2 Delivery-Unit Export and Import
489
11.5 Change Recording and Transports
491
11.5.1 Change Recording
492
11.5.2 Transporting with the SAP HANA Application Lifecycle Manager
493
11.6 Summary
494
12 User Management and Security
497
12.1 Essential Security-Related Concepts
498
12.1.1 Object Ownership
498
12.1.2 Stored Procedures in Definer Mode
498
12.2 Database Users
498
12.2.1 Creating Database Users
499
12.2.2 Modifying Database Users
503
12.2.3 Deactivating and Locking Users
504
12.2.4 Dropping Database Users
506
12.2.5 Built-in Database Users
513
12.2.6 Restricted Users
515
12.3 Authentication Methods
516
12.3.1 Name/Password Authentication
516
12.3.2 Single Sign-On with Kerberos Authentication
520
12.3.3 Further Authentication Methods
523
12.3.4 Enabling Multiple Authentication Methods for One User
524
12.4 Securing SAP HANA’s Network Interfaces
525
12.4.1 External Network Connections to an SAP HANA System
525
12.4.2 Encrypting External Network Connections
530
12.4.3 Internal Network Connections
532
12.5 Auditing in the Database
534
12.5.1 Global Audit Settings
535
12.5.2 Audit Policies
536
12.5.3 Principles of Auditing in SAP HANA
538
12.6 Summary
541
13 Roles and Privileges
543
13.1 Database Roles
543
13.1.1 Catalog Roles
544
13.1.2 Repository Roles
546
13.1.3 Catalog Roles vs. Repository Roles
552
13.2 Privileges in the Database Catalog and Repository
553
13.2.1 Privileges Managed in the Catalog of SAP HANA
553
13.2.2 Privileges Managed in the Repository of SAP HANA
559
13.3 Types of Privileges in SAP HANA
560
13.3.1 System Privileges
560
13.3.2 Object Privileges
561
13.3.3 Schema Privileges
563
13.3.4 Package Privileges
564
13.3.5 Analytic Privileges
566
13.3.6 Application Privileges
569
13.3.7 Easing Your Mind
570
13.4 Critical Privileges and Privilege Combinations
570
13.4.1 Critical System Privileges
571
13.4.2 Critical Privilege Combinations
573
13.5 Standard Roles for SAP HANA Systems
575
13.6 Troubleshooting Authorization Issues
575
13.6.1 Finding Information on Granted Privileges and Roles
575
13.6.2 Tracing Missing Authorizations
581
13.7 Summary
587
14 Planning and Setting Up an SAP HANA System Landscape
589
14.1 Preparation: Sizing, Hardware Choices, and More
590
14.1.1 System Sizing for SAP HANA
590
14.1.2 Hardware Choices
599
14.2 Planning the System Landscape
601
14.2.1 Choosing SAP HANA Deployment Options
603
14.2.2 Application Deployment Options
605
14.2.3 Preparing for Business Continuity Requirements
608
14.2.4 Content Transport
614
14.3 Bootstrapping the System
615
14.3.1 Preparing the Operating System
616
14.3.2 Preparing the System for Role and User Management
618
14.3.3 Creating Database Administrators and Performing Initial Administration
623
14.3.4 Setting Up Initial Security
626
14.3.5 Configuring the System
629
14.3.6 Setting Up the Development Platform
632
14.3.7 Preparing for Support Cases
637
14.3.8 Final Steps
638
14.3.9 Propagating Roles from Development to Other Landscape Tiers
638
14.4 Summary
638
15 Tools for Performance Analysis
639
15.1 Load Diagram
639
15.2 Alerts Tab
642
15.3 Expensive Statements Trace
642
15.4 EXPLAIN PLAN
644
15.5 PlanViz
645
15.5.1 PlanViz Example
646
15.5.2 Analyzing Joins with PlanViz
660
15.6 Further Resources
668
15.7 Summary
669
16 Monitoring and Root-Cause Analysis
671
16.1 Monitoring
671
16.1.1 Monitoring Views
672
16.1.2 Alerting
674
16.1.3 External Monitoring Tools
674
16.2 Error Messages
675
16.2.1 Locating Error Messages
676
16.2.2 Interpreting Error Messages
680
16.3 Diagnostic Files
681
16.3.1 Dump Files
681
16.3.2 Trace Files
683
16.3.3 Collecting Diagnostic Files for a Support Incident
686
16.3.4 Using the Merged Diagnosis Files Editor
687
16.4 Server Side Traces
692
16.4.1 Database Trace and User-Specific Trace
694
16.4.2 End-to-End Trace
696
16.4.3 Expensive Statements Trace
696
16.4.4 SQL Trace
699
16.4.5 Performance Trace
700
16.4.6 Kernel Profiler Trace
701
16.5 Client-Side Traces
701
16.5.1 JDBC Trace
701
16.5.2 The ODBC Trace
704
16.5.3 SQLDBC Trace
705
16.5.4 The ODBO/MDX Trace
706
16.6 Summary
706
The Authors
709
Index
711