Sap driver что это

Обновлено: 05.07.2024

Java Database Connectivity (JDBC) provides an API for accessing databases from Java. An application written to the JDBC standard can be ported to other databases. Database vendors provide JDBC drivers for their database products.

Ensure that you have a Java Development Kit (JDK) installed and make sure it is accessible from your path. Details on which Java versions are supported can be found in SAP note 3006307 - SAP HANA Client Supported Platforms for 2.7 and Oracle Java SE Support Roadmap.

A few options include:

To verify that the JDK is correctly set up, run the following:

If these commands fail, ensure that the folder they are located in, is included in your path.

The SAP HANA driver for JDBC is a Multi-Release JAR file and as such supports multiple versions of Java. It is available in the client installation folder at C:\SAP\hdbclient\ngdbc.jar and in the maven repository.

Run the following command for version information. If needed, adjust the path to match the installation location on your machine.

Run the command again without the -v to open the configuration window, which provides driver information and the ability to set trace information:

JDBC-Driver-Trace-Config

The JDBC driver has a different version number than the rest of the SAP HANA interfaces.

The trace options are further described at JDBC Tracing and Trace Options.

Run the following and use either connection details stored in the user store or specify the connection details.

See JDBC Command-Line Connection Options for additional details on parameters of ngdbc.jar .

Step 3: Create a Java application that queries SAP HANA

The following commands create a folder named java , enter the newly created directory, create a file named JavaQuery.java , and open the file in notepad.

Substitute pico below for your preferred text editor.

Copy the following code into JavaQuery.java :

Compile the .java file into a .class file using the following command:

Run JavaQuery.class and indicate where the SAP HANA JDBC driver is located. Note that the host, port, UID and PWD will be retrieved from the hdbuserstore .

See JDBC Connection Options in Java Code for additional details on the getConnection method of the DriverManager .

See Connect to SAP HANA Cloud via JDBC for additional details on the certificate used during the connection.

Visual Studio Code provides plugins for Java and can be used to debug an application.

If you have not already done so, download Visual Studio Code.

If you have not already done so, in Visual Studio Code, choose File | Open Folder, and then select the HANAClientsTutorial folder.

Open the file JavaQuery.java , and if asked, install the recommended extensions.

Once the Java Extension Pack has been installed, expand the Java Project Explorer and click on the + icon to add the JDBC driver as a referenced library.

referenced libraries

The JDBC driver is located at C:\SAP\hdbclient\ngdbc.jar .

Place a breakpoint and then select Run | Start Debugging.

Notice that the debug view becomes active.

Notice that the program stops running at the breakpoint that was set. Step through the code by pressing F10 and observe the variable values in the variables pane.

DBeaver is a free and open source database tool and can be used with the SAP HANA JDBC driver.

The following steps demonstrate how to configure DBeaver to connect to SAP HANA Cloud or SAP HANA, express edition using the JDBC driver.

Download and install the community edition of DBeaver .

Create a new SAP HANA database connection.

New Connection

Specify the connection type and fill in the host and port.

Connection Settings

Click on Connection details to specify the connection name.

Connection Details

Click on Edit Driver Settings and choose to download the latest HANA JDBC driver.

After finishing the wizard, the catalog of the database can be viewed and SQL statements can be executed.

Query

DBeaver can also be used to create an entity relationship (ER) diagram, perform a comparison of two selected objects, execute import and export operations, view spatial data on a map, and perform data analysis with its grouping and calc panels.

Congratulations! You have now created and debugged a Java application that connects to and queries an SAP HANA database and used the JDBC driver in a third party tool.

Easily connect live SAP HANA data with Java-based BI, ETL, Reporting, & Custom Apps.

The SAP HANA JDBC Driver enables users to connect with live SAP HANA data, directly from any applications that support JDBC connectivity. Rapidly create and deploy powerful Java applications that integrate with SAP HANA databases.

Features

  • Compatible with SAP HANA Platform 2.0 SPS 03 and Document Version: 1.1
  • Connect to live SAP HANA data, for real-time data access
  • Full support for data aggregation and complex JOINs in SQL queries
  • Secure connectivity through modern cryptography, including TLS 1.2, SHA-256, ECC, etc.
  • Seamless integration with leading BI, reporting, and ETL tools and with custom applications

