473,624 Members | 2,557 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

User ID limit per database, Msg 15065

There appears to be a limit of ~16378 user Id's possible per database.
When adding users we eventually get the message:
exec sp_adduser 'testUser', 'testUser', 'user_group'

Server: Msg 15065, Level 16, State 1, Procedure sp_grantdbacces s, Line
160
All user IDs have been assigned.

All of the MSSQL procedures eventually call sp_grantdbacces s which has
the following piece of code:

select @uid = min(uid)+1 from sysusers
where uid >= 5 and uid < (16384 - 1) -- stay in users
range
and user_name(uid+1 ) is null -- uid not in use
if @uid is null
begin
raiserror(15065 ,-1,-1)
return (1)
end

so there can not be more than aprox. 16378 users in a database,
don't know why there is this limit, Don't see anything in the groups
talking about it.

Why the limit?
Thanks, Tom Ostberg
Jul 20 '05 #1
1 2850

"Tom Ostberg" <to******@eastm tn.com> wrote in message
news:8e******** *************** ***@posting.goo gle.com...
There appears to be a limit of ~16378 user Id's possible per database.
When adding users we eventually get the message:
exec sp_adduser 'testUser', 'testUser', 'user_group'

Server: Msg 15065, Level 16, State 1, Procedure sp_grantdbacces s, Line
160
All user IDs have been assigned.

All of the MSSQL procedures eventually call sp_grantdbacces s which has
the following piece of code:

select @uid = min(uid)+1 from sysusers
where uid >= 5 and uid < (16384 - 1) -- stay in users
range
and user_name(uid+1 ) is null -- uid not in use
if @uid is null
begin
raiserror(15065 ,-1,-1)
return (1)
end

so there can not be more than aprox. 16378 users in a database,
don't know why there is this limit, Don't see anything in the groups
talking about it.

Why the limit?
Thanks, Tom Ostberg


Probably 16000+ users per database seemed like a limit no one would ever
reach, because it's so awkward from a management perspective. 2^14 = 16384,
so it's probably not an entirely arbitrary number.

You don't give any background about your security model (especially SQL or
Windows accounts), but using Windows authentication with Windows groups as
logins is one obvious way to reduce the number of users you need to manage,
by shifting the user/group management to the operating system.

This may or may not be a suitable solution for you - if you can clarify why
you need so many users per database (some sort of hosting service?), someone
may be able to suggest an alternative approach.

Simon
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
4368
by: Kunle Odutola | last post by:
I have a database that tracks players for children's sports clubs. I have included representative DDL for this database at the end of this post. A single instance of this database supports multiple clubs. I would like to add support for letting each club define and store custom information about arbitrary entities. Basically, allows the clubs to define custom entities (i.e tables) and associated custom attributes (i.e. fields) that may be...
1
749
by: Tom Ostberg | last post by:
There appears to be a limit of ~16378 user Id's possible per database. When adding users we eventually get the message: > exec sp_adduser 'testUser', 'testUser', 'user_group' Server: Msg 15065, Level 16, State 1, Procedure sp_grantdbaccess, Line 160 All user IDs have been assigned. All of the MSSQL procedures eventually call sp_grantdbaccess which has the following piece of code:
1
1344
by: JESUS | last post by:
I have any users who have hosting on my server and they want a MySQL User Account for their websites. How can I do to limit the space of their database following the plan of their hosting? If I can't set a limit they can put much more datas into database. Can You Help Me?
3
2314
by: Michael Glaesemann | last post by:
Hello all, Recently I've been thinking about different methods of managing users that log into a PostgreSQL-backed application. The users I'm thinking of are not necessarily DBAs: they're application users that really shouldn't even be aware that they are being served by the world's most advanced open source database server. I appreciate any thoughts or feedback people may have, as I'm trying to decide which is the most appropriate way...
1
2416
by: Marc Eggenberger | last post by:
Hi there .. I have the following scenario. I have a Webservice which is running under Win2003/IIS6 with .Net1.1 The Service itselfs connects to a database which is a SQL 2000 on a Server in the same domain. Client is a Windows Form Client (no ASP.NET yet) which connects to the WebService. Before WebService I would make a SQL Server connection with
13
2308
by: Mickey | last post by:
Hi all, Currently I use a timestamp to log users out after 15 minutes of inactivity. However I also need to log a user out if they have just left the page. I need to do this because I store current online users in a database, allowing a maximum of 5 users at one time. I have been looking through the php manual and came across session_cache_expire(). This isn't doing what I need either. Am I
9
3841
by: Ben | last post by:
Hi, In ASP.NET website, I have a web page is used to dump raw data into database (SQL Server). The database data will corrupt if two users dump raw data concurrently. How to allow only one user to access a web page at one time? Thanks, Ben
3
3140
by: sadanjan | last post by:
Hi , Appreciate if someone can clarify if database Share Memory Limit (2 GB ) in Unix 32 bit boxes is the top limit for all the databases put together in a database or is it for each of the database in an Instance Thanks & regards sadanjan
3
4025
by: =?Utf-8?B?QmlsbHkgWmhhbmc=?= | last post by:
I want to limit the user only login the system one time at the same time. I don't want him login the system two with the same user at the same time. How to do this? If i have a table to record if this user has logined, this user didn't logout and just close IE, how do i set his recoed in the table logout? Thanks, -Billy
0
8249
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8348
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7176
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6112
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5570
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4084
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4187
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2613
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1797
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.