1.1 11g2030查看默认值:
SQL> show parameter os_auth
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
os_authent_prefix string ops$
remote_os_authent boolean FALSE
1.2 创建前缀用户:
create user ops$oracle identified by externally;
1.3 授权:
grant connect to ops$oracle;
1.4 重启:
SQL> startup force
1.5 登录:
[oracle@cjwldbn 桌面]$ sqlplus /
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
1.6 查看用户:
SQL> show user;
USER is "OPS$ORACLE"
1.7 更改默认参数
ALTER SYSTEM SET REMOTE_OS_AUTHENT = TRUE SCOPE = SPFILE;
1.8 重启
startup force
1.9 前缀登录(本机可以,远程不可以)
[oracle@cjwldbn admin]$ sqlplus /@CJTFSDB
SQL*Plus: Release 11.2.0.3.0 Production on Wed Feb 26 11:28:11 2020
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
1.10 查看用户
SQL> show user;
USER is "OPS$ORACLE"
SQL>
1.11 修改为默认参数
ALTER SYSTEM SET REMOTE_OS_AUTHENT = false SCOPE = SPFILE;
1.12 强制重启
SQL> startup force
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
ORACLE instance started.
Total System Global Area 1603411968 bytes
Fixed Size 2228784 bytes
Variable Size 939527632 bytes
Database Buffers 654311424 bytes
Redo Buffers 7344128 bytes
Database mounted.
Database opened.
1.13 查看参数
SQL> show parameter os_auth
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
os_authent_prefix string ops$
remote_os_authent boolean FALSE
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
1.14 尝试登录
[oracle@cjwldbn admin]$ sqlplus /@CJTFSDB
SQL*Plus: Release 11.2.0.3.0 Production on Wed Feb 26 11:30:40 2020
Copyright (c) 1982, 2011, Oracle. All rights reserved.
ERROR:
ORA-01017: invalid username/password; logon denied
Enter user-name: