Technical Failure Management and Root Cause Prediction with an Expert System

That’s exactly the next step for me. I’ve created a small test database. Now I’m trying to establish contact with the DB:

?- use_module(library(odbc)).

open_oracle :-
(odbc_connect(‘’, _,
[user(),
password(),
alias(mqmdesyd),
open(once)
])

Either that works (not yet), in which case there will be an initial success message here, or there will be a new thread in the Help category soon…

In my experience the ODBC library has worked very well. The difficult part usually has been setting up the ODBC driver for your specific platform and database.

2 Likes

Oracle ODBC driver: notes, which links to downloads.

Once installed, the DSN needs to be set up, within the Oracle ODBC driver. And then referenced, as the first argument in odbc_connect/3.

First step is typically to make sure you can connect using the commandline tools that come with the ODBC connector. For non-Windows, that is typically UnixODBC and the commandline tool is isql. Once you have the DSN setup correctly connecting from Prolog is typically easy.

1 Like

By using the debug-predicat I found out that the password also has to be quotet - and after a while I was able to send a first query to my database. :grinning_face: Perhaps I should came up with the complete manual to get in contact with a Oracle database from a windows system. .

Yes. Small tip: use double quotes to create a Prolog string for passwords. Prolog atoms are global resources that can be enumerated using current_atom/1. That can be a security risk (depending on how users interact with the software).

1 Like