IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    mount数据库也可能有LOCAL=NO的进程

    惜分飞发表于 2016-07-29 04:26:19
    love 0

    联系:手机(13429648788) QQ(107644445)QQ咨询惜分飞

    标题:mount数据库也可能有LOCAL=NO的进程

    作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]

    在一次无意中发现mount状态的数据库也有LOCAL=NO的进程,经过分析确定是由于主库连接到备库的nls或者arch进程连接到备库引起的
    发现mount库中有LOCAL=NO的进程

    [oracle@localhost ~]$ sqlplus / as sysdba
    
    SQL*Plus: Release 10.2.0.5.0 - Production on Fri Jul 29 11:59:57 2016
    
    Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.
    
    
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    
    SQL> select database_role ,open_mode from v$database;
    
    DATABASE_ROLE    OPEN_MODE
    ---------------- ----------
    PHYSICAL STANDBY MOUNTED
    
    SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    [oracle@localhost ~]$ ps -ef|grep LOCAL
    oracle   11394     1  0 Apr27 ?        08:08:41 oracleorcl (LOCAL=NO)
    oracle   11398     1  0 Apr27 ?        15:36:29 oracleorcl (LOCAL=NO)
    oracle   18854 18752  0 12:00 pts/2    00:00:00 grep LOCAL
    [oracle@localhost ~]$ ps -ef|grep pmon
    oracle   14374     1  0  2015 ?        00:10:54 ora_pmon_orcl
    oracle   18893 18752  0 12:01 pts/2    00:00:00 grep pmon
    
    SQL>  select sid,status,username from v$session where paddr in
       2  (select addr from v$process where spid in(11394,11398));
    
           SID STATUS   USERNAME
    ---------- -------- ------------------------------
           510 INACTIVE PUBLIC
           507 INACTIVE PUBLIC
    

    查看备库进程连接

    [oracle@localhost ~]$ netstat -natp|grep -E '11394|11398'
    (Not all processes could be identified, non-owned process info
     will not be shown, you would have to be root to see it all.)
    tcp        0      0 192.168.160.22:1521         192.168.160.23:42783        ESTABLISHED 11394/oracleorcl    
    tcp        0      0 192.168.160.22:1521         192.168.160.23:42785        ESTABLISHED 11398/oracleorcl 
    

    主库上查看,确定192.168.160.22是备库

    SQL> show parameter log_archive_dest_2;
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    log_archive_dest_2                   string      service=orcl lgwr async valid_
                                                     for=(online_logfiles,primary_r
                                                     ole) db_unique_name=orcl
    SQL> !tnsping orcl
    
    TNS Ping Utility for Linux: Version 10.2.0.5.0 - Production on 29-JUL-2016 12:20:01
    
    Copyright (c) 1997,  2010, Oracle.  All rights reserved.
    
    Used parameter files:
    
    
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST =192.168.160.22)(PORT = 1521))
     (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))
    OK (0 msec)
    

    查看主库连接

    [oracle@localhost ~]$ netstat -natp|grep "192.168.160.22"
    (Not all processes could be identified, non-owned process info
     will not be shown, you would have to be root to see it all.)
    tcp        0      0 192.168.160.23:42785        192.168.160.22:1521         ESTABLISHED 12394/ora_arc1_orcl 
    tcp        0      0 192.168.160.23:42783        192.168.160.22:1521         ESTABLISHED 12400/ora_lns1_orcl
    

    通过分析确定在mount情况的备库中,会有LOCAL=NO的进程,他们是主库arch和lns进程对应的服务进程

    • dns解析导致opiodr aborting process unknown ospid (7266) as a result of ORA-609类似错误
    • 远程访问ASM
    • 记录一次ARC1: Destination LOG_ARCHIVE_DEST_2 network reconnect abandoned解决
    • 利用oradebug释放被删除文件空间
    • IP=FIRST作用说明
    • 因域名解析导致数据库连接延迟分析
    • ORACLE 12C PDB 维护基础介绍
    • sys用户密码含$ sqlplus登录数据库诡异事件分析
    • linux中不能ping通hostname可能存在问题
    • 操作系统级别做systemstate
    • xdb组件中关于ftp/http监听
    • 修改11.2 RAC 的 SCAN IP


沪ICP备19023445号-2号
友情链接