iis服务器助手广告广告
返回顶部
首页 > 资讯 > 数据库 >Oracle与/etc/hosts关系很暧昧啊~
  • 410
分享到

Oracle与/etc/hosts关系很暧昧啊~

2024-04-02 19:04:59 410人浏览 泡泡鱼
摘要

昨天处理了一个小case,后来发现不知道哪位亲爱的朋友修改了/etc/hosts文件,导致数据库趴下了,记录一下 [root@padb ~]# su - oracle <padb:padb:/hom

昨天处理了一个小case,后来发现不知道哪位亲爱的朋友修改了/etc/hosts文件,导致数据库趴下了,记录一下


[root@padb ~]# su - oracle
<padb:padb:/home/oracle>$
<padb:padb:/home/oracle>$ps -ef|grep ora_
oracle    5874  5847  0 11:35 pts/3    00:00:00 grep ora_
<padb:padb:/home/oracle>$lsnrctl status

LSNRCTL for linux: Version 11.2.0.3.0 - Production on 12-JUL-2018 11:35:33

Copyright (c) 1991, 2011, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))

###########监听卡在这里了####################

<padb:padb:/home/oracle>$ps -ef|grep lsnr
oracle    5808  5757  0 11:34 pts/1    00:00:00 lsnrctl start
oracle    5810     1 99 11:34 ?        00:01:36 /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr LISTENER -inherit
oracle    5877  5847  0 11:35 pts/3    00:00:00 grep lsnr

##############进程在
<padb:padb:/home/oracle>$kill -9 5810
<padb:padb:/home/oracle>$ps -ef|grep lsnr
oracle    5879  5847  0 11:35 pts/3    00:00:00 grep lsnr

##############kill 进程 
<padb:padb:/home/oracle>$sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Thu Jul 12 11:35:56 2018

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Connected.
SQL> 

###############很诡异的一个状态,竟然connected了

##############查看日志
<padb:padb:/home/oracle>$uptime
 11:36:27 up 50 min,  4 users,  load average: 0.42, 0.33, 0.47
<padb:padb:/home/oracle>$adrci

ADRCI: Release 11.2.0.3.0 - Production on Thu Jul 12 11:36:35 2018

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

ADR base = "/u01/app/oracle"
adrci> show alert

Choose the alert log from the following homes to view:

1: diag/clients/user_oracle/host_61728193_80
2: diag/rdbms/padb/padb
3: diag/tnslsnr/localhost/listener
4: diag/tnslsnr/padb/listener
Q: to quit

Please select option: 2
Output the results to file: /tmp/alert_5886_14061_padb_1.ado
2017-12-05 18:40:29.250000 +08:00
Starting ORACLE instance (nORMal)
****************** Large Pages Information *****************

Total Shared Global Region in Large Pages = 0 KB (0%)

Large Pages used by this instance: 0 (0 KB)
Large Pages unused system wide = 0 (0 KB) (alloc incr 64 MB)
Large Pages configured system wide = 0 (0 KB)
Large Page size = 2048 KB

RECOMMENDATION:
  Total Shared Global Region size is 24 GB. For optimal performance,
  prior to the next instance restart increase the number
  of unused Large Pages by atleast 12097 2048 KB Large Pages (24 GB)
  system wide to get 100% of the Shared
  Global Region allocated with Large pages
***********************************************************
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Shared memory segment for instance monitoring created
Picked latch-free SCN scheme 3
Machine:x86_64
VM name:VMWare Version: 6
home_1/dbs/spfilepadb.ora
System parameters with non-default values:
  processes                = 500
  sessions                 = 780
  sga_target               = 24192M
  control_files            = "/u01/app/oracle/padb/control01.ctl"
  control_files            = "/u01/app/oracle/padb/control02.ctl"
  db_block_size            = 8192
  compatible               = "11.2.0.0.0"
  undo_tablespace          = "UNDOTBS1"
  remote_login_passWordfile= "EXCLUSIVE"
  db_domain                = ""
  dispatchers              = "(PROTOCOL=TCP) (SERVICE=padbXDB)"
  audit_file_dest          = "/u01/app/oracle/admin/padb/adump"
  audit_trail              = "DB"
  db_name                  = "padb"
  open_cursors             = 300
  pga_aggregate_target     = 8053M
  diagnostic_dest          = "/u01/app/oracle"
