Week 2 Unit 3: Creating a JDBC Application. January, 2015

Similar documents
Week 2 Unit 1: Introduction and First Steps with EJB. January, 2015

HA215 SAP HANA Monitoring and Performance Analysis

HA301. SAP HANA 2.0 SPS03 - Advanced Modeling COURSE OUTLINE. Course Version: 15 Course Duration:

HA100 SAP HANA Introduction

HA355. SAP HANA Smart Data Integration COURSE OUTLINE. Course Version: 12 Course Duration: 3 Day(s)

Device Operation Process Diagrams. SAP Mobile Secure rapid-deployment solution September 2014

HA150 SQL Basics for SAP HANA

HA215 SAP HANA Monitoring and Performance Analysis

HA150. SAP HANA 2.0 SPS02 - SQL and SQLScript for SAP HANA COURSE OUTLINE. Course Version: 14 Course Duration: 3 Day(s)

C4C30. SAP Cloud Applications Studio COURSE OUTLINE. Course Version: 21 Course Duration: 4 Day(s)

BC404. ABAP Programming in Eclipse COURSE OUTLINE. Course Version: 16 Course Duration: 3 Day(s)

BC414. Programming Database Updates COURSE OUTLINE. Course Version: 15 Course Duration: 2 Day(s)

CLD100. Cloud for SAP COURSE OUTLINE. Course Version: 16 Course Duration: 2 Day(s)

DS10. Data Services - Platform and Transforms COURSE OUTLINE. Course Version: 15 Course Duration: 3 Day(s)

Complementary Demo Guide

SLT100. Real Time Replication with SAP LT Replication Server COURSE OUTLINE. Course Version: 13 Course Duration: 3 Day(s)

BC403 Advanced ABAP Debugging

S4H01. Introduction to SAP S/4HANA COURSE OUTLINE. Course Version: 04 Course Duration: 2 Day(s)

D75AW. Delta ABAP Workbench SAP NetWeaver 7.0 to SAP NetWeaver 7.51 COURSE OUTLINE. Course Version: 18 Course Duration:

FAQs OData Services SAP Hybris Cloud for Customer PUBLIC

Device Application Onboarding Process Diagrams. SAP Mobile Secure: SAP Afaria 7 SP5 September 2014

CA611 Testing with ecatt

UX402 SAP SAPUI5 Development

ADM506. Database Administration Oracle II COURSE OUTLINE. Course Version: 15 Course Duration: 2 Day(s)

HA300 SAP HANA Modeling

HA150. SAP HANA 2.0 SPS03 - SQL and SQLScript for SAP HANA COURSE OUTLINE. Course Version: 15 Course Duration:

BOD410 SAP Lumira 2.0 Designer

UX400. OpenUI5 Development Foundations COURSE OUTLINE. Course Version: 02 Course Duration: 5 Day(s)

HA300 SAP HANA Modeling

ADM505. Oracle Database Administration COURSE OUTLINE. Course Version: 15 Course Duration: 3 Day(s)

HA 450. Application Development for SAP HANA COURSE OUTLINE. Course Version: 12 Course Duration:

S4H410. SAP S/4HANA Embedded Analytics and Modeling with Core Data Services (CDS) Views COURSE OUTLINE. Course Version: 05 Course Duration: 2 Day(s)

FAQs Data Sources SAP Hybris Cloud for Customer PUBLIC

HA240 Authorization, Security and Scenarios

HA100 SAP HANA Introduction

S4D430 Building Views in Core Data Services ABAP (CDS ABAP)

SAP EarlyWatch Alert. SAP HANA Deployment Best Practices Active Global Support, SAP AG 2015

HA400 ABAP Programming for SAP HANA

HA100 SAP HANA Introduction

Let s Exploit DITA: How to automate an App Catalog

BW405. BW/4HANA Query Design and Analysis COURSE OUTLINE. Course Version: 14 Course Duration: 5 Day(s)

SAP Analytics Cloud model maintenance Restoring invalid model data caused by hierarchy conflicts

MDG100 Master Data Governance

HA240 SAP HANA 2.0 SPS02

BC405 Programming ABAP Reports

TADM51. SAP NetWeaver AS - DB Operation (Oracle) COURSE OUTLINE. Course Version: 15 Course Duration: 5 Day(s)

BOCRC. SAP Crystal Reports Compact Course COURSE OUTLINE. Course Version: 15 Course Duration: 3 Day(s)

