Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add schema support to the Oracle driver

  • Loading branch information...
commit 7f1afde59210942d1769b29774d8156716a44ecb 1 parent 70fb696
@helix84 authored vrana committed
Showing with 6 additions and 4 deletions.
  1. +6 −4 adminer/drivers/oracle.inc.php
View
10 adminer/drivers/oracle.inc.php
@@ -329,15 +329,17 @@ function last_id() {
}
function schemas() {
- return array();
+ return get_vals("SELECT DISTINCT owner FROM dba_segments WHERE owner IN (SELECT username FROM dba_users WHERE default_tablespace NOT IN ('SYSTEM','SYSAUX'))");
}
function get_schema() {
- return "";
+ global $connection;
+ return $connection->result("SELECT sys_context('USERENV', 'SESSION_USER') FROM dual");
}
function set_schema($scheme) {
- return true;
+ global $connection;
+ return $connection->query("ALTER SESSION SET CURRENT_SCHEMA = " . idf_escape($scheme));
}
function show_variables() {
@@ -350,7 +352,7 @@ function show_status() {
}
function support($feature) {
- return ereg("view|drop_col|variables|status", $feature); //!
+ return ereg("view|scheme|drop_col|variables|status", $feature); //!
}
$jush = "oracle";
Please sign in to comment.
Something went wrong with that request. Please try again.