Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:31:54

0001 #!/usr/bin/perl
0002 
0003 use warnings;
0004 use strict;
0005 
0006 use CondDB::Oracle;
0007 
0008 package ConnectionFile;
0009 
0010 # connection information
0011 our $host = "__CHANGE_ME__";
0012 our $db = "__CHANGE_ME__";
0013 our $user = "__CHANGE_ME__";
0014 our $pass = "__CHANGE_ME__";
0015 our $port = 1521;
0016 our $db_opts = {RaiseError=>1};
0017 
0018 # return the conditions database interface
0019 sub connect {
0020   my $condDB = new CondDB::Oracle;
0021   
0022   $condDB->connect(-host=>$host,
0023            -db=>$db,
0024            -user=>$user,
0025            -pass=>$pass,
0026            -port=>$port,
0027            -db_opts=>$db_opts);
0028   $condDB->{dbh}->do(qq[ ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS']);
0029   return $condDB;
0030 }
0031 
0032 1;