FAQ about JDBC

Updated at: 2024-07-23 01:56

This topic provides answers to some frequently asked questions about Java Database Connectivity (JDBC).

Can I disable the auto-commit mode for the MaxCompute JDBC driver?

MaxCompute does not support transactions. Each query is immediately performed on the server. The auto-commit mode is automatically enabled for the MaxCompute JDBC driver. Therefore, you cannot disable the auto-commit mode for the MaxCompute JDBC driver.

Does the MaxCompute JDBC driver require a connection pool?

MaxCompute provides the Representational State Transfer (REST) service, which is different from the way that traditional databases maintain long connections. The connection creation by using the MaxCompute JDBC driver is a lightweight operation. Therefore, the MaxCompute JDBC driver does not require a connection pool. However, the MaxCompute JDBC driver supports connection pools.

How do I view the logs of the MaxCompute JDBC driver?

The logs of the MaxCompute JDBC driver record the details of JDBC interface calls, including the class name, method name, number of rows, parameters, and return values. The details help you perform debugging in an efficient manner.
  • By default, the logs of the MaxCompute JDBC driver are saved in the same directory as the JAR file of the driver. The file name is jdbc.log.
  • If you package user code and the MaxCompute JDBC driver into a fat JAR file, the logs are stored in the same directory as the fat JAR file.

How do I obtain a MaxCompute LogView URL?

The MaxCompute JDBC driver is encapsulated based on MaxCompute SDK for Java. When you use the MaxCompute JDBC driver to execute SQL statements, a LogView URL is generated in the same way as you execute SQL statements on the MaxCompute client, in MaxCompute Studio, or in the DataWorks console. You can view the task status, track the task progress, and obtain task results in LogView.

You can configure log output information in the configuration file properties.log4j. By default, the LogView URL is displayed as standard output on the terminal.

What do I do if the number of rows of data that is read by using the MaxCompute JDBC driver exceeds 10,000?

Tunnel commands are used for data reading and download by using the JDBC driver. To ensure data security, download authentication is required for the AccessKey pairs of the connections. The AccessKey pair of the account that does not have the download permission can be used to read only a maximum of 10,000 rows of data. For more information about how to grant the download permission, see Download control.

What do I do if the error message "ODPS-0410042:Invalid signature value" appears when I access MaxCompute by using the JDBC driver?

Make sure that the AccessKey ID and AccessKey secret you enter are the same as the AccessKey ID and AccessKey secret of your authorized account.

How do I disable the generation of the jdbc.log file?

When you use the JDBC driver to connect to MaxCompute, the JDBC driver of the previous version automatically generates a jdbc.log file in the /temp directory. If you do not want to generate a log file, you can configure logConfFile=false when you configure the connection.

What do I do if the error message "create download session failed: instance id=xxx, Error:ErrorCode=Local Error, ErrorMessage=Failed to create download session with tunnel endpoint" appears when I access MaxCompute by using the JDBC driver?

An error occurs when the JDBC driver connects to MaxCompute to obtain SQL results by using Tunnel commands. For more information about how to troubleshoot the error, see Error message: ErrorCode=Local Error, Failed to create download session with tunnel endpoint.

  • On this page (1, T)
  • Can I disable the auto-commit mode for the MaxCompute JDBC driver?
  • Does the MaxCompute JDBC driver require a connection pool?
  • How do I view the logs of the MaxCompute JDBC driver?
  • How do I obtain a MaxCompute LogView URL?
  • What do I do if the number of rows of data that is read by using the MaxCompute JDBC driver exceeds 10,000?
  • What do I do if the error message "ODPS-0410042:Invalid signature value" appears when I access MaxCompute by using the JDBC driver?
  • How do I disable the generation of the jdbc.log file?
  • What do I do if the error message "create download session failed: instance id=xxx, Error:ErrorCode=Local Error, ErrorMessage=Failed to create download session with tunnel endpoint" appears when I access MaxCompute by using the JDBC driver?
Feedback
phone Contact Us

Chat now with Alibaba Cloud Customer Service to assist you in finding the right products and services to meet your needs.

alicare alicarealicarealicare