oracle在linux配置信息
这两天在linux中给已有的oracle添加新实例,其中涉及数据库服务、监听配置,oracle服务是否正常、监听是否成功等操作,特此记录存档,以备后用。
- oracle服务启动操作命令
1、查看oracle服务是否启动
ps -ef|grep ora
2、重启数据库命令
dbstart
要直接执行dbstartt必须在/etc/profile中对oracle配置环境变量,内容如下
export ORACLE_HOME=/usr/oracle/app/oracle/product/11.2.0/dbhome1
export PATH=$PATH:$ORACLE_HOME/bin
另外dbstart只能在oracle账户中使用。但/etc/profile文件修改需要在root下操作
3、在sqlplus中启动多个数据库实例
以下这些操作需要在oracle账户中进行操作
a、启动默认的数据库实例
#sqlplus / as sysdba
#startup
#quit
b、启动第二个数据库实例
#export ORACLE_SID=数据库实例名
#sqlplus / as sysdba
#startup
#quit
- oracle监听查看和启动命令
监听的命令都必须在oracle账户下才能执行,这是因为只对oracle账户配置环境变量
1、查看监听状态
lsnrctl status
2、添加监听数据库
lsnrctl start pujinet
3、重启监听
a、先停止监听
lsnrctl stop
b、启动监听
lsnrctl start
- oracle单监听多实例的监听文件的配置
打开listener.ora文件,不同人安装,路径有所不同
vi /usr/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.31.20)(PORT = 1521))
)
)
ADR_BASE_LISTENER = /usr/oracle/app SID_LIST_LISTENER = (
SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = orcl)
(ORACLE_HOME = /usr/oracle/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = orcl)
) (SID_DESC =
(GLOBAL_DBNAME = dev)
(ORACLE_HOME = /usr/oracle/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = dev)
)
(SID_DESC =
(GLOBAL_DBNAME = pujinet)
(ORACLE_HOME = /usr/oracle/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = pujinet)
)
)
- oracle客户端软件连接不同实例配置文件
打开tnsnames.ora,新增需要的实例连接配置
SID_LIST_LISTENER = (
SID_LIST = (
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /usr/oracle/app/oracle/product/11.2.0/dbhome_1)
(PROGRAM = extproc)
) #setting orcl
(SID_DESC =
(GLOBAL_DBNAME = orcl)
(ORACLE_HOME = /usr/oracle/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = orcl)
) #setting dev
(SID_DESC =
(GLOBAL_DBNAME = dev)
(ORACLE_HOME = /usr/oracle/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = dev)
) #setting pujinet
(SID_DESC =
(GLOBAL_DBNAME = pujinet)
(ORACLE_HOME = /usr/oracle/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = pujinet)
)
)
)
查看端口号
netstat -nltp |grep svn
查看环境变量
env
实现自动监听
Oracle监听器帮助
1.查看所有的监听器命令
lsnrctl hep命令可以显示所有可用的监听器命令。在oracle11g中其输出如下:
- start - Start the Oracle listener
- stop - Stop the Oracle listener
- status - Display the current status of the Oracle listener
- services - Retrieve the listener services information
- version - Display the oracle listener version information
- reload - This will reload the oracle listener SID and parameter files. This is equivalent to lsnrctl stop and lsnrctl start.
- save_config - This will save the current settings to the listener.ora file and also take a backup of the listener.ora file before overwriting it. If there are no changes, it will display the message “No changes to save for LISTENER”
- trace - Enable the tracing at the listener level. The available options are ‘trace OFF’, ‘trace USER’, ‘trace ADMIN’ or ‘trace SUPPORT’
- spawn - Spawns a new with the program with the spawn_alias mentioned in the listener.ora file
- change_password - Set the new password to the oracle listener (or) change the existing listener password.
- show - Display log files and other relevant listener information.
oracle在linux配置信息的更多相关文章
- linux 配置信息
# uname -a # 查看内核/操作系统/CPU信息 # head -n 1 /etc/issue # 查看操作系统版本 # cat /proc/cpuinfo # 查看CPU信息 # hostn ...
- linux配置信息收集
CPU型号:# cat /proc/cpuinfo |grep "model name"# cat /proc/cpuinfo | grep name | cut -f2 -d: ...
- 【无网条件下】Linux系统、jdk、redis及集群、rabbitmq、nginx、weblogic和oracle安装及配置
本篇文章为原创,仅供参考使用,如果需要文章中提到的所有软件安装包和依赖包(即data),请以博客园邮箱联系获取链接. 准备资料 软件 主要软件包版本 路径 系统镜像 CentOS-6.10-x86_6 ...
- 如何查看LINUX 硬件配置信息
如何查看LINUX 硬件配置信息 在网上找了N久,发现了一篇不错的文档,转载一下: 1.查看机器所有硬件信息: dmidecode |more dmesg |more 这2个命令出来的信息都非常多,所 ...
- Linux如何查看机器的配置信息
Linux如何查看机器的配置信息 1.查看内存信息 cat /proc/meminfo [root@web ~]# cat /proc/meminfo MemTotal: kB MemFree: kB ...
- linux下如何查看服务器的硬件配置信息
性能测试时一定要确定测试环境和的硬件配置.软件版本配置,保证和线上一致,才更接近真实环境. 那么linux下如何查看服务器的硬件配置信息?? 一.查看cpu信息 1.所有信息 lscpu [root@ ...
- 收集linux网络配置信息的shell脚本
此脚本已在CentOS/ RHEL和Fedora Linux操作系统下进行测试过.可用于当前网络配置信息. 代码: #!/bin/bash # HWINF=/usr/sbin/hwinfo IFCFG ...
- Oracle Enterprise Linux 64-bit 下Oracle11g的监听配置修改及测试步骤
测试环境:Oracle Enterprise Linux 64-bit (5.8版本) + Oracle 11g 64位 相关说明: Oracle11g64位软件的安装位置为/u01/app/orac ...
- Linux查看CPU和内存的配置信息
CPU配置信息:frank@ubuntu:~/test/python$ cat /proc/cpuinfo processor : #系统中逻辑处理核的编号 vendor_id : GenuineIn ...
随机推荐
- 关于android app两次点击返回键退出的处理
现在的android app在开发时,引入了两次点击返回键退出app的设计 为了避免用户误触,这个设计很人性化 中文网上社区有些同学贴了一些实现的例子,我觉得不是很好 代码如下 public bool ...
- JSON取代XML?--JSON入门指南
定义 JSON(JavaScript Object Notation) 是一种轻量级的数据交换格式. JSON采用完全独立于语言的文本格式,但是也使用了类似于C语言家族的习惯(包括C, C++, C# ...
- 【技术贴】解决支付宝充值信用卡还款跳转到网上银行报错Error 404 - Not Found
声明 : 本文在 GFDL 1.2 下发布,本文出处光大银行信用卡 http://bbs.090989.com/forum-186-1.html http://androidgao.blogspot ...
- java 伪共享
MESI协议及RFO请求典型的CPU微架构有3级缓存, 每个核都有自己私有的L1, L2缓存. 那么多线程编程时, 另外一个核的线程想要访问当前核内L1, L2 缓存行的数据, 该怎么办呢?有人说可以 ...
- 在DJANGO的类视图中实现登陆要求和权限保护
以前接触的是基于函数的保护,网上材料比较多. 但基于类视图的很少. 补上! Decorating class-based views 装饰类视图 对于类视图的扩展并不局限于使用mixin.你也可以使用 ...
- input text 不可编辑的解决办法
<div class="inp bg"> <input id="inp-query" type="text" name=& ...
- Ubuntu小技巧——怎样安装谷歌Chrome浏览器
对于刚刚开始使用Ubuntu并想安装谷歌Chrome浏览器的新用户来说,本文所介绍的方法是最快捷的.在Ubuntu上安装谷歌Chrome的方法有很多.一些用户喜欢直接在谷歌Chrome下载页面获得 d ...
- Host group 信息
- 【HDOJ】1325 Is It A Tree?
并查集.需要考虑入度. #include <stdio.h> #include <string.h> #define MAXNUM 10005 int bin[MAXNUM]; ...
- poj3709
首先我们发现将一段数变为同一个数比间隔着搞肯定优,因为数列是升序的,然后不难得到方程式f[i]=min(f[j]+sum[i]-sum[j]-(i-j)*a[j+1]) (i-j>=m)简单的斜 ...