HANA SPS07 SQL Script

20
What´s New? SAP HANA SPS 07 SQLScript (Delta from SPS 06 to SPS 07) SAP HANA Product Management November, 2013

description

What´s New? SAP HANA SPS 07 - SQLScript

Transcript of HANA SPS07 SQL Script

Page 1: HANA SPS07 SQL Script

What´s New? SAP HANA SPS 07 SQLScript(Delta from SPS 06 to SPS 07)SAP HANA Product Management November, 2013

Page 2: HANA SPS07 SQL Script

© 2013 SAP AG. All rights reserved. 2Public

Agenda

SQLScript Editor

SQLScript Debugger

SQLScript Language

User Defined Functions

Page 3: HANA SPS07 SQL Script

SQLScript Editor

Page 4: HANA SPS07 SQL Script

© 2013 SAP AG. All rights reserved. 4Public

SQLScript Editor

Procedure wizardNew artifact hierarchyRenamed to “Stored Procedure”

Page 5: HANA SPS07 SQL Script

© 2013 SAP AG. All rights reserved. 5Public

SQLScript Editor

Two file formats.hdbprocedure is the new artifact type which will be the recommended file format moving forward..procedure is still supported, but has been deprecated and eventually will be removed.Procedure templates are still supported but currently only via .procedure format.

Page 6: HANA SPS07 SQL Script

© 2013 SAP AG. All rights reserved. 6Public

SQLScript Editor

Source Code Editor for .hdbprocedureCREATE keyword is now removedExplicit schema definitionPackage/procedure name separator is now double colon(::)No local table types definition. Use CDS(.hdbdd) to define global table types

Page 7: HANA SPS07 SQL Script

© 2013 SAP AG. All rights reserved. 7Public

SQLScript Editor

SQLScript ViewerProcedures in the catalog can now be viewed in the SQLScript editor in read-only mode.Allows for setting/removing of breakpoints within the runtime object.

Page 8: HANA SPS07 SQL Script

SQLScript Debugger

Page 9: HANA SPS07 SQL Script

© 2013 SAP AG. All rights reserved. 9Public

SQLScript Debugger

Debug catalog proceduresDebug configuration now allows for debugging of both design time(repository) and run-time(catalog) proceduresOpen the run-time procedure from the catalog and set breakpointsWithin the debug configuration, choose

Page 10: HANA SPS07 SQL Script

© 2013 SAP AG. All rights reserved. 10Public

SQLScript Debugger

New Debugging Authorization ConceptPrior to SPS 07, users were allowed to debug everything by simply having authorization to SYS.DEBUG, this authorization is no longer required in SPS 07Restricts the ability to debug procedures which are owned by other users. You can grant debug access for a procedure or for an entire schema to a specific user.

With the following authorizations, users can set breakpoints, show procedure source in debugger UI, and inspect intermediate results.

Grant debug on <proc> to <user>Grant debug on schema <schema> to <user>

Without these authorizations, the procedures are handled like a black box.Restricts the ability to attach debugger to running session. You can grant debug access for attaching to running session to a specific user.

With the following authorizations, users can freeze execution of another user, and see data from another user.Grant attach debugger to <user>

Page 11: HANA SPS07 SQL Script

© 2013 SAP AG. All rights reserved. 11Public

SQLScript Debugger

New Debugging Authorization ConceptProcedures created directly in the catalog are owned by the user which created them, so no additional authorization is required to debug them.Procedures created/activated via the repository(Development Perspective) are owned by _SYS_REPO, therefore the user must grant debug authorization to himself. Users can not execute the “grant” statements directly. The following procedures could be used if the user has authorization to these procedures.

Call _SYS_REPO.GRANT_PRIVILEGE_ON_ACTIVATED_CONTENT('debug','<objectname>','<username>'); Call _SYS_REPO.GRANT_SCHEMA_PRIVILEGE_ON_ACTIVATED_CONTENT('debug','<schemaname>','<username>');

Usually, users will not have authorization to these procedures, so it is recommended to add these authorizations via a role(.hdbrole) as shown below.

