In today’s article, I will explain how we can determine the MAXIMUM user limit that can be created in the Database.
Thus, more users than the number we have determined will not be created.
We can limit the number of users as follows.
1 2 3 |
SQL> alter system set LICENSE_MAX_USERS=32; System altered. |
Let’s check our current user count.
1 2 3 4 5 |
SQL> select count(username) from dba_users; COUNT(USERNAME) --------------- 32 |
Let’s try creating a new user.
1 2 3 4 5 |
SQL> create user test identified by "test"; create user test identified by "test" * ERROR at line 1: ORA-01985: cannot create user as LICENSE_MAX_USERS parameter exceeded |
If we want to set the MAXIMUM number of users to a smaller number when we have 32 users, we will get an error like the one below.
1 2 3 4 5 6 |
SQL> alter system set LICENSE_MAX_USERS=31 scope=both; alter system set LICENSE_MAX_USERS=31 scope=both * ERROR at line 1: ORA-02097: parameter cannot be modified because specified value is invalid ORA-00035: LICENSE_MAX_USERS cannot be less than current number of users |