ITPub博客

首页 > 数据库 > Oracle > password file 浅尝entries

password file 浅尝entries

原创 Oracle 作者:lovehewenyu 时间:2012-04-17 17:01:22 0 删除 编辑
 

Password file    浅尝 entries

 

Entries 与 Entries增加关系

entries

默认grant to user

调节entries后 grant to user

Entries 决定了 grant to user 的最大数量

3

4

4

 

4

4

4

 

5

8

8

 

6

8

8

 

7

8

8

 

8

8

8

 

9

12

12

 

默认

4

4

 


这张表示来源于,我对官方文档的遗憾开始的。官网文档说 entries 是限制授权最大的用户数。然后做实验,当Entries=3时,惊奇的发现允许授权给4个用户,带着疑惑我继续增大Entries 看看它与授权用户的关系。原来发现这个授权的关系是4个,4个增长的。有点像4进制,就是Entries 大于4的倍数的时候 ,它就会增加允许授权的人数+4。

例如

当Entries=5 时,可以授权的用户应该最大是5个,事实授权最大用户为8个。

当Entries=6 时,可以授权的用户应该最大是6个,事实授权最大用户为8个。

当Entries=9 时,可以授权的用户应该最大是9个,事实授权最大用户为12个。

 

发现规律了吧,呵呵。

官档说 block size 512 bytes  最大用户为4个。

可是我的block size 4096 bytes  最大用户也为4个 。这里需要有人能提供点帮助。

[root@mycos-p ~]# fdisk -l

 

Disk /dev/hda: 21.4 GB, 21474836480 bytes

255 heads, 63 sectors/track, 2610 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

 

   Device Boot      Start         End      Blocks   Id  System

/dev/hda1   *           1          25      200781   83  Linux

/dev/hda2              26        1937    15358140   83  Linux

/dev/hda3            1938        2319     3068415   82  Linux swap / Solaris

[root@mycos-p ~]# tune2fs -l /dev/hda2|grep -i block

Block count:              3839535

Reserved block count:     191976

Free blocks:              2413270

First block:              0

Block size:              4096

Reserved GDT blocks:      937

Blocks per group:         32768

Inode blocks per group:   1017

Reserved blocks uid:      0 (user root)

Reserved blocks gid:      0 (group root)

Journal backup:           inode blocks

 

 

下面是实验步骤

 

entries=3

[ora@mycos-p dbs]$ orapwd file=orapwresearch password=oracle entries=3 force=y

SQL> select * from v$pwfile_users;

 

USERNAME                       SYSDB SYSOP

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

SYS                            TRUE  TRUE

TEST7                          TRUE  FALSE

TEST                           TRUE  FALSE

TEST1                          TRUE  FALSE

TEST2                          TRUE  FALSE

 

SQL>

SQL> grant sysdba to test3

  2  ;

grant sysdba to test3

*

ERROR at line 1:

ORA-01996: GRANT failed: password file '' is full

 

entries=4

[ora@mycos-p dbs]$ orapwd file=orapwresearch password=oracle entries=4 force=y

SQL> select * from v$pwfile_users;

 

USERNAME                       SYSDB SYSOP

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

SYS                            TRUE  TRUE

TEST                           TRUE  FALSE

TEST1                          TRUE  FALSE

TEST2                          TRUE  FALSE

TEST3                          TRUE  FALSE

 

SQL> grant sysdba to test4;

grant sysdba to test4

*

ERROR at line 1:

ORA-01996: GRANT failed: password file '' is full

 

entries=5

[ora@mycos-p dbs]$ orapwd file=orapwresearch password=oracle entries=5 force=y

SQL> select * from v$pwfile_users;

 

USERNAME                       SYSDB SYSOP

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

SYS                            TRUE  TRUE

TEST                           TRUE  FALSE

TEST1                          TRUE  FALSE

TEST2                          TRUE  FALSE

TEST3                          TRUE  FALSE

TEST4                          TRUE  FALSE

TEST5                          TRUE  FALSE

TEST6                          TRUE  FALSE

TEST7                          TRUE  FALSE

 

9 rows selected.

 

SQL> create user test8 identified by test8;

 

User created.

 

SQL> grant sysdba to test8;

grant sysdba to test8

*

ERROR at line 1:

ORA-01996: GRANT failed: password file '' is full

 

entries=9

[ora@mycos-p dbs]$ orapwd file=orapwresearch password=oracle entries=9 force=y

SQL> select * from v$pwfile_users;        

 

USERNAME                       SYSDB SYSOP

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

SYS                            TRUE  TRUE

 

SQL> grant sysdba to test;

 

Grant succeeded.

 

SQL> grant sysdba to test1;

 

Grant succeeded.

 

SQL> grant sysdba to test2;

 

Grant succeeded.

 

SQL> grant sysdba to test3;

 

Grant succeeded.

 

SQL> grant sysdba to test4;

 

Grant succeeded.

 

SQL> grant sysdba to test5;

 

Grant succeeded.

 

SQL> grant sysdba to test6;

 

Grant succeeded.

 

SQL> grant sysdba to test7;

 

Grant succeeded.

 

SQL> grant sysdba to test8;

 

Grant succeeded.

 

SQL> create user test9 identified by test9;

 

User created.

 

SQL> grant sysdba to test9;

 

Grant succeeded.

 

SQL> create user test10 identified by test10;

 

User created.

 

SQL> grant sysdba to test10;

 

Grant succeeded.

 

SQL> create user test11 identified by test11;

 

User created.

 

SQL> grant sysdba to test11;

 

Grant succeeded.

 

SQL> create user test12 identified by test12;

 

User created.

 

SQL> grant sysdba to test12;

grant sysdba to test12

*

ERROR at line 1:

ORA-01996: GRANT failed: password file '' is full

 

 

SQL> select * from v$pwfile_users;

 

USERNAME                       SYSDB SYSOP

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

SYS                            TRUE  TRUE

TEST                           TRUE  FALSE

TEST1                          TRUE  FALSE

TEST2                          TRUE  FALSE

TEST3                          TRUE  FALSE

TEST4                          TRUE  FALSE

TEST5                          TRUE  FALSE

TEST6                          TRUE  FALSE

TEST7                          TRUE  FALSE

TEST8                          TRUE  FALSE

TEST9                          TRUE  FALSE

 

USERNAME                       SYSDB SYSOP

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

TEST10                         TRUE  FALSE

TEST11                         TRUE  FALSE

 

13 rows selected.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26442936/viewspace-721444/,如需转载,请注明出处,否则将追究法律责任。

上一篇: dba 职责
请登录后发表评论 登录
全部评论
10年老鸟,Oracle,Mysql,EMC 存储,NBU备份

注册时间:2012-02-03

  • 博文量
    268
  • 访问量
    1301920