Skip to content
Snippets Groups Projects
Commit 559b7314 authored by Fabrice Le Goff's avatar Fabrice Le Goff
Browse files

smarter scripts to connect to DB

parent 95cf20f9
No related merge requests found
Pipeline #6277702 failed
#!/sw/atlas/sw/lcg/releases/LCG_101/Python/3.9.6/x86_64-centos7-gcc11-opt/bin/python -i
import cx_Oracle
import coral_auth
user,pwd,dbn = coral_auth.get_connection_parameters_from_connection_string('oracle://int8r/ATLAS_SFO_T0')
orcl = cx_Oracle.connect(user, pwd, dbn)
curs = orcl.cursor()
#!/usr/bin/env bash
if [ "x$CMTRELEASE" != x ]; then
# TDAQ environment already loaded
echo "using $CMTRELEASE"
elif [ -r /sw/castor/script_setup.sh ]; then
#P1
source /sw/castor/script_setup.sh
elif [ -r /cvmfs/atlas.cern.ch/repo/sw/tdaq/tools/cmake_tdaq/bin/cm_setup.sh ]; then
#testbed
source /cvmfs/atlas.cern.ch/repo/sw/tdaq/tools/cmake_tdaq/bin/cm_setup.sh
else
echo "error: cannot setup environment"
exit
fi
python -i -c "
import cx_Oracle
import coral_auth
user,pwd,dbn = coral_auth.get_connection_parameters_from_connection_string('oracle://int8r/ATLAS_SFO_T0')
orcl = cx_Oracle.connect(user, pwd, dbn)
curs = orcl.cursor()
print('orcl: connection to db object, curs: cursor on the connection')
"
#!/sw/atlas/sw/lcg/releases/LCG_101/Python/3.9.6/x86_64-centos7-gcc11-opt/bin/python -i
import cx_Oracle
import coral_auth
user,pwd,dbn = coral_auth.get_connection_parameters_from_connection_string('oracle://atonr_conf/ATLAS_SFO_T0_R')
orcl = cx_Oracle.connect(user, pwd, dbn)
curs = orcl.cursor()
#!/usr/bin/env bash
if [ "x$CMTRELEASE" != x ]; then
# TDAQ environment already loaded
echo "using $CMTRELEASE"
elif [ -r /sw/castor/script_setup.sh ]; then
#P1
source /sw/castor/script_setup.sh
elif [ -r /cvmfs/atlas.cern.ch/repo/sw/tdaq/tools/cmake_tdaq/bin/cm_setup.sh ]; then
#testbed
source /cvmfs/atlas.cern.ch/repo/sw/tdaq/tools/cmake_tdaq/bin/cm_setup.sh
else
echo "error: cannot setup environment"
exit
fi
python -i -c "
import cx_Oracle
import coral_auth
user,pwd,dbn = coral_auth.get_connection_parameters_from_connection_string('oracle://atonr_conf/ATLAS_SFO_T0_R')
orcl = cx_Oracle.connect(user, pwd, dbn)
curs = orcl.cursor()
print('orcl: connection to db object, curs: cursor on the connection')
"
#!/sw/atlas/sw/lcg/releases/LCG_101/Python/3.9.6/x86_64-centos7-gcc11-opt/bin/python -i
import cx_Oracle
import coral_auth
user,pwd,dbn = coral_auth.get_connection_parameters_from_connection_string('oracle://atonr_conf/ATLAS_SFO_T0')
orcl = cx_Oracle.connect(user, pwd, dbn)
curs = orcl.cursor()
#!/usr/bin/env bash
if [ "x$CMTRELEASE" != x ]; then
# TDAQ environment already loaded
echo "using $CMTRELEASE"
elif [ -r /sw/castor/script_setup.sh ]; then
#P1
source /sw/castor/script_setup.sh
elif [ -r /cvmfs/atlas.cern.ch/repo/sw/tdaq/tools/cmake_tdaq/bin/cm_setup.sh ]; then
#testbed
source /cvmfs/atlas.cern.ch/repo/sw/tdaq/tools/cmake_tdaq/bin/cm_setup.sh
else
echo "error: cannot setup environment"
exit
fi
python -i -c "
import cx_Oracle
import coral_auth
user,pwd,dbn = coral_auth.get_connection_parameters_from_connection_string('oracle://atonr_conf/ATLAS_SFO_T0')
orcl = cx_Oracle.connect(user, pwd, dbn)
curs = orcl.cursor()
print('orcl: connection to db object, curs: cursor on the connection')
"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment