The driver supports user ID and password authentication with SCRAM-SHA-256 mechanism. It authenticates the user to the database using a user name and password.

Take the following steps to configure user ID/Password authentication.

  1. Specify values for the required properties for establishing a connection.
    1. Set the ServerName property to the IP address or server name of the primary database server.
    2. Set the PortName property to the TCP port of the primary database server that is listening for connections to the database.
  2. Set the User property to provide the user name that is used to connect to the database.
  3. Set the Password property to specify the password.
For example, the following is a connection string with only the required properties for making a connection using user ID and password authentication.
Connection conn = DriverManager.getConnection 
("jdbc:datadirect:saphana://MyServer:30015;User=JSmith;Password=secret); 
Note: The User and Password properties are not required to be stored in the connection string. They can also be passed separately by the application.