USER (ospid: 5117): terminating the instance due to error 119
ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1
System name:Linux
node name:padb
Release:2.6.32-573.el6.x86_64
Version:#1 SMP Wed Jul 1 18:23:37 EDT 2015
Machine:x86_64
VM name:VMWare Version: 6
Using parameter settings in server-side spfile /u01/app/oracle/product/11.2.0/dbb
home_1/dbs/spfilepadb.ora
System parameters with non-default values:
  processes                = 500
  sessions                 = 780
  sga_target               = 24192M
  control_files            = "/u01/app/oracle/padb/control01.ctl"
  control_files            = "/u01/app/oracle/padb/control02.ctl"
  db_block_size            = 8192
  compatible               = "11.2.0.0.0"
  undo_tablespace          = "UNDOTBS1"
  remote_login_passwordfile= "EXCLUSIVE"
  db_domain                = ""
  dispatchers              = "(PROTOCOL=TCP) (SERVICE=padbXDB)"
  audit_file_dest          = "/u01/app/oracle/admin/padb/adump"
  audit_trail              = "DB"
  db_name                  = "padb"
  open_cursors             = 300
  pga_aggregate_target     = 8053M
  diagnostic_dest          = "/u01/app/oracle"
USER (ospid: 5117): terminating the instance due to error 119
  remote_login_passwordfile= "EXCLUSIVE"
  db_domain                = ""
  dispatchers              = "(PROTOCOL=TCP) (SERVICE=padbXDB)"
  audit_file_dest          = "/u01/app/oracle/admin/padb/adump"
  audit_trail              = "DB"
  db_name                  = "padb"
  open_cursors             = 300
  pga_aggregate_target     = 8053M
  diagnostic_dest          = "/u01/app/oracle"
2018-07-12 09:45:28.043000 +08:00
USER (ospid: 18388): terminating the instance due to error 119
Instance terminated by USER, pid = 18388                           ############实例异常终止了
2018-07-12 09:47:53.701000 +08:00
Starting ORACLE instance (normal)
"/tmp/alert_5886_14061_padb_1.ado" 13117L, 632251C written

<padb:padb:/home/oracle>$df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
                      627G  512G   84G  86% /
tmpfs                  32G   72K   32G   1% /dev/shm
/dev/sda1             477M   42M  410M  10% /boot

<padb:padb:/home/oracle>$
<padb:padb:/home/oracle>$sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Thu Jul 12 11:47:10 2018

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Connected.

SQL> startup
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00130: invalid listener address '(ADDRESS=(PROTOCOL=TCP)(HOST=padb)(PORT=1521))'
SQL> 

##########第一意识ping了一下主机名

<padb:padb:/u01/app/oracle/diag/rdbms/padb/padb/trace>$ping padb
ping: unknown host padb
<padb:padb:/u01/app/oracle/diag/rdbms/padb/padb/trace>$ping padb
ping: unknown host padb
<padb:padb:/u01/app/oracle/diag/rdbms/padb/padb/trace>$hostname
padb
<padb:padb:/u01/app/oracle/diag/rdbms/padb/padb/trace>$more /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

padb  10.18.0.84    ##到这里,只能无语了,外加18个点点点,这是啥啊!!!!
<padb:padb:/u01/app/oracle/diag/rdbms/padb/padb/trace>$ping padb
ping: unknown host padb
<padb:padb:/u01/app/oracle/diag/rdbms/padb/padb/trace>$exit
loGout

####修改host文件
[root@padb ~]# vi /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
10.18.0.84  padb  

