Oracle RAC haldamine
Allikas: Kuutõrvaja
Sisukord
Sissejuhatus
TODO
Klastri omadused
TODO
Võrk
RAC kasutab nn VIP aadresse, mille poole kliendid pöörduvad. VIP aadressid on seadistatud nn eth aliastena, eth0:0 jne. Klastrihalduse tarkvara tegeleb nende arvutite vahel liigutamisega.
Salvestusseadmed
# /etc/init.d/oracleasm listdisks DATA1 FRA1 GRID RLOG1 RLOG2
# multipath -ll | grep HITACHI backup1 (360060e80102d1dc00511c564000003f1) dm-16 HITACHI,DF600F 360060e80102d1dc00511c56400000010 dm-1 HITACHI,DF600F grid (360060e80102d1dc00511c564000003ec) dm-2 HITACHI,DF600F fra1 (360060e80102d1dc00511c564000003f0) dm-14 HITACHI,DF600F 360060e80102d1dc00511c56400000002 dm-0 HITACHI,DF600F rlog2 (360060e80102d1dc00511c564000003ee) dm-4 HITACHI,DF600F rlog1 (360060e80102d1dc00511c564000003ed) dm-3 HITACHI,DF600F data1 (360060e80102d1dc00511c564000003ef) dm-12 HITACHI,DF600
Protsessid
- grid kasutajana töötavad klastri protsessid
- oracle kasutajana töötavad andmebaasi protsessid
- Klastri õla peatamine, seejuures võtavad allesjäänud node'id vip aadressid üle
# /u01/app/11.2.0/grid/bin/crsctl stop cluster
- Klastri ressursside nimekiri
grid$ . system/env.sh grid$ crsctl status resource -t
- RAC node'il instance'i seiskamiseks
oracle$ . system/env.sh oracle$ srvctl stop instance -d dba -i dba2
- RAC node'il andmebaasi seiskamiseks
oracle$ srvctl stop database -d dba
- Käivitamiseks
oracle$ srvctl start database -d dba
- Teenuse peatamine node'il
oracle$ srvctl stop service -d dba -s loomad.test.loomaaed -n oradb2
- Kogu klastri peatamine, esimene korraldus kõigil klastri komponentidel, teine ühel suvalisel ja viimane kõigil
oracle$ emctl stop dbconsole # /u01/app/11.2.0/grid/bin/crsctl stop cluster -all # shutdown -h now
Logi
- Klastri peamine logifail on
/u01/app/11.2.0/grid/log/oradb2a/alertoradb2a.log
Kasutamine
- Instant Clientiga ja ilma tnsnames.ora seadistusfailita
$ LD_LIBRARY_PATH=. ./sqlplus kasutajanimi/parool@"(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST = 10.100.7.66)(PORT = 1521))(CONNECT_DATA=(SID = dba1)))" $ LD_LIBRARY_PATH=. ./sqlplus kasutajanimi/parool@"(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST = 10.100.7.67)(PORT = 1521))(CONNECT_DATA=(SID = dba2)))" $ LD_LIBRARY_PATH=. ./sqlplus kasutajanimi/parool@"(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST = 10.100.7.68)(PORT = 1521))(CONNECT_DATA=(SID = dba3)))"
Varundamine
Varundamise ajal peavad
- rakendused seisma
- andmebaas ja klaster töötama
oracle kasutajana tuleb viimasel klastri komponendil öelda
oracle$ . ./system/env.sh oracle$ rman target / nocatalog Recovery Manager: Release 11.2.0.1.0 - Production on Thu Sep 23 16:04:32 2010 Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved. connected to target database: DBA (DBID=1175559531) using target database control file instead of recovery catalog RMAN> backup database; Starting backup at 23-SEP-10 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=22 instance=dba2 device type=DISK channel ORA_DISK_1: starting compressed full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup set input datafile file number=00022 name=+DATA/dba/datafile/webmdata.281.720112973 ... input datafile file number=00034 name=+DATA/dba/datafile/it_indx.290.726595429 channel ORA_DISK_1: starting piece 1 at 23-SEP-10 channel ORA_DISK_1: finished piece 1 at 23-SEP-10 piece handle=/u02/rman/mmlokipe_1_1 tag=TAG20100923T160402 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:43:56 Finished backup at 23-SEP-10 Starting Control File and SPFILE Autobackup at 23-SEP-10 piece handle=/u02/autobackup/c-1175559231-20100923-02 comment=NONE Finished Control File and SPFILE Autobackup at 23-SEP-10 RMAN>
Tulemus tekib kataloogi /u02/rman.