taps
taps copied to clipboard
Need ability to specify an Oracle schema
Connecting to an Oracle database uses the logged in user's default schema. We need the ability to specify a different schema.
The Sequel gem has a :default_schema option while connecting, but I was unable to get it to work. I was able to do something like this: db = Sequel.connect("oracle://user:password@server/instance") # this will connect to user's default schema db.run("ALTER SESSION SET current_schema=ABC") # we are now using the ABC schema
Another option would be to prefix all of the tables with the schema: db["SELECT * FROM ABC.employees"]
I'd be willing to submit a patch given the right direction on how to integrate this into taps.
I was able to get it to work by adding a -s option to specify a schema http://github.com/enriquez/taps/commit/bce82b575f6cac36dbd84bbdf0429542f73a9403