欢迎进入Oracle社区论坛,与200万技术人员互动交流 >>进入 1. 可以配置一些Oracle用到的变量 export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1 export ORACLE_SID=NEWRAC2 ORACLE_HOSTNAME="newrac01.hq.lumigen
欢迎进入Oracle社区论坛,与200万技术人员互动交流 >>进入
1. 可以配置一些Oracle用到的变量
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
export ORACLE_SID=NEWRAC2
ORACLE_HOSTNAME="newrac01.hq.lumigent.int"
export PATH=/u01/app/oracle/product/11.1.0/db_1/bin:$PATH
export ORA_CRS_HOME=/u01/app/crs/product/11.1.0/crs
export PATH=/u01/app/crs/product/11.1.0/crs/bin:$PATH
export ORACLE_USER=orarac
2. crsctl ,检查crs
crsctl check crs 检查crs状态
crsctl start crs 启动crs
crsctl stop crs
crsctl check crsd
crs_stat -t
等等,其 /etc/init.d/init.crs stop /etc/init.d/init.crsd stop 等开机启动service 脚本如果
如果你发现crs不能正常工作可以检查调试一下这些脚本,检查一下进程是不是这个脚本可以正常工作。
crs的启动log 在 $ORA_CRS_HOME/log $ORA_CRS_HOME/log/client 下面可以找到。出现错误可以检查一下对应的log
3. srvctl 启动数据库与实例
srvctl start database -d NEWRAC 启动名字为NEWRAC的数据库
查看当前数据库的状态
[root@newrac02 ~]# srvctl status database -d NEWRAC
Instance NEWRAC1 is running on node newrac01
Instance NEWRAC2 is running on node newrac02
srvctl start instance -d NEWRAC -i newrac1 启动某一个实例
4、检查rac的配置文件 ,可以在里面找到数据库的名字等
/u01/oradata/NEWRAC/spfileNEWRAC.ora
/u01/app/oracle/admin/NEWRAC/pfile/init.ora.5302010204445
另附网络上找到的几篇文章:
Day-to-day management of Oraclehttp://www.6api.com/day-to-day-management-of-oracle-10g-rac/
==================================================
Day-to-day management of Oracle 10G RAC
CRS management
rnCRSCTL command control of the CRS Services local node (Oracle clusterware processes)
rn stop CRS:
rn $ crsctl stop crs or
rn $ / etc / init.crs stop or
rn $ crs_stop-all
rn start CRS:
rn $ crsctl start crs or
rn $ / etc / init.crs start
rn prohibited Clusterware restart automatically at system startup methods:
rn $ / etc / init.crs disable
rn start Clusterware restart automatically at system startup methods:
rn $ / etc / init.crs enable
rn view the status CRS Services
rn $ crsctl check crs
rnOCR resource management
rnOCR resources, when the RAC cluster up and running successfully, you can use the instrument crs_stat see the following:
rn $ ORA_CRS_HOME / bin / crs_stat
rn general, the status of all resources should be online. In addition, OCR will be four hours each to back up first. Have some cases you can restore the OCR configuration file to restore problems OCR.
rn such as the use of the following situations occur:
rn $ crs_stat-t
rnCRS-0184: Cannot communicate with the CRS daemon.
rn $ crsctl check boot
rnFailure 4 at procr_open_key with status 4.
rnPROC-4: The cluster registry key to be operated on does not exist.
rn $ crsctl check crs
rnFailure 1 contacting CSS daemon
rnCannot communicate with CRS
rnCannot communicate with EVM
rn caused this error may be due to a lost OCR configuration. We can use this backup to restore the previous configuration.
[1] [2] [3] [4] [5]

oracle asm指的是“自动存储管理”,是一种卷管理器,可自动管理磁盘组并提供有效的数据冗余功能;它是做为单独的Oracle实例实施和部署。asm的优势:1、配置简单、可最大化推动数据库合并的存储资源利用;2、支持BIGFILE文件等。

方法:1、利用“select*from user_indexes where table_name=表名”语句查询表中索引;2、利用“select*from all_indexes where table_name=表名”语句查询所有索引。

在Oracle中,可利用lsnrctl命令查询端口号,该命令是Oracle的监听命令;在启动、关闭或重启oracle监听器之前可使用该命令检查oracle监听器的状态,语法为“lsnrctl status”,结果PORT后的内容就是端口号。

在oracle中,可以利用“TO_SINGLE_BYTE(String)”将全角转换为半角;“TO_SINGLE_BYTE”函数可以将参数中所有多字节字符都替换为等价的单字节字符,只有当数据库字符集同时包含多字节和单字节字符的时候有效。

在oracle中,可以利用“drop sequence sequence名”来删除sequence;sequence是自动增加数字序列的意思,也就是序列号,序列号自动增加不能重置,因此需要利用drop sequence语句来删除序列。

方法:1、利用“LOWER(字段值)”将字段转为小写,或者利用“UPPER(字段值)”将字段转为大写;2、利用“REGEXP_LIKE(字符串,正则表达式,'i')”,当参数设置为“i”时,说明进行匹配不区分大小写。

在oracle中,可以利用“select ... From all_tab_columns where table_name=upper('表名') AND owner=upper('数据库登录用户名');”语句查询数据库表的数据类型。

方法:1、利用“alter system set sessions=修改后的数值 scope=spfile”语句修改session参数;2、修改参数之后利用“shutdown immediate – startup”语句重启服务器即可生效。


热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

AI Hentai Generator
免费生成ai无尽的。

热门文章

热工具

SublimeText3 英文版
推荐:为Win版本,支持代码提示!

SublimeText3汉化版
中文版,非常好用

WebStorm Mac版
好用的JavaScript开发工具

SublimeText3 Mac版
神级代码编辑软件(SublimeText3)

SublimeText3 Linux新版
SublimeText3 Linux最新版