Specifications

  • Pure Java Type 4/5 JDBC Driver for SAP HANA with bi-directional access.
  • Write SQL, get SAP HANA data. Access SAP HANA through standard Java Database Connectivity.
  • Codeless integration with popular BI, Reporting, & ETL Tools.
  • Full Unicode support for data, parameter, & metadata.
  • Support for 32-bit and 64-bit operating systems.
  1. BI, ETL, & Reporting Tools
  2. Custom Applications
  3. Serverless & Cloud


BI, ETL, & Reporting Tool Integration

JDBC is the most widely supported interface for connecting Java-based applications with data. All kinds of BI, Reporting, ETL, Database, and Analytics tools offer the ability to read and write data via JDBC connectivity.

  • Aqua Data Studio
  • CloverDX (formerly CloverETL)
  • ColdFusion
  • Crystal Reports
  • DBeaver
  • DbVisualizer
  • FileMaker Pro
  • IBM WebSphere
  • Informatica
  • IntelliJ
  • JBoss
  • Jetty
  • NetBeans
  • Oracle Data Integrator
  • Oracle WebLogic
  • Oracle WareHouse Builder


Custom Applications

Build Java Apps That Connect To SAP HANA

Developers can use SAP HANA JDBC Driver to rapidly build Web, Desktop, and Mobile applications that interact with live data from SAP HANA.

The SAP HANA Driver has the same JDBC architecture as the JDBC drivers for MySQL and OLEDB, including Connection, Statement and ResultSet objects. Because of this you can now access SAP HANA data in an easy, familiar way. You can use the SAP HANA Driver through popular IDEs (Eclipse, IntelliJ, NetBeans, etc.), in code through familiar classes, and in data controls available through Swing, Eclipse SWT Widgets, etc.


Enterprise-class JDBC Connectivity

Support for Serverless & Cloud platform technologies

Leverage the SAP HANA JDBC Driver to deliver next-generation on-demand cloud access to data. The SAP HANA JDBC Driver offers straightforward SAP HANA integration from modern serverless infrastructure services, like AWS Lambda, AWS Glue ETL, Microsoft Azure Functions, Google Cloud Functions, and more.

JDBC Access to SAP HANA

Full-featured and consistent SQL access to any supported data source through JDBC

100% Java architecture based drivers that implement the native protocol without reliance on client-side libraries.

Single JAR that supports JDBC 3.0 and JDBC 4.0 specification and JVM versions 1.5 and above.

Our drivers undergo extensive testing and are certified to be compatible with leading analytics and reporting applications like SAP Crystal Reports, Pentaho, Business Objects, Crystal Reports and many more.

Full support for JDBC DatabaseMetaData provides extensive schema discovery capabilities. Explore tables, columns, keys, and other data constructs based on user identity.

Design-time support for all major Java IDEs, including Eclipse, IntelliJ, and NetBeans.

Our replication and caching commands make it easy to copy data to local and cloud data stores such as Oracle, SQL Server, Google Cloud SQL, etc. The replication commands include many features that allow for intelligent incremental updates to cached data.

The driver includes a library of over 50 functions that can manipulate column values into the desired result. Popular examples include Regex, JSON, and XML processing functions.

Our drivers enhance the data source's capabilities by additional client-side processing, when needed, to enable analytic summaries of data such as SUM, AVG, MAX, MIN, etc.

The data model exposed by our JDBC Drivers can easily be customized to add or remove tables/columns, change data types, etc. without requiring a new build. These customizations are supported at runtime using human-readable schema files that are easy to edit.

Includes standard Enterprise-class security features such as TLS/ SSL data encryption for all client-server communications.

JDBC Driver Performance

With traditional approaches to remote access, performance bottlenecks can spell disaster for applications. Regardless if an application is created for internal use, a commercial project, web, or mobile application, slow performance can rapidly lead to project failure. Accessing data from any remote source has the potential to create these problems. Common issues include:

  1. Network Connections - Slow network connections and latency issues are common in mobile applications.
  2. Service Delays - Delays due to service interruptions, resulting in server hardware or software updates.
  3. Large Data - Intentional or unintentional requests for large amounts of data.
  4. Disconnects - Complete loss of network connectivity.

