-- Voraussetzung um eine Oracle Resource einzubinden ist, eine virtl. IP Adresse und oracle Disks Group unter Veritas.
root@ws18:etc # grep 192.168.1.153 /etc/hosts
192.168.1.153 ora5a ora5a.wi.de.ves.veritas.com
root@ws18:/ # vxdisk list
DEVICE TYPE DISK GROUP STATUS
c0t0d0s2 sliced rootdisk rootdg online
c0t2d0s2 sliced rootmirror rootdg online
c1t2d0s2 sliced oradg01 oradg online
c1t2d1s2 sliced oradg02 oradg online
c1t2d2s2 sliced nfsdg01 nfsdg online
c1t2d3s2 sliced nfsdg02 nfsdg online
c1t2d4s2 sliced - - error
c1t2d5s2 sliced - - error
c1t2d6s2 sliced - - error
c1t2d7s2 sliced - - error
c1t2d8s2 sliced - - error
c1t2d9s2 sliced - - error
c1t2d10s2 sliced - - error
root@ws18:/ # haconf -makerw
root@ws18:/ # hares -add oradg DiskGroup groupx
VCS:10245:Resource added
NameRule and Enabled attributes must be set before agent monitors
root@ws18:/ # hares -modify oradg Critical 0
root@ws18:/ # hares -modify oradg DiskGroup oradg
root@ws18:/ # hares -modify oradg Enabled 1
root@ws18:/ # hares -online oradg -sys ws18
root@ws18:/ # hares -add baseora Volume groupx
VCS:10245:Resource added
NameRule and Enabled attributes must be set before agent monitors
root@ws18:/ # hares -modify baseora Volume orabase
root@ws18:/ # hares -modify baseora DiskGroup oradg
root@ws18:/ # hares -modify baseora Enabled 1
root@ws18:/ # hares -online baseora -sys ws18
root@ws18:/ # hares -link baseora oradg
root@ws18:/ # hares -add dataora Volume groupx
VCS:10245:Resource added
NameRule and Enabled attributes must be set before agent monitors
root@ws18:/ # hares -modify dataora Volume oradata
root@ws18:/ # hares -modify dataora DiskGroup oradg
root@ws18:/ # hares -modify dataora Enabled 1
root@ws18:/ # hares -online dataora -sys ws18
root@ws18:/ # hares -link dataora oradg
root@ws18:/ # hares -add homeora Volume groupx
VCS:10245:Resource added
NameRule and Enabled attributes must be set before agent monitors
root@ws18:/ # hares -modify homeora Volume orahome
root@ws18:/ # hares -modify homeora DiskGroup oradg
root@ws18:/ # hares -modify homeora Enabled 1
root@ws18:/ # hares -online homeora -sys ws18
root@ws18:/ # hares -link homeora oradg
root@ws18:/ # hares -add baseMount Mount groupx
VCS:10245:Resource added
NameRule and Enabled attributes must be set before agent monitors
root@ws18:/ # hares -modify baseMount BlockDevice /dev/vx/dsk/oradg/orabase
root@ws18:/ # hares -modify baseMount FsckOpt "%-y"
root@ws18:/ # hares -modify baseMount FSType vxfs
root@ws18:/ # hares -modify baseMount MountPoint /u01
root@ws18:/ # hares -modify baseMount Critical 0
root@ws18:/ # hares -modify baseMount Enabled 1
root@ws18:/ # hares -online baseMount -sys ws18
root@ws18:/ # hares -link baseMount baseora
root@ws18:/ # hares -add dataMount Mount groupx
VCS:10245:Resource added
NameRule and Enabled attributes must be set before agent monitors
root@ws18:/ # hares -modify dataMount BlockDevice /dev/vx/dsk/oradg/oradata
root@ws18:/ # hares -modify dataMount FsckOpt "%-y"
root@ws18:/ # hares -modify dataMount FSType vxfs
root@ws18:/ # hares -modify dataMount MountPoint /u02
root@ws18:/ # hares -modify dataMount Critical 0
root@ws18:/ # hares -modify dataMount Enabled 1
root@ws18:/ # hares -online dataMount -sys ws18
root@ws18:/ # hares -link dataMount dataora
root@ws18:/ # hares -add homeMount Mount groupx
VCS:10245:Resource added
NameRule and Enabled attributes must be set before agent monitors
root@ws18:/ # hares -modify homeMount BlockDevice /dev/vx/dsk/oradg/orahome
root@ws18:/ # hares -modify homeMount FsckOpt "%-y"
root@ws18:/ # hares -modify homeMount FSType vxfs
root@ws18:/ # hares -modify homeMount MountPoint /export/oracle
root@ws18:/ # hares -modify homeMount Critical 0
root@ws18:/ # hares -modify homeMount Enabled 1
root@ws18:/ # hares -online homeMount -sys ws18
root@ws18:/ # hares -link homeMount homeora
root@ws18:/ # hares -add ProdOracle Oracle groupx
VCS:10245:Resource added
NameRule and Enabled attributes must be set before agent monitors
root@ws18:/ # hares -modify ProdOracle Critical 0
root@ws18:/ # hares -modify ProdOracle Owner oracle
root@ws18:/ # hares -modify ProdOracle Home /u01/app/oracle/product/8.1.5
root@ws18:/ # hares -modify ProdOracle Pfile /u01/app/oracle/product/8.1.5/dbs/initveritas.ora
root@ws18:/ # hares -modify ProdOracle Sid veritas
root@ws18:/ # hares -modify ProdOracle Enabled 1
root@ws18:/ # hares -online ProdOracle -sys ws18
root@ws18:/ # hares -add ProdListener Sqlnet groupx
VCS:10245:Resource added
NameRule and Enabled attributes must be set before agent monitors
root@ws18:/ # hares -modify ProdListener Critical 0
root@ws18:/ # hares -modify ProdListener Home /u01/app/oracle/product/8.1.5
root@ws18:/ # hares -modify ProdListener Owner oracle
root@ws18:/ # hares -modify ProdListener TnsAdmin /u01/app/oracle/product/8.1.5/network/admin
root@ws18:/ # hares -modify ProdListener Listener LISTENER
root@ws18:/ # hares -modify ProdListener MonScript /opt/VRTSvcs/bin/Sqlnet/LsnrTest.pl
root@ws18:/ # hares -modify ProdListener Enabled 1
root@ws18:/ # hares -online ProdListener -sys ws18
root@ws18:/ # hares -link ProdOracle baseMount
root@ws18:/ # hares -link ProdOracle homeMount
root@ws18:/ # hares -link ProdOracle dataMount
root@ws18:/ # hares -link ProdListener ProdOracle
root@ws18:/ # hares -link ProdListener groupxMIP
-- Anlegen eines Adminstrations User in der Oracle DB, der bei einen Cluster Switch für das korrekte stopen und strten der DB zuständif ist.
root@ws18:/ # su - oracle
oracle@ws18:/export/oracle % sqlplus /nolog
SQL*Plus: Release 8.1.5.0.0 - Production on Fri May 7 16:12:33 2004
(c) Copyright 1999 Oracle Corporation. All rights reserved.
SQL> connect / as sysdba
Connected.
SQL> create user vcs
identified by vcs
default tablespace USERS
quota 500K on USERS;
User created.
SQL> grant create session to vcs ;
Grant succeeded.
SQL> create table vcs.vcstest ( tstamp date );
Table created.
SQL> insert into vcs.vcstest ( tstamp ) values ( SYSDATE );
1 row created.
SQL> select TO_CHAR(tstamp, 'MON DD, YYYY HH:MI:SS AM')tstamp from vcs.vcstest;
TSTAMP
------------------------
MAY 07, 2004 04:15:16 PM
SQL> exit
haconf -dump -makero
root@ws18:/ # haconf -makerw
root@ws18:/ # hares -modify ProdOracle User vcs
root@ws18:/ # hares -modify ProdOracle Pword vcs
root@ws18:/ # hares -modify ProdOracle Table vcstest /opt/VRTSvcs/bin/Oracle/SqlTest.pl
root@ws18:/ # haconf -dump -makero