How to connect to Oracle DB? (Error)

I’m trying to connect Oracle DB. But i’m getting an error. Could you please help me to fix this issue?

*** Settings ***
Library DatabaseLibrary #Database Library | ROBOT FRAMEWORK
Library cx_Oracle

*** Variables ***
${DBHost} localhost
${DBPass} 3pLU
${DBPort} 1521
${DBUser} test

*** Keywords ***
Connect To Database cx_Oracle ${DBName} ${DBUser} ${DBPass} ${DBHost} ${DBPort}


Hi Nishan,

This is a common issue with open source apps on MacOS and even some commercial software (like Oracle Virtual Box)

There is a workaround described here:

You can go to the Control Panel → Security & Privacy → General tab, and you will see a prompt asking if you would like to approve this application:

You only need to do this once, but if you update the files you may need to do it again.

Hope that helps,


Yes. After Allowing permission, i’m getting below error message.


Hi Nishan,

Great news your making progress :+1:

An ORA error comes from the oracle client libraries, so robot framework has successfully loaded the library and told it to connect to the database, but the oracle client is not configured properly so it didn’t connect.

This is where my help will be limited as I only once configured an oracle database connection to Loadrunner and that was ~10 years ago, so I’m no expert here, I do remember when I got to this stage it involved editing configuration files that the client uses.

One great thing is that ORA errors are well documented and you can search the error number, e.g when I searched for just "ORA-12541" I found this:

Hopefully that will help,