can you limit the number of users created in the database ?

June 1, 2012 — Leave a comment

… yes, you can. if you use named licensing or want to enforce that not more than n users are created in the database you can set the license_max_users parameter.

alter system set license_max_users=10 scope=both;

but be careful, this includes the oracle internal users:

SELECT count(username)
  FROM dba_users;
COUNT(USERNAME)
---------------
	      9

if you want to create two new users now, you will hit the limit:

SYS@DB112> CREATE USER A IDENTIFIED BY A;
User created.
SYS@DB112> CREATE USER B IDENTIFIED BY B;
CREATE USER B IDENTIFIED BY B
                            *
ERROR at line 1:
ORA-01985: cannot create user as LICENSE_MAX_USERS parameter exceeded
SYS@DB112> 

of course this is only valid if you do not share usernames …

Advertisements

No Comments

Be the first to start the conversation!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s