The CData JDBC Driver for SAP HANA solves these issues by supporting powerful smart caching technology that can greatly improve the performance and dramatically reduce application bottlenecks.

Smart Caching

Smart caching is a configurable option that works by storing queried data into a local database. Enabling smart caching creates a persistent local cache database that contains a replica of data retrieved from the remote source. The cache database is small, lightweight, blazing-fast, and it can be shared by multiple connections as persistent storage.

Caching with our JDBC Drivers is highly configurable, including options for:

  • Auto Cache - Maintain an automatic local cache of data on all requests. The provider will automatically load data into the cache database each time you execute a SELECT query. Each row returned by the query will be inserted or updated as necessary into the corresponding table in the cache database.
  • Explicit Cache - Cache only on demand. Developers decide exactly what data gets stored in the cache and when it is updated. Explicit caching provides full control over the cache contents by using explicit execution of CACHE statements.
  • No Cache - All requests access only live data and no local cache file is created.

This powerful caching functionality increases application performance and allows applications to disconnect and continue limited functioning without writing code for additional local storage and/or data serialization/deserialization.

More information about JDBC Driver caching and best caching practices is available in the included help files.

Getting Started with SAP HANA JDBC Driver

Working with the new SAP HANA JDBC Driver is easy. As a 100% pure Java JDBC Driver, the SAP HANA Driver integrates seamlessly with popular IDEs like Eclipse, IntelliJ and NetBeans, as well as any Java/J2EE application.

Eclipse Integration - Data Explorer

As a JDBC Driver, SAP HANA JDBC Driver can be used to access and explore SAP HANA data directly from the Data Source Explorers included in popular java IDEs.

It's easy. As a standard JDBC Driver, developers can connect the Data Source Explorer to SAP HANA JDBC Driver, just like connecting to any standard database.

  1. Add a new Data Connection from the server explorer and select the SAP HANA Data Source
  2. Configure the basic connection properties to access your SAP HANA account data.


Explore real-time data! The SAP HANA JDBC Driver makes it easy to access live SAP HANA data directly from any modern Java IDE.

  1. After configuring the connection, explore the tables, views, and stored procedures provided by the SAP HANA JDBC Driver.
  2. These constructs return live SAP HANA data that developers can work with directly from within the IDE.


Enterprise-Class Remoting

MySQL/SQL Database entry points for SAP HANA Data

The CData JDBC drivers include powerful fully-integrated remoting capabilities that makes SAP HANA data accessible from virtually anywhere. The drivers include the optional ability to accept incoming SQL and MySQL client connections and service standard database requests.

With the CData JDBC drivers, users can interact with SAP HANA data from any client that supports SQL Server or MySQL: from web & mobile applications, to CRM and CMS systems, BI tools like SQL Server Analysis Services, and even through popular management applications like MySQL Workbench.

  • Access SAP HANA data from virtually any application that can access external data. Applications that can access SQL Server or MySQL data can now connect to SAP HANA with this driver.
  • Connect SAP HANA data with popular BI tools like SQL Server Analysis Services.
  • Enable enterprise SAP HANA data integration through SQL Linked Server connectivity
  • Includes support for the MySQL and SQL (TDS) remote access protocols - industry standards for remote database connectivity.
  • Offers advanced wire-protocol SSL security for remote connectivity

Enterprise-class JDBC Connectivity

The SAP HANA JDBC Driver offers the most natural way to access SAP HANA data from any Java/J2EE application. Simply use the SAP HANA Driver to connect and access data just as you would access any traditional database. The driver is completely self-contained - no additional software installation is required!

SAP HANA Integration

The SAP HANA Driver has the same JDBC architecture as the JDBC drivers for MySQL and OLEDB, including Connection, Statement and ResultSet objects. Because of this you can now access SAP HANA data in an easy, familiar way. You can use the SAP HANA Driver through popular IDEs (Eclipse, IntelliJ, NetBeans, etc.), in code through familiar classes, and in data controls available through Swing, Eclipse SWT Widgets, etc.


Connect to real-time SAP data from any BI or Reporting tool.

ETL & Replication

Simplify ETL & Data Replication to any RDBMS or Data Warehouse.

