1.表空间
(1)创建,因为oracle rac 使用ocf (oracle 控制文件系统)一般是asm,所以不用制定文件的路径。
语法为:create tablespace name datafile size 30G auto extend on,extent management local;
sql> create tablespace tbs_test datafile size 1G autoextend on extent management local;
Tablespace created.
sql> select * from dba_data_files;
+DATA1/iwhm/datafile/tbs_test.269.923569637 7 TBS_TEST1073741824 131072 AVAILABLE 7 YES 3.4360E+10 419430212800 1072693248 130944 ONLINE
7 rows selected.
sql>
这里可以看到文件已经创建,并且rac自动加了随机数字在上面,保证文件的唯一性。
(2)扩展,
sql> alter tablespace tbs_test add datafile size 1G autoextend on;
Tablespace altered.
2.生成awr
单机环境下用:@?/rdbms/admin/awrrpt脚本生成
rac :@?/rdbms/admin/awrgrpt
rac会将这里会将所有节点的信息汇总。
3.lsnr
单机环境下用lsnrctl status 可以控制单机的lsnr.
rac环境下是crs(cluster ready service ) 来控制的。另外这里必须说下,具一个10年经验的DBA说,这里为了保证集群状态最好用srvctl 来控制节点的各种操作。
4.crs_ctl -t,crsctl stat res -t
[grid@rac1 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.DATA1.dg ora....up.type ONLINE ONLINE rac1
ora.FRA.dg ora....up.type ONLINE ONLINE rac1
ora....ER.lsnr ora....er.type ONLINE ONLINE rac1
ora....N1.lsnr ora....er.type ONLINE ONLINE rac1
ora.OCR.dg ora....up.type ONLINE ONLINE rac1
ora.asm ora.asm.type ONLINE ONLINE rac1
ora.cvu ora.cvu.type OFFLINE OFFLINE
ora.gsd ora.gsd.type OFFLINE OFFLINE
ora.iwhm.db ora....se.type ONLINE ONLINE rac1
ora....network ora....rk.type ONLINE ONLINE rac1
ora.oc4j ora.oc4j.type OFFLINE OFFLINE
ora.ons ora.ons.type ONLINE ONLINE rac1
ora....SM1.asm application ONLINE ONLINE rac1
ora....C1.lsnr application ONLINE ONLINE rac1
ora.rac1.gsd application OFFLINE OFFLINE
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip ora....t1.type ONLINE ONLINE rac1
ora....SM2.asm application ONLINE ONLINE rac2
ora....C2.lsnr application ONLINE ONLINE rac2
ora.rac2.gsd application OFFLINE OFFLINE
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip ora....t1.type ONLINE ONLINE rac2
ora....ry.acfs ora....fs.type ONLINE ONLINE rac1
ora.scan1.vip ora....ip.type ONLINE ONLINE rac1
[grid@rac1 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA1.dg
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.FRA.dg
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.LISTENER.lsnr
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.OCR.dg
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.asm
ONLINE ONLINE rac1 Started
ONLINE ONLINE rac2 Started
ora.gsd
OFFLINE OFFLINE rac1
OFFLINE OFFLINE rac2
ora.net1.network
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.ons
ONLINE ONLINE rac1
ONLINE ONLINE rac2
ora.registry.acfs
ONLINE ONLINE rac1
ONLINE ONLINE rac2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE rac1
ora.cvu
1 OFFLINE OFFLINE
ora.iwhm.db
1 ONLINE ONLINE rac1 Open
2 ONLINE ONLINE rac2 Open
ora.oc4j
1 OFFLINE OFFLINE
ora.rac1.vip
1 ONLINE ONLINE rac1
ora.rac2.vip
1 ONLINE ONLINE rac2
ora.scan1.vip
1 ONLINE ONLINE rac1
[grid@rac1 ~]$
后者除了集群还有实例的状态,前者则没有。
原文链接:https://www.f2er.com/oracle/212479.html