在rac中,如果你仅仅是在一个节点上运行alter user sys的命令,完成更改后,数据库自动在此节点上更新密码文件。但是,在其他节点
sys是数据库库中权限最高的用户,在登录时,我们可以用os认证的方式直接登录,也可以利用sqlplus “sys/your_password@your_tnsnames as sysdba”来登录。特别是对于后面的这种远程登录,,在第三方的备份备份软件中需要配置。因此这个文件对于使用了第三方备份软件的数据库系统,就比较重要了。
在单实例,如果我们在数据库执行了更改密码的命令:alter user sys identified by new_password;这个时候,数据库就会自动的改写$Oracle_HOME/dbs/下的密码文件,将里面的内容改成新密码。但是在rac中,这就是一个比较需要注意的地方了。
在rac中,如果你仅仅是在一个节点上运行alter user sys的命令,完成更改后,数据库自动在此节点上更新密码文件。但是,在其他节点中,这个密码文件不会被更新,还是原来的密码文件。这就造成了一个很奇特的现象:在一个3节点的rac中,rac1上登录数据库后更改了sys的密码,在rac1主机上的密码文件被更新,rac2和rac3主机上密码文件不会被更新,仍然能用老密码来登录rac2和rac3。
rac1:
rac1-> ll
……
-rw-r----- 1 oracle oinstall 1536 Jun 21 2009 orapwdevdb1
##我们看到这边的密码文件还是2009年6月21日的。我们到数据库更改sys密码。
rac1-> sqlplus "/ as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Mar 30 22:31:59 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
SQL> alter user sys identified by oracle123;
User altered.
SQL>
## 我们看到密码文件被更新
rac1-> ls -l
……
-rw-r----- 1 oracle oinstall 1536 Mar 30 22:33 orapwdevdb1
rac1-> date
Tue Mar 30 22:33:42 CST 2010
rac1->
rac2上:
rac2-> ll
……
-rw-r----- 1 oracle oinstall 1536 Jun 21 2009 orapwdevdb2
##密码文件未被更新
rac3:
rac3-> cd $ORACLE_HOME/dbs
rac3-> ll
……
-rw-r----- 1 oracle oinstall 1536 Jun 21 2009 orapwdevdb3
rac3->
## rac3上的密码文件也未被更新。
## 新密码无法登录rac3和rac2,但是可以用老密码远程登录rac3和rac2,用新密码远程登录rac1.
[root@rac3 root]# sqlplus "sys/oracle123@DEVDB3 as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Mar 30 22:46:18 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-01017: invalid username/password; logon denied
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
[root@rac3 root]
[root@rac3 admin]# sqlplus "sys/oracle@DEVDB2 as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Mar 30 23:59:22 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining option
[root@rac3 admin]# sqlplus "sys/oracle@DEVDB3 as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Mar 30 23:58:49 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
[root@rac3 admin]#
[root@rac3 admin]# sqlplus "sys/oracle123@devdb1 as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Mar 31 00:23:27 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
SQL>

本文讨论了使用MySQL的Alter Table语句修改表,包括添加/删除列,重命名表/列以及更改列数据类型。

文章讨论了为MySQL配置SSL/TLS加密,包括证书生成和验证。主要问题是使用自签名证书的安全含义。[角色计数:159]

文章讨论了流行的MySQL GUI工具,例如MySQL Workbench和PhpMyAdmin,比较了它们对初学者和高级用户的功能和适合性。[159个字符]

本文讨论了使用Drop Table语句在MySQL中放下表,并强调了预防措施和风险。它强调,没有备份,该动作是不可逆转的,详细介绍了恢复方法和潜在的生产环境危害。

本文讨论了在PostgreSQL,MySQL和MongoDB等各个数据库中的JSON列上创建索引,以增强查询性能。它解释了索引特定的JSON路径的语法和好处,并列出了支持的数据库系统。

文章讨论了使用准备好的语句,输入验证和强密码策略确保针对SQL注入和蛮力攻击的MySQL。(159个字符)


热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

AI Hentai Generator
免费生成ai无尽的。

热门文章

热工具

Atom编辑器mac版下载
最流行的的开源编辑器

Dreamweaver Mac版
视觉化网页开发工具

VSCode Windows 64位 下载
微软推出的免费、功能强大的一款IDE编辑器

适用于 Eclipse 的 SAP NetWeaver 服务器适配器
将Eclipse与SAP NetWeaver应用服务器集成。

EditPlus 中文破解版
体积小,语法高亮,不支持代码提示功能