I'm currently running Oracle 12.1, and I'm trying to create a database link to an Azure SQL server that uses Active Directory Password authentication.
Created the HS init as well as the entry in tnsnames.ora, like I normally do when connecting to an SQL database using Microsoft ODBC Driver 17 for SQL Server.
I created the DB link using :
CREATE PUBLIC DATABASE LINK "AZURE" CONNECT TO "username@domain.com" IDENTIFIED BY "password" USING 'azure';
However, when I try to select anything from this db_link, I get the following error :
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Failed to authenticate the user 'username' in Active Directory (Authentication option is 'ActiveDirectoryPassword').
Error code 0xCAA90018; state 10
Could not discover a user realm. {FA004}
ORA-02063: preceding 4 lines from AZURE
28500. 00000 - "connection from ORACLE to a non-Oracle system returned this message:"
*Cause: The cause is explained in the forwarded message.
*Action: See the non-Oracle system's documentation of the forwarded
message.
My issue is that the username is an email address, so contains an @, which seems to be stripped whenever Oracle attempts to connect.
I've tried using "username\@domain.com" to see if it could be escaped with no luck
Trying "domain\\username" also doesn't work (this doesn't work when using a native SQL client, so wouldn't expect it to work)