sitemap

RSS地图

收藏本站

设为首页

Oracle研究中心

当前位置:Oracle研究中心 > 运维DBA >

【学习笔记】Oracle数据库changePerm.sh测试说明 不同用户sqlplus

时间:2016-10-23 10:26   来源:Oracle研究中心   作者:HTZ   点击:

天萃荷净 Oracle研究中心学习笔记:分享一篇关于Oracle数据库的非ORACLE安装用户执行sqlplus连接数据在不同版本中的测试,11G中非dba组用户执行sqlplus是否还需要执行changePerm.sh。
本次测试来至于群一次聊天,问11G中非dba组用户执行sqlplus是否还需要执行changePerm.sh.
关于cheangePerm.sh脚本的说明见:Where is the script changePerm.sh (文档 ID 438676.1)

1,11.2.0.4测试

以htz用户做为测试用户
Oracle о
[oracleplus]$source .1124
[oracleplus]$sqlplus sys/oracle as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Sat May 10 22:20:49 2014

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 – 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
非dba组的用户可以正常登陆数据库

2,10.2.0.4测试

[oracleplus]$source .1024
[oracleplus]$sqlplus sys/oracle as sysdba
Error 6 initializing SQL*Plus
Message file sp1.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
切换到ORACLE用户执行changePerm.sh脚本
[oracle@www.htz.pw ~]$source .1024
[oracle@www.htz.pw ~]$cd $ORACLE_HOME/install
[oracle@www.htz.pw install]$ls
changePerm.sh createseed.sh envVars.properties.bak jlib portlist.ini restrict.lst rootdeletenode.sh seed.log unix
createseed1.sh envVars.properties install.excl make.log readme.txt rmfilemap.sh rootlocaladd templocal utl
[oracle@www.htz.pw install]$./changePerm.sh

——————————————————————————-
Disclaimer: The purpose of this script is to relax permissions on some of the
files in the database Oracle Home so that all clients can access them.
Please note that Oracle Corporation recommends using the most restrictive file
permissions as possible for your given implementation. Running this script
should be done only after considering all security ramifications.
——————————————————————————-

Do you wish to continue (y/n) [n]: y
Spooling the error log /tmp/changePerm_err.log…
Finished running the script successfully
再次切换到HTZ用户下:注意,以后已经登陆的HTZ用户不退出执行sqlplus会报下面的错误
[oracleplus]$sqlplus / as sysdba
Message 395 not found; product=SQLPlus; facility=SP2
Message 396 not found; product=SQLPlus; facility=SP2
Message 397 not found; product=SQLPlus; facility=SP2
Message 398 not found; product=SQLPlus; facility=SP2
Message 399 not found; product=SQLPlus; facility=SP2
Message 400 not found; product=SQLPlus; facility=SP2
退出htz,再次登陆
[oracleplus]$sqlplus sys/oracle as sysdba

SQL*Plus: Release 10.2.0.4.0 – Production on Sat May 10 22:51:07 2014

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

ERROR:
ORA-12547: TNS:lost contact


Enter user-name:
[oracleplus]$
这里只能通过监听的方式来远程登陆数据库
[oracleplus]$sqlplus sys/oracle@127.0.0.1:1521/orcl1024 as sysdba

SQL*Plus: Release 10.2.0.4.0 – Production on Sat May 10 22:51:30 2014

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


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 – 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 – 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

3.9.2.0.8测试

[oracleplus]$source .9208
[oracleplus]$sqlplus ‘sys/oracle as sysdba’

SQL*Plus: Release 9.2.0.8.0 – Production on Sat May 10 22:21:29 2014

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

ERROR:
ORA-09925: Unable to create audit trail file
Linux-x86_64 Error: 13: Permission denied
Additional information: 9925
ORA-01017: invalid username/password; logon denied
运行changePerm.sh脚本后,再次在htz用户下运行sqlplus
[oracleplus]$sqlplus ‘sys/oracle as sysdba’

SQL*Plus: Release 9.2.0.8.0 – Production on Sat May 10 22:54:11 2014

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

ERROR:
ORA-01031: insufficient privileges


Enter user-name:

[htz@www.htz.pw admin]$sqlplus ‘sys/oracle@orcl9208 as sysdba’

SQL*Plus: Release 9.2.0.8.0 – Production on Sat May 10 22:42:49 2014

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.


Connected to:
Oracle9i Enterprise Edition Release 9.2.0.8.0 – 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 – Production

SQL>
可以只能通过远程的方式来登陆数据库
本文固定链接: http://www.htz.pw/2014/05/10/%e9%9d%9eoracle%e5%ae%89%e8%a3%85%e7%94%a8%e6%88%b7%e6%89%a7%e8%a1%8csqlplus%e8%bf%9e%e6%8e%a5%e6%95%b0%e6%8d%ae%e5%9c%a8%e4%b8%8d%e5%90%8c%e7%89%88%e6%9c%ac%e4%b8%ad%e7%9a%84%e6%b5%8b%e8%af%95.html | 认真就输

--------------------------------------ORACLE-DBA----------------------------------------

最权威、专业的Oracle案例资源汇总之【学习笔记】Oracle数据库changePerm.sh测试说明 不同用户sqlplus

本文由大师惜分飞原创分享,网址:http://www.oracleplus.net/arch/1044.html

Oracle研究中心

关键词:

Oracle sqlplus连接数据在不同版本中的测试

Oracle数据库changePerm.sh的使用笔记