Data Management

Work with SAP data directly from popular database management tools.

Workflow & Automation

Integrate SAP through popular workflow and automation software.

Software Development

Easily integrate with SAP from any development technology.

Data Virtualization

Seamless integration with popular Data Virtualization technologies.

BI & Analytics

Our drivers offer the fastest and easiest way to connect real-time SAP data with BI, analytics, reporting and data visualization technologies. They provide unmatched query performance, comprehensive access to SAP data and metadata, and seamlessly integrate with your favorite analytics tools.

Popular BI & Analytics Integrations

ETL, Replication, & Warehousing

From drivers and adapters that extend your favorite ETL tools with SAP connectivity to ETL/ELT tools for replication — our SAP integration solutions provide robust, reliable, and secure data movement.

Connect your RDBMS or data warehouse with SAP to facilitate operational reporting, offload queries and increase performance, support data governance initiatives, archive data for disaster recovery, and more.

Popular Data Warehousing Integrations

Data Management

Popular Data Management Tool Integrations

Workflow & Automation Tools

Connect to SAP from popular data migration, ESB, iPaaS, and BPM tools.

Our drivers and adapters provide straightforward access to SAP data from popular applications like BizTalk, MuleSoft, SQL SSIS, Microsoft Flow, Power Apps, Talend, and many more.

Popular Workflow & Automation Tool Integrations

Developer Tools & Technologies

The easiest way to integrate with SAP from anywhere. Our SAP drivers offer a data-centric model for SAP that dramatically simplifies integration — allowing developers to build higher quality applications, faster than ever before. Learn more about the benefits for developers:

Popular Developer Integrations

Data Virtualization

Our drivers provide a virtual database abstraction on top of SAP data and support popular data virtualization features like query federation through advanced capabilities for query delegation / predicate pushdown.

Learn more about how our tools can be used in popular data virtualization scenarios below:

Popular Data Virtualization Tool Integrations

When Only the Best SAP Drivers Will Do

See what customers have to say about our products and support.


Your support is amazing .

"You guys are awesome. really. support is amazing. products are fantastic!"

- Paul Deraval

Unparalleled support .

" The support I received was unparalleled to that of any other company I have worked with (and there have been many). Your combination of a first class product with first class support has made this vet [. ] "

- M. Wojtowicz

Support Gets Two Thumbs Up .

"Two thumbs up for your support team in my book. I would like to once again give many thanks to your support team for their speedy responses to my emails and for their vast technical skills."

No hesitation in recommending you to anybody. .

" I have recently been in contact with your support which has been offering support in attempting to get the CData ODBC Sage 50 UK driver to working on our PC with Sage. Support has been fantastic and i [. ] "

- Jon Sinkins Lorna Wiles Textiles

Folks that know what they are doing. .

" I am very pleased with your ODBC driver for QuickBooks Online and recommended it to another developer down in Florida that purchased both the desktop and server versions of this driver. I am also impr [. ] "

- Pete Sass Griffin Computers

Your support is amazing .

"You guys are awesome. Really..Support is amazing. Products are fantastic."

- Paul Deraval

Support gets two thumbs up .

"Two thumbs up for your support team in my book. I would like to once again give many thanks to your support team for their speedy responses to my emails and for their vast technical skills."

Nothing short of fantastic .

"Your products are nothing short of fantastic. I've been working with them for almost 5 days and I have my enterprise application completely functioning with your tools."

- Tim Scheutzow

It works beautifully .

"Thank you so much for your help! You understood exactly what I needed and made it easy for me to implement in my own environment. It works beautifully."

- Dwight Thompson SirsiDynix

WOW. you helped me in less than 2 minutes .

"WOW! I called your tech support today, and got a real live person who knew what I was talking about and helped me in less than 2 minutes. Thank you so much!"

- Richard Brown Data West Corporation

Your support is amazing .

"You guys are awesome. really. support is amazing. products are fantastic!"

- Paul Deraval

Impressive quality .

"I am always impressed with the quality of your software and the extremely helpful and professional demeanor of your company."

A pleasure to work with .

"It has been a real pleasure to deal with professionals like you, who care about their product and their clients."

Unparalleled support .

" The support I received was unparalleled to that of any other company I have worked with (and there have been many). Your combination of a first class product with first class support has made this vet [. ] "

- M. Wojtowicz

Outstanding products .

"You have got to be the most jacked up company in the USA - this was the fastest response I've ever had from anyone anywhere! Thank you very much for your support - and for your outstanding products."

- R. Gould-King

Makes QuickBooks integration simple .

" Your QuickBooks Adapter is an awesome product which makes Quickbooks integration a simple process. There is a bit of a learning curve and it helps to know more about QuickBooks than I did when I began [. ] "

I love how I can define my own transactions .

" I spent the majority of yesterday experimenting, and this looks great! I dove deep into the .rsd files, and am pretty comfortable with how things work. Very flexible, and I love how I can define my [. ] "

- Gerry Miller

Saved us literally weeks of SharePoint development time .

"Our demo license has already saved Jennie and I literally weeks of development time over the native SharePoint methods for doing these types of integrations."

- Michael Schenkel

Support Gets Two Thumbs Up .

"Two thumbs up for your support team in my book. I would like to once again give many thanks to your support team for their speedy responses to my emails and for their vast technical skills."

Your product just plain works, and works great! .

"I've tried a couple other ODBC connectors and they all seem to have some hangups while setting up. except yours. Your product just plain works, and works great at that."

- James Grant Workflow Masters

Quite possibly the best $ I've ever spent. .

" 1. Did a year's worth of bank transaction data entry for one client in about two hours - last time I did this for the same client, it was over 15 hours of horrible manual 10-keyed data entry. 2. I [. ] "

- Joshua Hartley Guardian Financial Inc.

The CData Google Excel Add-In is a masterpiece .

" Your Google Excel Add-In is a masterpiece. I work 6 days a week and keep my calendar on Google Calendar. I have an old desktop and no printer. Getting the Google Calendar exported to Excel helps me im [. ] "

Your product performs flawlessly. .

" I found that the CData Excel Add-In meets my needs the best and I have purchased/licensed that. I’ve already put it to good use in editing and batch-updating Quickbooks tables and it has performed fla [. ] "

- Klaus Schmidsrauter

Worked perfectly and was completely hassle free. .

" I am using this component to import data from multiple MySQL databases into a SQL Server so I can combine data from both sources to create a variety of SSRS reports. I attempted to do this with the b [. ] "

- Robert Clancy Direct Success, Inc.

No hesitation in recommending you to anybody. .

" I have recently been in contact with your support which has been offering support in attempting to get the CData ODBC Sage 50 UK driver to working on our PC with Sage. Support has been fantastic and i [. ] "

- Jon Sinkins Lorna Wiles Textiles

Good support for NetSuite .

" We have tried using other SSIS packages for NetSuite, and other SuiteTalk-based ETL tools for NetSuite, and have found most of them to have quite poor support for NetSuite, and many issues with connec [. ] "

- Scott VonDuhn CommerceHub

Connecting SAS to Salesforce worked brilliantly .

" I have been using the ODBC driver with SAS to connect to Salesforce over the last two days and it has worked brilliantly. It was quick and easy to install. There is very little documentation on the [. ] "

- Leonard Scuderi

Your tools are a literal godsend .

"Your tools are a literal godsend. I was all set to build a FreshBooks-Excel connector this weekend until I found yours. Just awesome. Also kudos for great tech support!"

- Jason Williscroft

You guys have hit the nail on the head with this one .

" I love the ease of use, the simplicity of your product. Trust me I have test driven almost everything on the market. For native integration I think you guys have hit the nail on the head with this one [. ] "

- Christopher Haigood McKesson

Whatever you do to get the data out so fast using the QB APIs is awesome! .

" Whatever CDATA do to get the data out so fast using the QB APIs is awesome. It literally takes 3-8 secs to run through the 68K+ orders in our QB file and stage into SQL. It is certainly worth the co [. ] "

- Rob Mariani Aquatap Plumbing Pty Ltd

NetSuite Replication - Great Product and Outstanding Support! .

" We chose CData Data Sync for NetSuite to replicate our NetSuite cloud data to a local database instance for reporting. Despite our initial inexperience with NetSuite, the CData support people were ext [. ] "

- Bill Border Compassion International

