Victor Kostyuk Victor Kostyuk - 1 month ago 22
R Question

ROracle: dbGetQuery works but dbListTables and other functions do not

I installed ROracle (following the directions in the package) and successfully connected to our Oracle database.

I can run queries, using

, and get results just fine, e.g.:

> dbGetQuery(con, "select count(*) from table_name")
1 6111

However, some of the other DBI/ROracle helper functions give no results:

> dbListTables(con)

> dbReadTable(con, "table_name")
Error in .oci.GetQuery(con, qry) :
ORA-00942: table or view does not exist

Any ideas what may be the cause?


In both cases, they work for me if I specify a schema argument, i.e.

dbListTables(con, schema = "my_schema")
dbReadTable(con,"table_name",schema = "my_schema")

Additionally, it appears from reading ?dbListTables that it has all and full arguments that control whether to look in all schemas, and whether to return the full schema name or just the table name.