Skip to Main Content

ODP.NET

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!

.Net ManagedDataAccess fails to connect using Windows Native Authentication

Maria B.Jun 16 2019 — edited Jun 26 2019

We're trying to connect to Oracle database using .Net ManagedDataAccess (Nuget package Oracle.ManagedDataAccess 19.3.0) and Windows Native Authentication, but database responds with ORA-01017: invalid username/password; login denied

Connecting with same user via SqlPlus works without problem

Both machines have windows os and belong to same domain

All 3 steps according to 3.3.8 Using Windows Native Authentication (NTS) are done (https://docs.oracle.com/en/database/oracle/oracle-data-access-components/18.3/odpnt/featConnecting.html#GUID-51D1ADDB-D6… )

External user created in oracle database with domain name

On Client side:

Connection string has User Id=/

SQLNET.AUTHENTICATION_SERVICES is set to (NTS)

Client Trace:

TID:1   (CFG) (VER)      Oracle Data Provider for .NET, Managed Driver Version : 4.122.19.1

TID:1   (CFG) (VER)      Oracle Data Provider for .NET, Managed Driver Informational Version : 4.122.19.1:20190510

TID:1   (CFG) (.NET)     SQLNET.AUTHENTICATION_SERVICES : (NTS)

Oracle database trace shows failed logon attempt with username that doesn't contain domain name.

Using Oracle.ManagedDataAccess.Core 2.19.3 for our core apps results in same error (also logged on oracle database trace as user without domain name).

Is there something else that has to be done to make it work?

Comments

Regarding writing to Oracle, start by reading the https://oracle.github.io/node-oracledb/doc/api.html
Consuming "a web service" can be done with the http module which is part of Node.js. Check out the manual and doc like https://nodejs.org/en/knowledge/HTTP/clients/how-to-create-a-HTTP-request/

Billy Verreynne

Why nodejs and not use only PL/SQL? Far fewer moving parts.

Arif2018

i am not sure on how pl/sql works , Appreciate if you can post some links. All i want is to read the url and insert data into Oracle table.

Billy Verreynne

Oracle has the UTL_HTTP package API and the HttpUriType advance datatype (oo class).
Sample code provided in manual and you can also look at https://community.oracle.com/tech/developers/discussion/comment/10450611/#Comment_10450611 and as for the oo class:

SQL> select httpuritype( 'http://google.com' ).getClob() as "HTML" from dual;

HTML
-------------------------------------------------------------------------------
<!doctype html><html itemscope="" itemtype="http://schema.org/WebPage" lang="en
-ZA"><head><meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
..snipped..

In PL/SQL use:

clobVariable := new HttpUriType(urlVariable).getClob();
1 - 4

Post Details

Added on Jun 16 2019
6 comments
1,552 views