Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Azure SQL DB link Active Directory authentication with email

david.stmartinJun 18 2020 — edited Jul 24 2020

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)

This post has been answered by david.stmartin on Jul 24 2020
Jump to Answer
Comments
Post Details
Added on Jun 18 2020
1 comment
1,196 views