BC470. Form Printing with SAP Smart Forms COURSE OUTLINE. Course Version: 18 Course Duration:

BC401. ABAP Objects COURSE OUTLINE. Course Version: 18 Course Duration:

BW305H. Query Design and Analysis with SAP Business Warehouse Powered by SAP HANA COURSE OUTLINE. Course Version: 15 Course Duration: 5 Day(s)

BW350H. SAP BW Powered by SAP HANA - Data Acquisition COURSE OUTLINE. Course Version: 15 Course Duration: 5 Day(s)

SAP 3D Visual Enterprise 9.0: Localization of Authoring Content

BW462 SAP BW/4HANA COURSE OUTLINE. Course Version: 16 Course Duration: 5 Day(s)

ADM110. Installing and Patching SAP S/4HANA and SAP Business Suite Systems COURSE OUTLINE. Course Version: 17 Course Duration: 4 Day(s)

UX300 SAP Screen Personas 3.0 Development

Device Configuration Process Diagrams. SAP Mobile Secure: SAP Afaria 7 SP5 September 2014

BW305. SAP Business Warehouse Query Design and Analysis COURSE OUTLINE. Course Version: 15 Course Duration: 5 Day(s)

ADM110. Installing and Patching SAP S/4HANA and SAP Business Suite Systems COURSE OUTLINE. Course Version: 18 Course Duration: 4 Day(s)

SAP Hybris Billing, Pricing Simulation Extended Functions Release 2.0, SP03

FAQs Data Cleansing SAP Hybris Cloud for Customer PUBLIC

DBW4H. Data Warehousing with SAP BW/4HANA - Delta from SAP BW powered by SAP HANA COURSE OUTLINE. Course Version: 13 Course Duration: 2 Day(s)

SAP HANA SPS 09 - What s New? SAP River

ADM535. DB2 LUW Administration for SAP COURSE OUTLINE. Course Version: Course Duration: 3 Day(s)

SAP Business One Integration Framework

BW310H. Data Warehousing with SAP Business Warehouse powered by SAP HANA COURSE OUTLINE. Course Version: 15 Course Duration: 5 Day(s)

FAQs Data Workbench SAP Hybris Cloud for Customer PUBLIC

Week 1 Unit 1: Introduction to Data Science

SAP HANA SPS 08 - What s New? SAP HANA Web-based Development Workbench. (Delta from SPS 07 to SPS 08) SAP HANA Product Management May, 2014

HA100 SAP HANA Introduction

SAP HANA SPS 08 - What s New? SAP HANA Modeling (Delta from SPS 07 to SPS 08) SAP HANA Product Management May, 2014

BOID10. SAP BusinessObjects Information Design Tool COURSE OUTLINE. Course Version: 17 Course Duration: 5 Day(s)

FAQs Facebook Integration with SAP Hybris Cloud for Customer SAP Hybris Cloud for Customer PUBLIC

opensap TEXT ANALYTICS WITH SAP HANA PLATFORM WEEK 1

SAP 3D Visual Enterprise 9.0: Identifiers in VDS Files

BW362. SAP BW Powered by SAP HANA COURSE OUTLINE. Course Version: 11 Course Duration: 5 Day(s)

BIT660 Data Archiving

SAP Mobile Secure Rapiddeployment. Software Requirements

SAP Cloud Platform Configuration SAP Subscription Billing

SAP HANA Cloud Integration for data services What s new in (Sept 2015) Ben Hofmans, Product Manager

SAP Global Track and Trace Onboarding Guide

An Approach for Hybrid-Memory Scaling Columnar In-Memory Databases

SAP Fiori Launchpad Process Flow. SAP Fiori UX launchpad Configuration: End to End CEG: November 2014

SAP SMS 365 SAP Messaging Proxy 365 Product Description August 2016 Version 1.0

SAP HANA SPS 08 - What s New? SAP HANA Interactive Education - SHINE (Delta from SPS 07 to SPS 08) SAP HANA Product Management May, 2014

SCM380 SAP MII - Manufacturing Integration and Intelligence Fundamentals

SAP Single Sign-On 2.0 Overview Presentation

Alert Consumption for Business Process Monitoring on MAI with SAP Solution Manager 7.1 SP12 Setup and features of notifications and incidents

SAP HANA Data Warehousing Foundation Data Distribution Optimizer / Data Life Cycle Manager DWF SP03

SAP Edge Services, cloud edition Edge Services Predictive Analytics Service Guide Version 1803