Fastest reads of any NoSQL Driver .

"I have tested MongoDB drivers from other vendors and so far the [CData ODBC Driver for Mongo] has had the quickest reads."

- Douglas Menger Yupo Corporation

Folks that know what they are doing. .

" I am very pleased with your ODBC driver for QuickBooks Online and recommended it to another developer down in Florida that purchased both the desktop and server versions of this driver. I am also impr [. ] "

- Pete Sass Griffin Computers

In a business world void of quality customer service, CData has proven that their customers matter to them! .

" You quickly addressed my questions and helped provide additional guidance which enabled me to see the full benefit of your product. As an accountant who also happens to be a computer geek, I was able [. ] "

- Mathew Fulton

Being able to use standard SQL instead of APIs is awesome! .

" We liked that any engineers with RDBMS/SQL knowledge could use the CData Drivers without having to learn anything new. Being able to use standard SQL instead of APIs is awesome. As professional engine [. ] "

- Takayuki Kobayashi Fujitsu FSAS

A plug and play experience. .

"Integrating with the providers turned out to be a breeze. Thanks to the clean class model and the deep integration into .NET it was like a plug and play experience. Our customers will love this!"

- Jochen Bartlau combit Software

Nothing short of fantastic .

"Your products are nothing short of fantastic. I've been working with them for almost 5 days and I have my enterprise application completely functioning with your tools."

- Tim Scheutzow

It works beautifully .

"Thank you so much for your help! You understood exactly what I needed and made it easy for me to implement in my own environment. It works beautifully."

- Dwight Thompson SirsiDynix

WOW. ArcESB helped me in less than 2 minutes .

"WOW!, I called your tech support today, and got a real live person who knew what I was talking about and helped me in less than 2 minutes. Thank you so much!"

- Richard Brown Data West Corporation

Your support is amazing .

"You guys are awesome. Really..Support is amazing. Products are fantastic."

- Paul Deraval

Impressive quality .

"Thank you so much. I am always impressed with the quality of your software and the extremely helpful and professional demeanor of your company."

A pleasure to work with .

"It has been a real pleasure to deal with professionals like you, who care about their product and their clients."

Outstanding products .

"You have got to be the most jacked up company in the USA - this was the fastest response I've ever had from anyone anywhere! Thank you very much for your support - and for your outstanding products."

- R. Gould-King

I love how I can define my own transactions .

" I spent the majority of yesterday experimenting, and this looks great! I dove deep into the .rsd files, and am pretty comfortable with how things work. Very flexible, and I love how I can define my [. ] "

- Gerry Miller

Free or Low-Cost AS2 Connectivity .

" The availability of free or low-cost AS2 connectivity (such as ArcESB) will introduce a new competitive element to the market. Vendors that charge exorbitant prices for AS2 adapters will have to deal [. ] "

- L. Frank Kenny Gartner

Cost effective solution for small businesses .

"ArcESB does its job and is easy to work with. It is a cost effective solution for small businesses which would otherwise be excluded from the benefits of B2B messaging."

- Roger Ford Innovise Ltd.

Support gets two thumbs up .

"Two thumbs up for your support team in my book. I would like to once again give many thanks to your support team for their speedy responses to my emails and for their vast technical skills."

Setup in under 10 minutes .

" I'm currently working on a OFTP2-based MFT-platform for the Flemish Government, and I was looking for an alternative to Mendelson to be used as a OFTP2-client by our Partners. I've got extensive exper [. ] "

We're convinced there is NO finer product or support team! .

" Without ANY background using AS2 I was able to use the excellent documentation to install it and get it going. When I ran into questions and issues due to my lack of knowledge, the ArcESB support team [. ] "

- Emmett Kaericher

Top 1 or 2 percent of best companies to work with. .

"I’ve been in the business 20+ years and you guys are in the top 1 or 2 percent of best companies to work with. Your support is just outstanding"

- Bill Border Compassion International

The software is great! .

"The software is great, BTW. I spent close to 16 hours struggling with OpenAS2, before finding ArcESB, which only took around 10-20 minutes."

- Will Mott TST Water

Perfect solution for AS2 .

" The solution works perfectly! It is a great relief to know that I don't need to worry about whether my EMA submissions are being properly and securely handled. Not only is this a great product, but th [. ] "

