Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Gateway Hana Connection Successful but Report with Direct Query Fails

Gateway Hana Connection Successful but Report with Direct Query Fails.

The Gateway is run with a Domain Account with SPN set, the new Data Source Tested good and SSO box is checked, but when a Report is published using Direct Query and the exact same Hana server name, all we see are Xs instead of data.

Tried a 2nd Data Source with a different name and user credentials and got an error that it was a duplicate? What? Surely more than one user can have a connection to the same Hana Sidecar -- right?

Status: New
Comments
v-yuezhe-msft
Employee

@pcgeekus,

What error message do you get in the report? When you add another SAP Hana data source within gateway, do you use different server name?

Regards,
Lydia

pcgeekus
Helper I
Something went wrong
Invalid connection credentials.
Please try again later or contact support. If you contact support, please provide these details.
Underlying error code-2147467259
Underlying error messageThe credentials provided cannot be used for the SapHana source. (Source ...
 
But it is successful when I create or test the Data Source under Manage Gateways.
 
For a 2nd connection, it was the same Hana server but different Data Source Name and User. Hana has many Views across many users, so why cant I create more than one?
v-yuezhe-msft
Employee

@pcgeekus,

A same issue has been reported internally. Please help to share gateway log and SAP ODBC trace file here.

Before your collect gateway log, in the gateway installation directory find and open this configuration file: Microsoft.PowerBI.DataMovement.Pipeline.GatewayCore.dll.config . Find the “FullDomainResolutionEnabled” property and change its value to True.

<setting name=" FullDomainResolutionEnabled " serializeAs="String">
<value>True</value>
</setting>

To capture the SAP HANA ODBC trace, please perform these steps:

Replace <path> with a local filepath (not the root of the OS drive, but a subfolder), e.g. c:\temp\HANADriverLogs%p.html (include the %p somewhere in the name to create a new file for each process, avoids overwriting the same file)

1. On the gateway machine, in a cmd.exe window, in the SAP driver installation folder execute these commands(replace domain\user with your account)
hdbodbc_cons.exe -u domain\user trace api on
hdbodbc_cons.exe -u domain\user trace packet on
hdbodbc_cons.exe -u domain\user trace debug on
hdbodbc_cons.exe -u domain\user trace sql on
hdbodbc_cons.exe -u domain\user config trace filename <path>
hdbodbc_cons.exe -u domain\user show config1. On the gateway machine, restart the gateway service process.

2. In app.powerbi.com, run a report with the SAP HANA SSO connection (based on the successful AD user lookup in the gateway)

3. After the report executed successfully, restart the gateway service process to flush logs.

4. Disable HANA ODBC tracing by running the inverse commands from above:
hdbodbc_cons.exe -u domain\user trace api off
hdbodbc_cons.exe -u domain\user trace packet off
hdbodbc_cons.exe -u domain\user trace debug off
hdbodbc_cons.exe -u domain\user trace sql off
hdbodbc_cons.exe -u domain\user show config1. Send the generated HANA ODBC trace file, and corresponding gateway logfile.

In addition, you should be able to add another data source within gateway as long as you use different server name.

Regards,
Lydia

pcgeekus
Helper I

I have the Log file. Send it where? For step 2 and 3, since it's not working how do I know it was "successful"

 

For SSO Hana connections, the same server is okay, but for Import-based reports how do those users get their data. Does it still use the SSO connection even though it's an Import?

pcgeekus
Helper I

We think it has somehting to do with not getting a Secure Connection with Hana via SSL or TSL.

I did see the Delegation occur in the Log file. But the Hana Trace indicated a connect issue.

pcgeekus
Helper I

Lydia, how can I share the logs? This Comment box won't take enough chars to work for that. I don't see an attachment icon unless it's a video/photo.

Jon

v-yuezhe-msft
Employee

@pcgeekus,

A similar issue is reported internally and fixed by using latest version of gateway. Please update your gateway and check if the issue still occurs.

Regards,
Lydia

pcgeekus
Helper I

We found that using sAMAccountName instead of sAMAccount helped and the logs show impersonation now to the Domain\UserID, but now there is a new error "The import [TableName] matches no exports. Did you miss a module reference?" 

  I have no idea what it means since I didn't write any code or Hana SQL directly, I simply selected the View from the Tree it shows in Desktop.

v-yuezhe-msft
Employee

@pcgeekus,

Do you get the error in Power BI Desktop or Power BI Service?

Regards,
Lydia

pcgeekus
Helper I

UPDATE: The key that was missing was to add the Hana Servers to the Domin Account's AD Property named "msDS-AllowedToDelegateTo" and items entered look like hdb/server.domain.com

Using a Vanity URL didn't work, so each time the hardware changes, these need updated.