Loading XBRL DB: DatabaseError: ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA

57 views
Skip to first unread message

ixi9

unread,
Aug 5, 2020, 10:50:00 AM8/5/20
to Arelle-users
Hi!

I'm trying to connect Arelle with an Oracle Database in order to load in XBRL GL XML schemas/XSD files. I am a beginner in Oracle, so sorry if this question is very basic, but I couldn't really decipher what I need to put in the database field for the XBRL DB plugin. Currently I just put my database name but based on the error - Loading XBRL DB: DatabaseError: ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA  - it seems I didn't give the correct information or it was in the wrong format... What type of format does the application except for the database field? Sample data is very welcome! :)

The documentation doesn't really answer my question

"database is the SQL database (all SQL interfaces), the Rexster database, or the Nanodata subdirectory.  For SQLite, rdf or json file saving, this field is a full path file name on local file system."

Thanks

selg...@gmail.com

unread,
Aug 5, 2020, 4:13:54 PM8/5/20
to Arelle-users
Hi,

I am not sure I understand what you are trying to do, I haven't worked with loading from db,  but I had the same issue with connecting to oracle when trying to store to XBRL DB, what worked for me was changing few lines of code in the XBRL DB plugin, in file  Arelle/plugin/xbrlDB/SqlDb.py -- lines 168:170, seems that the code for oracle connection string does not capture the database name, so I made the following changes:

The existing code is :
self.conn = oracleConnect('{}/{}@{}{}'
.format(user, password, host, 
":{}".format(port) if port else ""))

Change to:
self.conn = oracleConnect('{}/{}@{}{}/{}'
.format(user, password, host, 
":{}".format(port) if port else "", database))

Also make sure that you can connet to the db from your computer using other applications.
Reply all
Reply to author
Forward
0 new messages