- CEO, PhACT Corporation CEO, PhACT Corporation

Cost efficient, easy to administer, scalable AS2 solution .

" ArcESB has provided us with a cost efficient, easy to administer, scalable solution. It is easy-to-use, easy to install and doesn't break the bank. We would absolutely recommend this product to compan [. ] "

- Brad Dayhuff Vice President / Co-Owner, Xebec Data Corporation

Support is not just a part of our business, support is our business. Whenever you need help, please consult the resources below:

Open Database Connectivity (ODBC) provides an API for accessing databases. Database vendors provide ODBC drivers for their database products. An application written to the ODBC standard can be ported to other databases that also provide an ODBC interface.

Step 1: Configure a data source using Microsoft Windows ODBC Data Source Administrator

The ODBC Data Source Administrator lists the installed ODBC drivers and the configured data sources.

Open the administrator by entering ODBC after clicking on the Microsoft Windows start icon.

Ensure that you choose the 64-bit version assuming that you have the 64-bit version of the SAP HANA client installed.

Click the Drivers tab and view the installed drivers.

odbc admin drivers

The SAP HANA ODBC driver (HDBODBC) is visible.

Click the User DSN tab to view the data sources.

Click Add to create a new data source to connect to a SAP HANA database.

Select HDBODBC and click Finish.

Example data source configuration for SAP HANA Cloud.

Example data source configuration for SAP HANA, express edition.

ODBC HXE

To connect to SAP HANA, express edition, Multitenant should be checked and the Validate TLS/SSL certificate option can be unchecked. For more information on this topic, see How to Configure TLS/SSL in SAP HANA 2.0.

Click Test connection.

Test Succeeded

The user name USER1 and password Password1 can be entered when prompted for credentials.

Press OK to save the data source.

Note that the saved values can also be viewed using the Microsoft Windows registry editor under the key Computer\HKEY_CURRENT_USER\Software\ODBC\ODBC.INI .

Step 2: Configure a data source on Linux or Mac with unixODBC

The following instructions demonstrate how unixODBC can be used to configure and test a data source on Linux or Mac.

On SUSE Linux, the YaST installer can be used to install unixODBC.

YaST installer

For more details on how to accomplish this, please follow the second step of this tutorial.

On a Mac, unixODBC can be installed using Homebrew.

The following commands can be used to confirm that unixODBC is installed, determine the location of the .odbc.ini file (if it exists), and to confirm the location of the SAP HANA client install that contains the ODBC driver.

Navigate to a directory, similar to the first one that is highlighted in the screenshot above.

Edit the .odbc.ini file (or create it if it does not exist) to add one or more data sources. Be sure to configure the values of servernode and driver so that they conform with your setup.

Note that the driver’s file extension is dylib instead of so on a Mac.

unixODBC provides a basic SQL query tool called isql that can be used to validate a data source.

Once you see a message that indicates a connection has been made, enter the following statement to verify this.

Step 3: Use a SAP HANA data source from another program

An application that supports ODBC can now make use of the created data source. One example on Windows is Microsoft Excel.

Excel 64 bit

Note that Microsoft Excel can be 32 or 64 bit. This can be seen under File | Account | About Excel.

The SAP HANA client install can also be 32 or 64 bit. To connect, the versions of SAP HANA client and Microsoft Excel must match. If needed, the 32-bit installer for SAP HANA client is available from the SAP Software downloads site and can be installed into a separate directory such as C:\SAP\hdbclient32 .

The following steps demonstrate how to use Microsoft Excel to query data in SAP HANA using the ODBC connector.

On Microsoft Windows, open Microsoft Excel.

In the Data tab, go to Get Data | From Other Sources | From ODBC.

Select the previously created data source that contains the connection information to an SAP HANA database.

Enter the credentials.

Select a schema and table, then press Load.

The selected data is now imported into a Microsoft Excel spreadsheet.

One further option for some tools is to provide the connection details directly to an ODBC enabled application as shown below.

For further information on programming an application to use the ODBC client driver, see ODBC Application Programming.

Congratulations! You have configured an ODBC data source to contain connection information for a SAP HANA database and used that data source from Microsoft Excel.

Читайте также: