Basic authentication example
- Last Updated: November 19, 2021
- 1 minute read
- DataDirect Connectors
- JDBC
- SAP S/4HANA 6.0
- Documentation
This string includes the properties used to connect with basic authentication.
jdbc:datadirect:s4hana:ServerName=servername;User=user_name;Password=password;
[property=value[;...]];
where:
- servername
- specifies the base URL of the service to which you want to connect. It
is comprised of either the domain name or the IP address of the service. For example,
for S/4HANA, it can be either
https://mycompany.s4hana.ondemand.comorhttp://123.456.7.8.
- user_name
- specifies the user name that is used to connect to the service. For example, jsmith.
- password
- specifies the password used to connect to the service.
- property=value
- specifies connection property settings. Multiple properties are separated by a semi-colon.
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.
The following example connection strings include the properties required for connecting with basic authentication.
For S/4HANA:
Connection conn = DriverManager.getConnection
("jdbc:datadirect:s4hana:ServerName=https://mycompany.s4hana.ondemand.com;
User=jsmith;Password=secret;");
For BW/4HANA:
Connection conn = DriverManager.getConnection
("jdbc:datadirect:s4hana:ServerName=https://myinstance.company.com
User=jsmith;Password=secret;");