"/etc/hosts" 3L, 175C written
[root@padb ~]# 
[root@padb ~]# 
[root@padb ~]# ping padb
PING padb (10.18.0.84) 56(84) bytes of data.
64 bytes from padb (10.18.0.84): icmp_seq=1 ttl=64 time=0.029 ms
64 bytes from padb (10.18.0.84): icmp_seq=2 ttl=64 time=0.021 ms
^C
--- padb ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1804ms
rtt min/avg/max/mdev = 0.021/0.025/0.029/0.004 ms
[root@padb ~]# 

Refer to the SQL*Plus User's Guide and Reference for more information.
<padb:padb:/home/oracle>$sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Thu Jul 12 12:01:43 2018

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 2.5254E+10 bytes
Fixed Size                  2240096 bytes
Variable Size            3221225888 bytes
Database Buffers         2.2012E+10 bytes
Redo Buffers               18718720 bytes
Database mounted.
Database opened.
SQL> exit
您可能感兴趣的文档:

--结束END--

本文标题: Oracle与/etc/hosts关系很暧昧啊~

本文链接: https://www.lsjlt.com/news/39515.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • mysql front的作用
    mysql front 是一个 mysql 数据库管理工具,支持以下主要功能:建立数据库连接,浏览和管理数据库。添加、编辑、删除数据表和记录。编写和执行 sql 查询,检索和分析数据。创...
    99+
    2024-05-29
    mysql linux macos 数据丢失
  • sql server数据库日志满了怎么处理
    当 sql server 数据库日志已满时,解决方法包括:1. 清除未使用的日志;2. 截断日志;3. 增加日志文件大小;4. 自动增长日志文件;5. 更改日志文件路径;6. 备份日志;...
    99+
    2024-05-29
  • sql server数据库显示恢复挂起怎么解决
    解决 sql server 数据库恢复挂起问题:检查错误日志和事件查看器以确定原因;清除损坏的日志文件;从备份恢复数据库;重新启动 sql server 服务;修复损坏的页;如以上步骤无...
    99+
    2024-05-29
  • sql server数据库分离失败解决方法
    要解决 sql server 数据库分离失败问题,需要遵循以下步骤:检查权限,确保拥有足够的权限来分离数据库。关闭所有用户连接,包括系统和应用程序连接。终止可能阻塞分离进程的进程。检查数...
    99+
    2024-05-29
  • mysql锁表怎么使用
    使用 lock tables 语句显式锁定 mysql 表,支持 read(共享锁)、write(排他锁)、low_priority write(排他锁,死锁时优先级较低)等锁类型。隐式...
    99+
    2024-05-29
    mysql
  • mysql查询语法怎么写
    mysql查询语法用于从数据库中检索数据,包括:select关键字、列名、from关键字、where子句和order by子句。where子句使用运算符过滤...
    99+
    2024-05-29
    mysql
  • mysql端口重复了怎么办
    mysql端口重复问题可通过以下步骤解决:检查端口使用情况。停止冲突进程。修改mysql配置文件中的端口号。重启mysql服务。调整防火墙规则以允许新端口。 MySQL 端口重复解决方...
    99+
    2024-05-29
    mysql
  • mysql主从同步怎么实现
    mysql 主从同步实现 什么是 MySQL 主从同步? MySQL 主从同步是一种数据复制机制,其中一台服务器(主服务器)将数据更改复制到一台或多台其他服务器(从服务器)。 如何实现 ...
    99+
    2024-05-29
    mysql
  • mysql远程连接怎么用
    远程连接 mysql 数据库的步骤:启用远程连接(修改配置文件和重启服务器);创建具有远程连接权限的远程用户;允许外部连接(检查防火墙设置);使用 mysql 客户端连接到远程服务器,输...
    99+
    2024-05-29
    mysql linux
  • mysql表损坏怎么修复
    修复 mysql 表损坏:1. 使用 myisamchk 工具(仅适用于 myisam 表);2. 使用 repair table 命令(适用于 myisam 和 innodb 表);3...
    99+
    2024-05-29
    mysql navicat
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作