zoukankan      html  css  js  c++  java
  • 采用dbstart脚本启动的一些错误——解决

    在linux系统下,用root用户采用dbstart脚本直接启动oracle服务或监听

    第一个问题:启动服务的同时没有启动监听

    [root@localhost ~]# su - oracle -c "dbstart"
    ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener
    Usage: /oradata/oracle/112/bin/dbstart ORACLE_HOME
    Processing Database instance "orcl": log file /oradata/oracle/112/startup.log

    ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener这个提示说明
    启动oracle服务的同时没有启动oracle监听服务,因此如果想在启动oracle服务的同时i启动监听
    就需要修改dbstart,将ORACLE_HOME_LISTNER值设为$ORACLE_HOME(原来是为$1)
    [root@localhost ~]# vi /oradata/oracle/112/bin/dbstart

    注:dbshut一样的道理,如果想关闭数据库服务的同时关闭监听服务也是将dbshut文件中的ORACLE_HOME_LISTNER值设为$ORACLE_HOME

    修改后再次执行dbstart
    [root@localhost ~]# su - oracle -c "dbstart"
    Processing Database instance "orcl": log file /oradata/oracle/112/startup.log
    查看启动日志,发现提示权限不足
    [root@localhost ~]# cat /oradata/oracle/112/startup.log

    /oradata/oracle/112/bin/dbstart: Starting up database "orcl"
    2012年 04月 14日 星期六 12:12:17 CST


    SQL*Plus: Release 11.2.0.1.0 Production on Sat Apr 14 12:12:17 2012

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

    SQL> ERROR:
    ORA-01031: insufficient privileges


    SQL> ORA-01031: insufficient privileges
    SQL>
    /oradata/oracle/112/bin/dbstart: Database instance "orcl" warm started.

    第二个问题:不同登录方式下权限的认证问题
    直接手动登陆以sqlplus / as sysdba方式 登陆,提示权限不足

    [oracle@localhost ~]$ sqlplus / as sysdba

    SQL*Plus: Release 11.2.0.1.0 Production on Sat Apr 14 12:17:48 2012

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

    ERROR:
    ORA-01031: insufficient privileges


    Enter user-name:
    ERROR:
    ORA-01017: invalid username/password; logon denied


    Enter user-name:
    ERROR:
    ORA-01017: invalid username/password; logon denied


    SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus

    但是如果先以sqlplus /nolog,在以sys用户登陆就可以
    [oracle@localhost ~]$ sqlplus /nolog

    SQL*Plus: Release 11.2.0.1.0 Production on Sat Apr 14 12:17:58 2012

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

    SQL> conn sys/xxx@orcl as sysdba
    Connected to an idle instance.


    修改sqlnet.ora文件,将SQLNET.AUTHENTICATION_SERVICES=(NTS)这句话注释或值改为ALL

    修改后再次直接以sqlplus / as sysdba方式登陆就可以了
    [oracle@localhost ~]$ sqlplus / as sysdba

    SQL*Plus: Release 11.2.0.1.0 Production on Sat Apr 14 12:26:44 2012

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

    Connected to an idle instance.
    SQL> exit
    Disconnected


    因此直接再次执行dbstart,这次成功启动oracle服务了
    [oracle@localhost ~]$ su - oracle -c "dbstart"
    口令:
    Processing Database instance "orcl": log file /oradata/oracle/112/startup.log

    说明:关于第二个问题,可查看  这篇文章。
  • 相关阅读:
    杭电 1521 排列组合

    杭电 1799 循环多少次?
    杭电1028 Ignatius and the Princess III(整数拆分)
    毕业论文A.1 Matlab环境配置
    Open Graphics Library初步_搭建环境_GLUT
    Open Graphics Library初步_摄影机_GLUT
    C#使用office相关com组件
    插入排序
    二叉树的四种遍历方法(递归、迭代)
  • 原文地址:https://www.cnblogs.com/lanzi/p/2450930.html
Copyright © 2011-2022 走看看