oracle failed to add,oracle add a user

SQL> create user avicroot identified by P4;

SQL>  grant connect to avicroot;

SQL>  grant dba       to avicroot;

SQL> grant sysdba to avicroot;

grant sysdba to avicroot

*

ERROR at line 1:

ORA-01994: GRANT failed: cannot add users to public password file

SQL> show parameter spfile;

NAME TYPE VALUE

------------------------------------ ----------- ------------------------------

spfile string

SQL> create spfile from pfile;

File created.

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup

ORACLE instance started.

Total System Global Area 581506616 bytes

Fixed Size 452152 bytes

Variable Size 402653184 bytes

Database Buffers 167772160 bytes

Redo Buffers 10629120 bytes

Database mounted.

Database opened.

SQL> show parameter spfile;

NAME TYPE VALUE

------------------------------------ ----------- ------------------------------

spfile string ?/dbs/spfile@.ora

SQL> grant sysdba to avicroot;

grant sysdba to avicroot

*

ERROR at line 1:

ORA-01994: GRANT failed: cannot add users to public password file

SQL> show parameter remote;

NAME TYPE VALUE

------------------------------------ ----------- ------------------------------

remote_archive_enable string true

remote_dependencies_mode string TIMESTAMP

remote_listener string

remote_login_passwordfile string NONE

remote_os_authent boolean FALSE

remote_os_roles boolean FALSE

SQL> alter system set remote_login_passwordfile=exclusive scope=spfile;

System altered.

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup

ORACLE instance started.

Total System Global Area 581506616 bytes

Fixed Size 452152 bytes

Variable Size 402653184 bytes

Database Buffers 167772160 bytes

Redo Buffers 10629120 bytes

ORA-01990: error opening password file ‘/u01/oravis/visdb/9.2.0/dbs/orapw‘

ORA-27037: unable to obtain file status

Linux Error: 2: No such file or directory

Additional information: 3

[[email protected] 9.2.0]$ cd dbs

[[email protected] dbs]$ ll

total 80

-rw-r--r-- 1 oravis dba 12920 Mar 10 2002 initdw.ora

-rw-r--r-- 1 oravis dba 8385 Mar 10 2002 init.ora

-rw-r--r-- 1 oravis dba 19651 Jan 9 23:04 initVIS_noaq.ora

-rw-r--r-- 1 oravis dba 19605 Jan 9 22:56 initVIS.ora

-rw-rw---- 1 oravis dba 24 Jan 12 11:11 lkVIS

-rw-r----- 1 oravis dba 5632 Jan 12 11:10 spfileVIS.ora

-rw-r--r-- 1 oravis dba 0 Jan 9 23:04 VIS_rhel39_ifile.ora

[[email protected] dbs]$ pwd

/u01/oravis/visdb/9.2.0/dbs

[[email protected] dbs]$ echo $ORACLE_SID

VIS

[[email protected] dbs]$ orapwd file=/u01/oravis/visdb/9.2.0/dbs/orapwVIS password=manager entries=10

[[email protected] dbs]$ ls -l orapw*

-rwSr----- 1 oravis dba 2560 Jan 12 11:14 orapwVIS

[[email protected] dbs]$ exit

exit

SQL> alter database open;

Database altered.

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup

ORACLE instance started.

Total System Global Area 581506616 bytes

Fixed Size 452152 bytes

Variable Size 402653184 bytes

Database Buffers 167772160 bytes

Redo Buffers 10629120 bytes

Database mounted.

Database opened.

SQL> grant sysdba to avicroot;

Grant succeeded.

C:\Windows\System32\drivers\etc>sqlplus [email protected]:1521/VIS as sysdba

SQL*Plus: Release 10.2.0.5.0 - Production on 星期日 1月 12 11:16:49 2020

Copyright (c) 1982, 2010, Oracle. All Rights Reserved.

ERROR:

ORA-12547: TNS: 丢失连接

请输入用户名:

[[email protected] oravis]$ cd /u01/oravis/visdb/9.2.0/network/admin

[[email protected] admin]$ cd VIS_rhel39/

[[email protected] VIS_rhel39]$ pwd

/u01/oravis/visdb/9.2.0/network/admin/VIS_rhel39

[[email protected] VIS_rhel39]$ ll

total 20

-rw-r--r-- 1 oravis dba 2 Jan 9 23:04 listener_ifile.ora

-rw-r--r-- 1 oravis dba 1239 Jan 9 23:04 listener.ora

-rw-r--r-- 1 oravis dba 2 Jan 9 23:04 sqlnet_ifile.ora

-rw-r--r-- 1 oravis dba 678 Jan 9 23:04 sqlnet.ora

-rw-r--r-- 1 oravis dba 2046 Jan 9 23:04 tnsnames.ora

[[email protected] VIS_rhel39]$ cat sqlnet.ora

###############################################################

#

# This file is automatically generated by AutoConfig. It will be read and

# overwritten. If you were instructed to edit this file, or if you are not

# able to use the settings created by AutoConfig, refer to Metalink document

# 165195.1 for assistance.

#

#$Header: NetServiceHandler.java 115.33 2004/09/22 08:21:05 dvijayas ship $

#

###############################################################

NAMES.DIRECTORY_PATH=(TNSNAMES, ONAMES, HOSTNAME)

SQLNET.EXPIRE_TIME= 10

tcp.validnode_checking = yes

tcp.invited_nodes=(RHEL39.catic.net)

IFILE=/u01/oravis/visdb/9.2.0/network/admin/VIS_rhel39/sqlnet_ifile.ora[[email protected] VIS_rhel39]$

[[email protected] VIS_rhel39]$ cp sqlnet.ora sqlnet.ora.20200112

[[email protected] VIS_rhel39]$ vi sqlnet.ora

[[email protected] VIS_rhel39]$ cat sqlnet.ora

###############################################################

#

# This file is automatically generated by AutoConfig. It will be read and

# overwritten. If you were instructed to edit this file, or if you are not

# able to use the settings created by AutoConfig, refer to Metalink document

# 165195.1 for assistance.

#

#$Header: NetServiceHandler.java 115.33 2004/09/22 08:21:05 dvijayas ship $

#

###############################################################

NAMES.DIRECTORY_PATH=(TNSNAMES, ONAMES, HOSTNAME)

SQLNET.EXPIRE_TIME= 10

tcp.validnode_checking = no

tcp.invited_nodes=(RHEL39.catic.net)

IFILE=/u01/oravis/visdb/9.2.0/network/admin/VIS_rhel39/sqlnet_ifile.ora

C:\Windows\System32\drivers\etc>sqlplus [email protected]:1521/VIS as sysdba

SQL*Plus: Release 10.2.0.5.0 - Production on 星期日 1月 12 11:20:46 2020

Copyright (c) 1982, 2010, Oracle. All Rights Reserved.

ERROR:

ORA-12537: TNS: 连接关闭

请输入用户名:

C:\Windows\System32\drivers\etc>sqlplus [email protected]:1521/VIS as sysdba

SQL*Plus: Release 10.2.0.5.0 - Production on 星期日 1月 12 11:23:49 2020

Copyright (c) 1982, 2010, Oracle. All Rights Reserved.

ERROR:

ORA-01017: invalid username/password; logon denied

请输入用户名:

SQL> alter user avicroot account unlock;

User altered.

SQL> alter user scott account unlock;

User altered.

SQL> alter user scott identified by tiger;

User altered.

C:\Windows\System32\drivers\etc>sqlplus [email protected]:1521/VIS

SQL*Plus: Release 10.2.0.5.0 - Production on 星期日 1月 12 11:27:54 2020

Copyright (c) 1982, 2010, Oracle. All Rights Reserved.

连接到:

Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production

With the Partitioning, OLAP and Oracle Data Mining options

JServer Release 9.2.0.5.0 - Production

SQL>

SQL> alter user avicroot identified by P4;

User altered.

SQL> drop user avicroot;

User dropped.

SQL> create user avicroot identified by Avicr00o1

2 ;

User created.

SQL> grant connect,resource to avicroot;

Grant succeeded.

SQL> grant dba,sysdba to avicroot;

Grant succeeded.

原文:https://www.cnblogs.com/rocazj/p/12182208.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值