role I816013.testing.roles::debug { schema I816013.testing.data:I816013_TEST.hdbschema: DEBUG, EXECUTE; // grant debug to schema sql object I816013.testing.procedures:get_product_sale_price.hdbprocedure: DEBUG, EXECUTE; // grant debug to procedure

}

Page 12: HANA SPS07 SQL Script

SQLScript Language

Page 13: HANA SPS07 SQL Script

© 2013 SAP AG. All rights reserved. 13Public

Various Optimizations

SQLScript Language

Page 14: HANA SPS07 SQL Script

User Defined Functions

Page 15: HANA SPS07 SQL Script

© 2013 SAP AG. All rights reserved. 15Public

User Defined Functions

Scalar FunctionsNew repository artifact(.hdbscalarfunction) and wizardSimple text editor, syntax highlighting and code hints coming in a future support package.

Page 16: HANA SPS07 SQL Script

© 2013 SAP AG. All rights reserved. 16Public

User Defined Functions

Table FunctionsNew repository artifact(.hdbtablefunction) and wizardSimple text editor, syntax highlighting and code hints coming in a future support package.

Page 17: HANA SPS07 SQL Script

© 2013 SAP AG. All rights reserved. 17Public

Disclaimer

This presentation outlines our general product direction and should not be relied on in making a purchase decision. This presentation is not subject to your license agreement or any other agreement with SAP.

SAP has no obligation to pursue any course of business outlined in this presentation or to develop or release any functionality mentioned in this presentation. This presentation and SAP’s strategy and possible future developments are subject to change and may be changed by SAP at any time for any reason without notice.

This document is provided without a warranty of any kind, either express or implied, including but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement. SAP assumes no responsibility for errors or omissions in this document, except if such damages were caused by SAP intentionally or grossly negligent.

Page 18: HANA SPS07 SQL Script

Thank youContact information

Rich HeilmanSAP HANA Product [email protected]

To get the best overview of what’s new in SAP HANA SPS 07, read this blog.

Page 19: HANA SPS07 SQL Script

© 2013 SAP AG. All rights reserved. 19Public

© 2013 SAP AG. 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 AG. The information contained herein may be changed without prior notice.

Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.

National product specifications may vary.

These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group 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.

SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries. Please see http://www.sap.com/corporate-en/legal/copyright/index.epx#trademark for additional trademark information and notices.

Page 20: HANA SPS07 SQL Script

© 2013 SAP AG. All rights reserved. 20Public

© 2013 SAP AG. Alle Rechte vorbehalten.

Weitergabe und Vervielfältigung dieser Publikation oder von Teilen daraus sind, zu welchem Zweck und in welcher Form auch immer, ohne die ausdrückliche schriftliche Genehmigung durch SAP AG nicht gestattet. In dieser Publikation enthaltene Informationen können ohne vorherige Ankündigung geändert werden.

Einige der von der SAP AG und ihren Distributoren vermarkteten Softwareprodukte enthalten proprietäre Softwarekomponenten anderer Softwareanbieter.

Produkte können länderspezifische Unterschiede aufweisen.

Die vorliegenden Unterlagen werden von der SAP AG und ihren Konzernunternehmen („SAP-Konzern“) bereitgestellt und dienen ausschließlich zu Informationszwecken. Der SAP-Konzern übernimmt keinerlei Haftung oder Gewährleistung für Fehler oder Unvollständigkeiten in dieser Publikation. Der SAP-Konzern steht lediglich für Produkte und Dienstleistungen nach der Maßgabe ein, die in der Vereinbarung über die jeweiligen Produkte und Dienstleistungen ausdrücklich geregelt ist. Keine der hierin enthaltenen Informationen ist als zusätzliche Garantie zu interpretieren.

SAP und andere in diesem Dokument erwähnte Produkte und Dienstleistungen von SAP sowie die dazugehörigen Logos sind Marken oder eingetragene Marken der SAP AG in Deutschland und verschiedenen anderen Ländern weltweit. Weitere Hinweise und Informationen zum Markenrecht finden Sie unter http://www.sap.com/corporate-en/legal/copyright/index.epx#trademark.