1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
##
## To create mapping descriptions, if not already defined here
##
rm -f SiStripPedestals-mapping-default.xml
pool_build_object_relational_mapping -f mapping-template-SiStripPedestals.xml -o SiStripPedestals-mapping-default.xml -d CondFormatsSiStripObjects -c sqlite_file:pippo.db -b -u whoever -p whatever
rm -f pippo.db
cp SiStripPedestals-mapping-default.xml SiStripPedestals-mapping-custom.xml
######################
rm -f SiStripNoises-mapping-default.xml
pool_build_object_relational_mapping -f mapping-template-SiStripNoises.xml -o SiStripNoises-mapping-default.xml -d CondFormatsSiStripObjects -c sqlite_file:pippo.db -b -u whoever -p whatever
rm -f pippo.db
cp SiStripNoises-mapping-default.xml SiStripNoises-mapping-custom.xml
###########################
rm -f SiStripFedCabling-mapping-default.xml
pool_build_object_relational_mapping -f mapping-template-SiStripFedCabling.xml -o SiStripFedCabling-mapping-default.xml -d CondFormatsSiStripObjects -c sqlite_file:pippo.db -b -u whoever -p whatever
rm -f pippo.db
cp SiStripFedCabling-mapping-default.xml SiStripFedCabling-mapping-custom.xml
######################
rm -f SiStripBadStrip-mapping-default.xml
pool_build_object_relational_mapping -f mapping-template-SiStripBadStrip.xml -o SiStripBadStrip-mapping-default.xml -d CondFormatsSiStripObjects -c sqlite_file:pippo.db -b -u whoever -p whatever
rm -f pippo.db
cp SiStripBadStrip-mapping-default.xml SiStripBadStrip-mapping-custom.xml
######################
rm -f SiStripModuleHV-mapping-default.xml
pool_build_object_relational_mapping -f mapping-template-SiStripModuleHV.xml -o SiStripModuleHV-mapping-default.xml -d CondFormatsSiStripObjects -c sqlite_file:pippo.db -b -u whoever -p whatever
rm -f pippo.db
cp SiStripModuleHV-mapping-default.xml SiStripModuleHV-mapping-custom.xml
##################################
# OBSOLETE PART
######################
## edit SiStrip*-mapping-custom.xml change to meaningful names
######################################
## start DBA procedure:
## build real table in oracle db
setenv TNS_ADMIN /afs/cern.ch/project/oracle/admin
pool_build_object_relational_mapping -f SiStripPedestals-mapping-custom.xml -d CondFormatsSiStripObjects -c oracle://devdb10/CMS_COND_STRIP -u CMS_COND_STRIP -p strip_cern200603 -debug >! SiStripPedestals.debug
pool_build_object_relational_mapping -f SiStripNoises-mapping-custom.xml -d CondFormatsSiStripObjects -c oracle://devdb10/CMS_COND_STRIP -u CMS_COND_STRIP -p strip_cern200603 -debug >! SiStripNoises.debug
pool_build_object_relational_mapping -f SiStripFedCabling-mapping-custom.xml -d CondFormatsSiStripObjects -c oracle://devdb10/CMS_COND_STRIP -u CMS_COND_STRIP -p strip_cern200603 -debug >! SiStripFedCabling.debug
pool_build_object_relational_mapping -f mapping-template-CondIOV-default.xml -d CondCoreIOVService -c oracle://devdb10/CMS_COND_STRIP -u CMS_COND_STRIP -p strip_cern200603 -o CondIOV-mapping-default.xml -debug >! SiStripCondIOV.debug
#####################################################
## NOT NEEDED ANYMORE
##to get create statements for DBA record:
##grep CREATE *.debug > SiStripschema.debug
##clean up SiStripschema.debug and replace CMS_XIEZHEN_DEV by SiStrip schema name
## NOT NEEDED ANYMORE
###################################################################
## also change the GRANT SELECT according to setup (still not implemented, do it )
##sqlplus CMS_COND_STRIP/strip_cern200603@devdb10 < grants.sql
## add extra TIME column to the payload tables
sqlplus CMS_COND_STRIP/strip_cern200603@devdb10 < addSiStripPayloadTime.sql
## create METADATA table
sqlplus CMS_COND_STRIP/strip_cern200603@devdb10 < createMetaDataTable.sql
## create catalog tables
setenv POOL_OUTMSG_LEVEL D
FCregisterPFN -p pippo -u relationalcatalog_oracle://devdb10/CMS_COND_STRIP -t POOL_RDBMS > &catalog.debug
grep CREATE catalog.debug
##########################################
## To remove all tables in CMS_COND_STRIP
sqlplus CMS_COND_STRIP/strip_cern200603@devdb10 < clear.sql
##
#########################################
|