zoukankan      html  css  js  c++  java
  • 在Linux环境下设置 ora-01031:insufficient privileges解决方法总结

    今天需要使用sys用户处理问题,但是报错上面ora-01031:insufficient privileges。

    在网上有很多方法,这个是自己经过测试的方法步骤。

    1:首先检查文件sqlnet.ora文件是否设置正确(文件地址就是你oracle安装的目录)

    [html] view plain copy
     
    1. # sqlnet.ora Network Configuration File: /app/oracle/product/10.2.0/network/admin/sqlnet.ora  
    2. # Generated by Oracle configuration tools.  
    3.   
    4. NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT, HOSTNAME)  
    5. <span style="color:#FF0000;">SQLNET.AUTHENTICATION_SERVICES=(ALL)  
    6.   
    7. </span>  

    2:如果上面设置正确(为什么设置可以参考http://blog.csdn.net/huoyin/article/details/45544709)

    然后用ssh等连接工具访问Linux服务器这里注意了如果存在多个实例需要指定  

    登录oracle

    [java] view plain copy
     
    1. su - oracle  

    指定实例

    [java] view plain copy
     
    1. export ORACLE_SID=***  

    3:需要检查系统配置

    登录oracle

    [java] view plain copy
     
    1. sqlplus / as sysdba  

    查询

    [sql] view plain copy
     
    1. SQL> show parameter password  
    2.   
    3. NAME                         TYPE        VALUE  
    4. ------------------------------------ ----------- ------------------------------  
    5. remote_login_passwordfile            string      EXCLUSIVE  
    6. SQL>   


    2:检查有哪些用户

    [sql] view plain copy
     
    1. SQL> select * from v$pwfile_users;  
    2.   
    3. USERNAME                       SYSDB SYSOP  
    4. ------------------------------ ----- -----  
    5. SYS                    TRUE  TRUE  
    6.   
    7. SQL>   

    因为我已经操作过了现在显示是有sys的,没有设置的是空的

    [sql] view plain copy
     
    1. SQL> grant sysdba to sys;  
    2. grant sysdba to sys  
    3. *  
    4. ERROR at line 1:  
    5. ORA-01994: GRANT failed: password file missing or disabled  


    3:现在添加文件退出oracle用户

    [sql] view plain copy
     
    1. SQL> exit  
    2. Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production  
    3. With the Partitioning, OLAP and Data Mining options  
    4. [oracle@dd ~]$   


    4:添加文件

    执行添加加密的建立password文件

    [java] view plain copy
     
    1. [oracle@dd ~]$orapwd file=/app/oracle/product/10.2.0/dbs/orapwprice.ora password=111111 entries=10 force=y  

    因为是linux所以文件明是orapw+实例.ora 
    window是pwd+实例.ora  

    5:重启服务,用sys登录

  • 相关阅读:
    DokuWiki用storage的模式在sae上部署后速度太慢
    让禅道也可以玩BearyChat
    探讨c#中的unchecked是什么意思,起什么作用?
    重温Java的类加载机制
    JVM原理和优化
    为什么使用Redis
    高性能Web服务器Nginx及相关新技术的应用实践-张宴
    潘加宇--领域驱动设计和利润
    程序员跳槽全攻略
    EA强大的画图工具---设计数据库表格
  • 原文地址:https://www.cnblogs.com/guzhanyu/p/7975897.html
Copyright © 2011-2022 走看看