status of the databases. peter chochula & svetozár kapusta 20.09.2004 alice dcs workshop...
TRANSCRIPT
Status of the Databases
20.09.2004 ALICE DCS Workshop
Peter Chochula & Svetozár Kapusta
Motivation for Oracle
• Best in:♦ Performance over network♦ Security♦ Scalability♦ Load balancing♦ Data storage redundancy
• PVSS 3.0 supports Oracle
20.09.2004 ALICE DCS Workshop
Peter Chochula & Svetozár Kapusta
Oracle 10g
• Latest version Oracle 10g (10.1.0.2)• Free Oracle 10g database (~600MB) download from
www.oracle.com (registration needed)• Online Documentation• Supports all OS platforms
– Linux x86– Linux Itanium– Microsoft Windows (32-bit)– Microsoft Windows (64-bit Itanium)– Solaris Operating System (SPARC) (64-bit)– AIX5L– HP-UX PA-RISC– HP Tru64 UNIX– HP-UX Itanium– IBM z/OS
20.09.2004 ALICE DCS Workshop
Peter Chochula & Svetozár Kapusta
Oracle 10g
• System requirements♦ RAM: 1 GB minimum ♦ Virtual memory: 512 MB ♦ Hard disk space: ~2.8 GB♦ Temp disk space: 140 MB ♦ Video adapter: 256 color
20.09.2004 ALICE DCS Workshop
Peter Chochula & Svetozár Kapusta
Oracle 10g installation
• Installation♦ Basic♦ Advanced (Installation Type, DB
Configuration, Management, File Storage, Backup and Recovery Options)
20.09.2004 ALICE DCS Workshop
Peter Chochula & Svetozár Kapusta
Oracle 10g installation
• Download ~1-2 hours
• Actual installation ~1-2 hours♦ Set up users & passwords♦ No restart needed♦ No “full” uninstallation possible
20.09.2004 ALICE DCS Workshop
Peter Chochula & Svetozár Kapusta
Oracle 10g
• Licensing
♦ We (Oracle Corp.) grant you a nonexclusive, nontransferable limited license to use the programs only for the purpose of developing a single prototype of your application, and not for any other purpose.
20.09.2004 ALICE DCS Workshop
Peter Chochula & Svetozár Kapusta
Oracle 10g
• DB Access♦ Web access for DB users and administrators
(called Enterprise Manager Console)♦ Web access with own code (PHP-Apache)♦ C++ access based on ADO
20.09.2004 ALICE DCS Workshop
Peter Chochula & Svetozár Kapusta
PHP-Apache-Oracle10g• <?php• if ($c=OCILogon("scott", "tiger", "dcsconf")) {echo "Successfully connected to
Oracle.<br>";• $stmt=OCIParse($c, "select * from scott.dcs");• OCIExecute($stmt, OCI_DEFAULT);• while (ocifetchinto($stmt, $row, OCI_BOTH)) {• echo $row[0]." and ".$row['ID']." is the same<br>";• echo $row[1]." and ".$row['CISLO']." is the same<br>";}• echo ocirowcount($stmt) . " rows<br />";• $committed = OCICommit($c);• if (!$committed) {$error = OCIerror($c);• echo 'Commit failed. Oracle reports: ' . $error['message'];}• OCILogoff($c);}• else {• $err = OCIError();• echo "Oracle Connect Error " . $err[text];• }• ?>
20.09.2004 ALICE DCS Workshop
Peter Chochula & Svetozár Kapusta
C++ ADO Oracle10g• connstring[]="Driver={Microsoft ODBC for Oracle};";• CREATEiNSTANCE(spCON,Connection);• spCON->ConnectionString = connstring; • spCON->Open("DSN=dcsconf","scott","tiger",0);• CREATEiNSTANCE(svetest,Recordset) • svetest->PutRefActiveConnection( spCON );• sprintf(a, "SELECT * FROM scott.dcs");• svetest->Open(a, vtMissing,adOpenKeyset,adLockOptimistic, -1);• svetest->MoveFirst();• while(svetest->adoEOF == false) {• ID=(unsigned long)RsITEM(svetest,"ID");• svetest->MoveNext();}• svetest->Close();
20.09.2004 ALICE DCS Workshop
Peter Chochula & Svetozár Kapusta
DB’s performance testsDB server and client are on the same PC
0
1000
2000
3000
4000
5000
6000
7000
8000
9000
10000
0 1 2 3 4 5
Tim
e[m
s] MySQL
Oracle9i
Oracle10g
20.09.2004 ALICE DCS Workshop
Peter Chochula & Svetozár Kapusta
DB’s performance testsDB Read
0
2000
4000
6000
8000
10000
12000
0 1 2 3 4 5
Read number
Tim
e [m
s] MySQL over network
Oracle10g over network
Oracle9i over network
20.09.2004 ALICE DCS Workshop
Peter Chochula & Svetozár Kapusta
10g’s performance testsPC accessing DB config. data
0
2000
4000
6000
8000
10000
12000
14000
0 2 4 6
Read number
Tim
e [
ms
]
3 PC Access (1 isserver)
2 PC Access (1 is server)
2 PC Access
3 PC Access (differentdata in a table) (1 isserver)
1 PC Access
20.09.2004 ALICE DCS Workshop
Peter Chochula & Svetozár Kapusta
10g’s performance testsPC accessing DB config. Data (different DB server)
0
2000
4000
6000
8000
10000
12000
14000
16000
0 1 2 3 4 5 6
Read number
Tim
e [
ms
] 3 PC Access (1 isserver)
1 PC Access
20.09.2004 ALICE DCS Workshop
Peter Chochula & Svetozár Kapusta
Thank you for your attentionAny questions ?