SAP HANA Operation Expert Summit PLAN - Hardware Landscapes. Addi Brosig, SAP HANA Product Management May 2014

SAP Hybris Billing, pricing simulation Application Operations Guide Release 2.0, SP03

Getting Started with FPM BOPF Integration (FBI)

COURSE LISTING. Courses Listed. Training for Database & Technology with Administration in Database Migration. 3 September 2018 (21:31 BST)

SAP Edge Services, cloud edition Persistence Service Guide Version 1802

System x Server for SAP Business One, version for SAP HANA

SAP HANA SPS 10 - What s New? Scale-Out, High Availability and Disaster Recovery

How-to Guide for Exercise Familiarize Yourself with SAP Fiori UX (Week 1, Unit 6, Part 2)

Using SAP SuccessFactors Integration Center for generating exports on Interview Central. SAP SuccessFactors Recruiting Management

SAP: Speeding GRC Control Testing by 90% with SAP Solutions for GRC

opensap: Big Data with SAP HANA Vora Course Week 03 - Exercises

Transcription:

Week 2 Unit 3: Creating a JDBC Application January, 2015

JDBC Overview Java Database Connectivity (JDBC) Java-based data access technology Defines how a client can connect, query, and update data in a database JDBC API JDBC connections support creation and execution of statements ResultSet presents the outcome after a statement has been executed 2

Why Use JDBC? Advantages of JDBC Clean and easy for small applications Good performance with large amounts of data Allows optimization of SQL requests Reuse of existing JDBC libraries (Liquibase, Hibernate) Disadvantages of JDBC Large programming overhead for large projects Concurrency support and transaction and connection management required Initial creation of database structures required 3

JDBC Sample Uses standard database access (JDBC) Needs only a Web container, so can run in both runtimes Java Web (1.x) Java EE 6 Web Profile (2.x) Java EE 6 Web Profile (2.x) or Java Web (1.x) PersistenceWithEJBServlet Person PersonDAO Web Container JDBC DB Schemas 4

JDBC Sample Import to Eclipse as Existing Projects into Workspace Location: <SDK_path>\samples\persistence-with-jdbc 5

JDBC Sample Building Blocks: Person.java holds the information for a person PersonDAO.java performs all operations with DB PersistenceWithJDBCServlet.java provides interaction with the end users and looks up the DataSource from JNDI web.xml web application descriptor; defines datasource resource 6

JDBC Sample Run the sample Run on Server Configure SAP HANA Cloud Server hanatrial.ondemand.com Request URL https://<application_name><account_name>. hanatrial.ondemand.com/persistence-withjdbc/ 7

JDBC Sample In the background: A new schema is created Schema is bound to the application When app requests data source the app gets connected to this schema Maximum 8 parallel database connections per schema When application is undeployed, the schema is not removed When application is redeployed, it uses same schema and bindings 8

How Can I See the SQL Statements Sent to the Database? SQL Trace Provides a log of selected SQL statements Relevant for both JPA and JDBC applications Integrated in the standard trace log files Disabled by default Scenarios Investigate database access-related performance issues Determine inefficient SQL statements 9

How to Enable the SQL Trace Set the log level of com.sap.core.persistence.sql.trace to DEBUG Tools: Eclipse IDE SAP HANA Cloud Platform Cockpit 10

How to Read SQL Trace Records The SQL trace is written in the default trace log file File name prefix ljs_trace_vsa Tools: Eclipse IDE SAP HANA Cloud Platform Cockpit 11

What You ve Learned in This Unit What JDBC is The advantages and disadvantages of JDBC What a persistence-enabled JDBC application looks like What happens in the background when an application is deployed and started How to trace the SQL statements performed by your application How to enable, disable, and display the SQL trace recordings 12

Contact information: open@sap.com

2014 SAP SE or an SAP affiliate company. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP SE or an SAP affiliate company. SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. Please see http://global12.sap.com/corporate-en/legal/copyright/index.epx for additional trademark information and notices. Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors. National product specifications may vary. These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind, and SAP SE or its affiliated companies shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP SE or SAP affiliate company products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty. In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or any related presentation, or to develop or release any functionality mentioned therein. This document, or any related presentation, and SAP SE s or its affiliated companies strategy and possible future developments, products, and/or platform directions and functionality are all subject to change and may be changed by SAP SE or its affiliated companies at any time for any reason without notice. The information in this document is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking statements, which speak only as of their dates, and they should not be relied upon in making purchasing decisions. 14