Logging to a database from a Cisco router is not a direct process. Instead, the standard process is to use a syslog server to capture the data and store it into a database. For example, we used Kiwi Syslog server to capture our Cisco device data and store it into a SQL server. Kiwi will store data into any ODBC database, which would include Oracle. Here is a link to Kiwi:
Which syslog server you used would be up to you but that is how you would get the data into the database.