DB2 depends on operation system level authorization to control DB2 system access.In some case, our db2...
DB2 depends on operation system level authorization to control DB2 system access.
In some case, our db2 account only allows to connect to instance or database, but not log on the system. In other words, we are not able to use the account to get a shell on unix or logon locally on windows.
As usual, when we need to change db2 password, we take action on the system level because it's more frank. But in the case above that we can't get logon, we have to do it on db2 level. There are 2 ways.
- Use the GUI tool DB2 Configuration Assistance
- Use the command line tools DB2 CLP or CE
Using DB2 Configuration Assistance
Right click on a database name, then choose "Change password".
Note: When more than one databases live in same system, we might share the same account in multi-database. Changing password for one of them will affect all databases in this system. In other words, we don't need to do the change on each database, we could choose any we have privileges on the system.
Limitation: We are not able to change our password in the case of that we are only allowed to attach to the node but not connect to any database, or we don't get the catalog information for any database in the node.
For this limitation, it works out with the 2nd way.
Using DB2 CLP and CE
We could use CLP and CE to change password for databases and nodes that we connected or attached to.
- Change by connecting to database
C:\> db2 connect to SAMPLE user TEST using OLDPWD new NEWPWD confirm NEWPWD
C:\> db2 connect to SAMPLE user TEST using OLDPWD change password
- Change by attaching to node, this way works out for the limitation in Configuration Assistance
C:\> db2 attach to NODE user TEST using OLDPWD new NEWPWD confirm NEWPWD
C:\> db2 attach to NODE user TEST using OLDPWD change password
我曾经根据文件的状态在指定时间内是否改变写过一个WatchDog来对服务进行监控,其间曾被这三个时间搞混淆,所以觉得很有必要和大家分享我对这三个术语的理解。
前两者的区别就在于文件状态的改变既包括文件索引节点的改变,也包括文件内容的改变。也就是说如果你改变了文件内容,则同时更新了ctime和mtime,但是如果你只改变了文件索引节点则只是改变了ctime。atime只有在文件被读取的时侯才会改变。它的改变与文件状态以及文件内容的改变没有直接的联系。