38
花木敏久 [email protected] SAPジャパン株式会社 db tech showacase Osaka 2014 詳解】インメモリーデータベース SAP HANA永続化の仕組みと障害/災害対応を踏まえた運用を理解しよう!

[B25] 【詳解】インメモリーデータベース SAP HANA:永続化の仕組みと障害/災害対応を踏まえた運用を理解しよう!by Toshihisa Hanaki

Embed Size (px)

DESCRIPTION

 

Citation preview

  • 1. [email protected] SAP db tech showacase Osaka 2014 SAP HANA
  • 2. 2013 SAP AG or an SAP affiliate company. All rights reserved. 2 SAPSAP SAP SAP SAP SAP
  • 3. 2013 SAP AG or an SAP affiliate company. All rights reserved. 3 SAP HANA
  • 4. 2013 SAP AG or an SAP affiliate company. All rights reserved. 4 OLTP DB() SAP HANA()() Order Country Product Sales 456 France corn 1000 457 Italy wheat 900 458 Italy corn 600 459 Spain rice 800 SAP HANA & 456 France corn 1000 457 Italy wheat 900 458 Italy corn 600 459 Spain rice 800 456 457 458 459 France Italy Italy Spain corn wheat corn rice 1000 900 600 800 : SELECT * FROM SalesOrders WHERE Order = 457 SQL : SELECT Country, SUM(sales) FROM SalesOrders WHERE Product=corn GROUP BY Country
  • 5. 2013 SAP AG or an SAP affiliate company. All rights reserved. 5 Order Country Product Sales 456 France corn 1000 457 Italy wheat 900 458 Spain rice 600 459 Italy rice 800 460 Denmark corn 500 461 Denmark rice 600 462 Belgium rice 600 463 Italy rice 1100 SAP HANA Dictionary/Value-ID ) 1 Belgium 2 Denmark 3 France 4 Italy 5 Spain 1 3 2 4 3 5 4 4 5 2 6 2 7 1 8 4 1 7 2 5,6 3 1 4 2,4,8 5 3 Logical Table Dictionary 5 3bit Value-ID (bit fields) Inverted indexDictionary Where was order 460? Which orders in Italy?
  • 6. 2013 SAP AG or an SAP affiliate company. All rights reserved. 6 SAP HANA Order Country Product Sales 456 France corn 1000 457 Italy wheat 900 458 Spain rice 600 459 Italy rice 800 460 Denmark corn 500 461 Denmark rice 600 462 Belgium rice 600 463 Italy rice 1100 1 Belgium 2 Denmark 3 France 4 Italy 5 Spain 3 4 5 4 2x2 1 4 Logical Table Country 1 corn 2 wheat 3 rice 1 2 2x3 1 3x3 Product
  • 7. 2013 SAP AG or an SAP affiliate company. All rights reserved. 7 SAP HANA HANA DB
  • 8. 2013 SAP AG or an SAP affiliate company. All rights reserved. 8 SAP HANA Insert only & Consistent View Manager " " Insert Only " Consistent View Manager / q Read Only Read (Ins/Upd/Del Write + + + +
  • 9. 2013 SAP AG or an SAP affiliate company. All rights reserved. 9 1OLTPOLAP! Consistent View Manager DB OLTP DB In-DB
  • 10. 2013 SAP AG or an SAP affiliate company. All rights reserved. 10 SAP HANA SAP HANA SAP HANA/ (sync,syncmem,async,fullsync)
  • 11. 2013 SAP AG or an SAP affiliate company. All rights reserved. 11 SAP HANA HANA undo (Redo) Commit Commit SAP HANA 2012 SAP AG. All rights reserved. 11 Undo Data Redo
  • 12. 2013 SAP AG or an SAP affiliate company. All rights reserved. 12 Write(,)Commit () Write Write Commit Virtual File Virtual Fileredo/ undo Commit Commit Commit
  • 13. 2013 SAP AG or an SAP affiliate company. All rights reserved. 13 () Phase1 Phase1 Phase2 Phase3
  • 14. 2013 SAP AG or an SAP affiliate company. All rights reserved. 14 Data Volume o Data Volume SAP HANA 2012 SAP AG. All rights reserved. 14 Log Volume Data Volume, Log VolumeHANA
  • 15.
  • 16. 2013 SAP AG or an SAP affiliate company. All rights reserved. 16 SAP HANA/ to o o oredo / o/ oHANA Box Log Volume Data Volume SAP HANA Box 2012 SAP AG. All rights reserved. 16 Log Volume Data Volume Log Volume Data Volume Log Volume Data Volume
  • 17. 2013 SAP AG or an SAP affiliate company. All rights reserved. 17 Requirements and Options 1 2 3
  • 18. 2013 SAP AG or an SAP affiliate company. All rights reserved. 18 Server1 Server2 Server3 Global savepoint Global savepoint Phase2 Savepointphase2 Savepointphase2 Savepointphase2 Global savepoint Phase3 Savepoint Savepoint Savepoint
  • 19. 2013 SAP AG or an SAP affiliate company. All rights reserved. 19 Server1 Server2 Server3 Savepoint Savepoint Backup Executorsavepoint Savepoint savepoint savepoint savepoint Backup
  • 20. 2013 SAP AG or an SAP affiliate company. All rights reserved. 20 SAP HANA/ o oHANA o o oData + Log oData o SAP HANA Box 2012 SAP AG. All rights reserved. 20 Log Volume Data Volume Log Volume Data Volume Log Volume Data Volume Data Volume Log Volume
  • 21.
  • 22. 2013 SAP AG or an SAP affiliate company. All rights reserved. 22 Distributed system 1 DB 3 RPO
  • 23. 2013 SAP AG or an SAP affiliate company. All rights reserved. 23 HANA 1 Data/Log N+1 Data/Log
  • 24. 2013 SAP AG or an SAP affiliate company. All rights reserved. 24
  • 25. 2013 SAP AG or an SAP affiliate company. All rights reserved. 25
  • 26. 2013 SAP AG or an SAP affiliate company. All rights reserved. 26 HANADB HP ServiceGuard SUSE Cluster SAP Landscape Virtualization Manager ~
  • 27. 2013 SAP AG or an SAP affiliate company. All rights reserved. 27 Syncronous FullSync ( - Syncronous in memory - Asyncronous -
  • 28. 2013 SAP AG or an SAP affiliate company. All rights reserved. 28 Syncronous with Full Sync option SR_REGISTER SYNC(Full Sync) global.ini/[system_replication]/enable_full_sync = true. hdbnsutil -sr_fullsync [--enable|--disable]
  • 29. 2013 SAP AG or an SAP affiliate company. All rights reserved. 29 Syncronous SR_REGISTER SYNC (logshipping_timeout=30)
  • 30. 2013 SAP AG or an SAP affiliate company. All rights reserved. 30 Syncronous in Memory SR_REGISTER SYNCMEM ack (logshipping_timeout=30)
  • 31. 2013 SAP AG or an SAP affiliate company. All rights reserved. 31 Asyncronous SR_REGISTER ASYNC index server Indexserver.ini/[system_replication]/logshipping_async_buffer size = 67108864 global.ini/[system_replication]/logshipping_async_wait_on_buffer_full = true
  • 32. 2013 SAP AG or an SAP affiliate company. All rights reserved. 32 SAP HANA Campus cluster Metro cluster Geo cluster Cascading Systems First 1:n relation 1:1 ASYNC 1:1 SYNC
  • 33. 2013 SAP AG or an SAP affiliate company. All rights reserved. 33 Extended HA and DR Configurations Cascading Systems Chained Setups with pure System Replication Production Local standby Remote standby systems Planned for SAP HANA (Cascading Systems with SPS7) Campus cluster Metro cluster Geo cluster Sync Async Sync RPO 0 RTO < 30 min
  • 34.
  • 35. 2013 SAP AG or an SAP affiliate company. All rights reserved. 35 HP Disaster Tolerant solution Normal Operation Step 1: log file write (example) Step 2: write to remote array (Continuous Access) Step 3: remote write confirmed Step 4: write complete End State: primary and remote databases are in current and consistent state 1 3 4
  • 36. 2013 SAP AG or an SAP affiliate company. All rights reserved. 36 HP Disaster Tolerant Solution Recovery Mode Step 1: system administrator determines that failure has occurred and initiates failover steps Step 2: Storage Management Server used to change state of remote disk array to permit read/write access Step 3: StoreAll 9300 gateways are booted/ rebooted to present shared storage to HANA nodes Step 4: HANA nodes are booted/rebooted to restart database End State: HANA database performs scripted recovery and begins normal operation 1 2 3 4
  • 37. 2013 SAP AG or an SAP affiliate company. All rights reserved. 37 SAPHanaSQL Server 2014Oracle HP2020 S/W S/WH/W Software (Database System) Perspective Hardware Perspective Future Technology SAP HANA [CORE TECH] Hardware 620 D35 16:00-16:50 [CORE TECH] Hardware HDD 620 A34 15:00-15:50
  • 38. 2013 SAP AG or an SAP affiliate company. All rights reserved. 38 SAP HANA SAP HANA SPS08 SAP ForumAuto Forum n SAP Forurm u 711 u 723 n Auto Forum u 729