diff --git a/oracle/inc/TOracleServer.h b/oracle/inc/TOracleServer.h index d3f83cd42552619ee8d8e98013cc3e93e0b293bd..b355cb91f4186a58782a19520fcee6c924c0a36a 100644 --- a/oracle/inc/TOracleServer.h +++ b/oracle/inc/TOracleServer.h @@ -1,4 +1,4 @@ -// @(#)root/physics:$Name: $:$Id: TOracleServer.h,v 1.3 2006/05/22 08:55:30 brun Exp $ +// @(#)root/physics:$Name: $:$Id: TOracleServer.h,v 1.4 2006/06/02 14:02:03 brun Exp $ // Author: Yan Liu and Shaowen Wang 23/11/04 /************************************************************************* @@ -34,6 +34,7 @@ class TOracleServer : public TSQLServer { private: Environment *fEnv; // environment of Oracle access Connection *fConn; // connection to Oracle server + TString fInfo; // info string with Oracle version information public: TOracleServer(const char *db, const char *uid, const char *pw); diff --git a/oracle/src/TOracleServer.cxx b/oracle/src/TOracleServer.cxx index 4e4c8b2957cd4ccf1e477644608a357b4758aeff..e0484c41ddfb48291bbb69e10692016c926a63c1 100644 --- a/oracle/src/TOracleServer.cxx +++ b/oracle/src/TOracleServer.cxx @@ -1,4 +1,4 @@ -// @(#)root/oracle:$Name: $:$Id: TOracleServer.cxx,v 1.13 2006/06/25 18:43:24 brun Exp $ +// @(#)root/oracle:$Name: $:$Id: TOracleServer.cxx,v 1.14 2006/09/05 13:37:08 brun Exp $ // Author: Yan Liu and Shaowen Wang 23/11/04 /************************************************************************* @@ -462,12 +462,26 @@ Int_t TOracleServer::Shutdown() //______________________________________________________________________________ const char *TOracleServer::ServerInfo() { - // Return server info. - // NOT IMPLEMENTED. + // Return Oracle server version info. CheckConnect("ServerInfo", 0); - return "Oracle"; + fInfo = "Oracle"; + TSQLStatement* stmt = Statement("select * from v$version"); + if (stmt!=0) { + stmt->EnableErrorOutput(kFALSE); + if (stmt->Process()) { + fInfo = ""; + stmt->StoreResult(); + while (stmt->NextResultRow()) { + if (fInfo.Length()>0) fInfo += "\n"; + fInfo += stmt->GetString(0); + } + } + delete stmt; + } + + return fInfo.Data(); } //______________________________________________________________________________