zoukankan      html  css  js  c++  java
  • sys用户无法远程登陆

    1.用sys用户远程登陆

    [oracle@edbjr2p2 admin]$ sqlplus system/oracle@PROD3 as sysdba

    SQL*Plus: Release 11.2.0.3.0 Production on Wed Jun 12 18:19:27 2019

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

    ERROR:
    ORA-01031: insufficient privileges

    2.开始排查原因

    1)首先tnsping PROD3(检查监听客户端是否能ping通)

    [oracle@edbjr2p2 dbs]$  tnsping PROD3

    TNS Ping Utility for Linux: Version 11.2.0.3.0 - Production on 12-JUN-2019 18:42:00

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

    Used parameter files:


    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = edbjr2p2.example.com)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = PROD3.us.oracle.com)))
    OK (0 msec)
    --以上结果证明监听客户端没问题

    2)参数remote_login_passwordfile参数设置是否正确(应该为exclusive)

    SYS@PROD3>show parameter remote_login_passwordfile

    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    remote_login_passwordfile            string      EXCLUSIVE

    3)检查密码文件是否正确

    SYS@PROD3>select * from v$pwfile_users;   --如果为空,证明密码文件有问题

    4)去查看密码文件

    cd $ORACLE_HOME/dbs

    ls

    发现密码文件名字为:orapwdPROD3  (正确名字格式应为prapwPROD3)

    5)重建密码文件

    [oracle@edbjr2p2 dbs]$ orapwd file=orapwPROD3 password=oracle entries=30 force=y

    6)远程登陆,正常

    [oracle@edbjr2p2 dbs]$ sqlplus sys/oracle@PROD3 as sysdba

    SQL*Plus: Release 11.2.0.3.0 Production on Wed Jun 12 18:51:54 2019

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


    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options

    7)再次查询v$pwfile_users视图,验证密码文件状态,以下即为正常

    SYS@PROD3>select * from v$pwfile_users;

    USERNAME                       SYSDB SYSOP SYSAS
    ------------------------------ ----- ----- -----
    SYS                            TRUE  TRUE  FALSE

  • 相关阅读:
    单向认证
    电商积分支付系统构建经验与总结
    python decimal.quantize()参数rounding的各参数解释与行为
    mysql 由decimal 引起的 Warning: Data truncated for column
    aliyun centos14.04 trusty 上安装docker1.12.1
    使用 py.test 对 python 代码进行测试
    mysql常用增删改查命令(纯纪录.orm用得基本功都没了。)
    python 协程库gevent学习--gevent数据结构及实战(四)
    http请求头中的content-type属性
    坚持做技术写作
  • 原文地址:https://www.cnblogs.com/gw666/p/11011563.html
Copyright © 2011-2022 走看看