Im using msaccess 2010 on Windows 7 and faced the following problem: in multiuser mode editind ALL of record and adding new record blocked in all forms when some user working with database, in single user mode all work perfect.
Database is separated to front-end and back-end parts. Back-end part is located on network drive in directory with full right for all users, copies of front-end part are on users computers.
In client settings: Default open mode - shared, Default record locking - no lock, open database by record-level locking -on
In forms properties - allow add, edit, delete - yes, block records - no.
What could be the problem?
In most cases, this should just work.
Several things to check.
first up, the shared folder where the data part exists needs FULL rights. That means create file rights, and delete file rights. When a access database is opened, then it creates a 2nd file in that same back end folder. That 2nd file is how access handles and manages multi-user operations. If users dont' have create file rights, and delete file rights to that folder, then that mutli-user locking file cannot be created, and thus in most cases, the result is a read-only database.
Next up, do check your forms. You do NOT want the settings to lock the WHOLE table. That is this setting:
So, if you set above to "all records", then of course only one user can edit that table the form is based on.
That setting is a per form by form basis, and thus you do NOT have a global wide setting for this. And you should ALSO check reports - they should have all no reocrds, since you can lock a whole table for some speical reports - and in 99% of cases, you don't need nor want that.
but, check the shared folder rights. the users need read/write AND ALSO file create, and file delete rights. If they don't have such rights to that folder, then in most cases you find the result is a read only database.
Related
In one of my Stack Overflow questions about MS Access front-ends, an SO community member suggests that each user should have their own copy of the .MDB or .ACCDB front-end file:
Don't put the database on a network drive and share it with users.
Give each user their own copy.
Is this necessary? What are the problems associated with multiple users accessing the same file?
The estimated number of users for my future front-end is currently 5, possibly growing to 10-20.
It is not necessary if you mark the file itself as read-only (right-click, properties, bottom-left mark) as all temp data then will be forced to real temp files and the file, per definition, cannot be corrupted.
However, the user will be warned about this with a yellow banner when he/she opens the file.
If they can't live with that, you can create a shortcut to copy and launch the frontend which will provide "automatic" updates of all users' frontends at relaunch.
A script that performs this (you may reduce it somewhat for your scenario) can be found here:
Deploy and update a Microsoft Access application in a Citrix environment
The company is using an old Delphi software, that uses a .mdb file as database.
I can't change the way the application works, I don't have it's source.
We are facing many problems such as:
Lock problems
When an user adds an entry, it doesn't update the database, it only appears locally
The lock problems are solved for now, currently, the problem is that only the first user that connects to the .mdb can edit, add and delete entries, the other users do that to, but the changes are not applied to the db, it seems it's only apply locally, on the user machine.
My question is, is .mdb supposed to work with many users over the network(3~4 people)?
What Is there anything I can do to make this software works well with the .mdb file, with many users?
Remembering that I cannot split the .mdb, as I cannot edit the Delphi application.
You don’t mention that if this in the past work fine in a multi-user environment. However, keep in mind that users MUST have full read/write AND ALSO file create and delete rights.
The reason for the create and delete rights is that because this is a “file based” system without a server process, then a locking file is created in the same directory as the back end mdb file. When the first user opens the file, and they don’t have FULL RIGHTS to the folder, then the file is opened in exclusive mode, and all additional users will be read only. This thus explains your symptom of first user in, but additional users don’t work. (the additional users will be read only – and obviously the Delphi software does not detect this problem). So you can view data – but no saving of data can occur.
So you need to ensure that all users have the ability to create that locking file. It is created by the first user, and any additional user opening the back end ALSO needs rights to that file (so don’t by mistake have permissions to the folder set on a per user basic, since then the first user in will cause JET to create the locking file but with permissions to that first user!. Once again this will mean additional users will be read only. So additional user MUST be able to open the locking file, and the first user in MUST be able to create the locking file. In fact open Access will open the database (mdb) as exclusive and prevent multi-user when the locking file cannot be created.
When the last user leaves the database (or in your case leaves the Delphi application), then the back end file is closed and ALSO THE locking file is deleted by the database engine (JET)
So this sounds like your IT folks did not give wide open permissions to the back end folder. You “can” run the database with file delete rights removed, but I much suggest that the locking file being re-cycled is also a good thing since over time it can become damaged etc.
So based on your symptoms, this is a VERY common occurrence in Access, and this problem is fixed by giving all users sufficient permissions to create files in the same folder as the back end. (and not permissions based on per user).
ALL users must be able to create + open + use that locking file created by the first user opening the mdb file. This locking file creation is automatic and managed by the JET database and not the Delphi program.
Yes, it can work with x ppl on a network.
Make sure the Access database is set to open in shared mode, which is the default setting.
Tools menu, click Options.
On the Advanced tab, under Default open mode, click Shared.
Use this Powershell script:
Get-SmbOpenFile | Where-Object -Property ShareRelativePath -Match ".mdb" | Close-SmbOpenFile –Force
I have a split database in MS Access 2010 on Windows 7.
The back end is on a networked drive in a folder that only some people have write permissions; everyone has read permissions.
Every user has their own copy of the front end stored on their local machine.
Both BE & FE are set to open as shared, not exclusive, for all users.
If a user with read-only permissions tries to get on while another user with read-only permissions is on, they can get on fine.
If a user with read-only permissions tries to get on while a user with write permissions has it open, they get a message saying " file already in use" and they can't open the database.
If a user with write permissions tries to open the database while a user with read-only permissions has it open, it opens as read-only for this user as well.
Do ALL users of a split database need full access? I really don't want everyone to be able to make edits. Anything I can do to get this to work?
The issue has certainly something to do with the fact that the read-only clients can't manage the .laccdb lock file since they don't have write permission to the shared folder in which the database file resides.
When the database is opened in shared mode, each client will create or update the lock file.
It's likely that since read-only clients can't create the lock file, they fall-back to believing they are in exclusive mode.
Once a full-access client creates the lock file, any subsequent client will attempt to use it, and read-only clients will fail since they can't update the lock.
Some documentation regarding lock files:Introduction to .ldb files
If you want to solve your issue, you must grant full access to the folder for all clients, but you can restrict access to the .accdb database file itself to the group of clients that are not supposed to be able to modify data in it.
Alternatively, if you are not using Access 2007/2010 features, you can revert to using an older .mdb file as a backend and use their old-style group security features.
Ultimately, if you really want to control access, you may need to roll-you-own security scheme from within the client, forcing users to log-in (or use their the identity of their machine) and update your forms' data edit properties depending on what that particular user/machine is allowed to do.
I'm creating an Access 2010 database and would like some clarification when it comes to concurrency and security. What I would like is upon starting the app only a menu form to be displayed with several buttons including a login button. Most buttons would be disabled until after the user logs in at which point based on their permission group; Viewer(Deafault), Worker, Editor, Admin.
Also, Admin should be the only one to be able to see the access database while the others are restricted to seeing the forms only.
I was just testing the default concurrency implementation but saving my database to a shared network and having myself and a co-worker try to access it. Found out if one accessed the database it locked it from others, and if we both tried at the same time it became read-only.
So I'm just looking for tips on how to start this.
For an Access database all users must have as a minimum read, write and modify permissions on the folder in which the database resides. This is because MS Access creates a lock file and if the second user does not have permissions to modify the lock file, the cannot get access to the database. Delete permissions may also be useful, to remove the lockfile when they are the last person out.
I maintain an ms-access application splitted to frontend and backend files.
The frontend file is in the users conputers.
The backend file is in a shared folder in the server.
What is the lowest permissions required?
can I give some of the users only read-only permissions in that folder? (or hide it from them in some other way) but still enable them to view the data?
How should I give the best security to the data file and to the folder containing it?
Unfortunately, the lock file (ldb) must be created, updated and deleted. If a user with insufficient permissions opens the database, it will be locked for all other users, therefore all your users need Read/Write/Delete permissions on the back-end.
EDIT #1
The lock file must be created every time the database is opened, this includes via linked tables, and deleted when the database is closed. If a lock file exits and the database is closed, it indicates a problem has occurred. You will also run into problems with compact and repair if it is run with insufficient permissions.
Edit #2
Security for Access is quite a large subject and depends to a great extent on your environment and requirements, for the back-end, it ranges from a database password, which is tissue thin, but quite suitable for most offices, to Access security, which can be complicated and has been dropped in 2007. Here is a link http://support.microsoft.com/kb/207793 for a download for the Microsoft Access Security FAQ for versions < 2007.
Information on security for 2007 can be found here http://www.microsoft.com/technet/security/guidance/clientsecurity/2007office/default.mspx.
Many have suggested that you must give FULL permissions to users, but this is not true. You need only give them MODIFY permissions -- you can deny them DELETE permission, which is a good idea, as it prohibits the users from "accidentally" deleting your data file.
It is true that for a user with DELETE permissions, the LDB file will be deleted on exit when that user is the last user exiting the database. But it is not required that the LDB file be deleted -- indeed, in Access 2 and before, the LDB files were not deleted on exit, but just left there hanging around. This generally has no downside, but occasionally the LDB file gets corrupted and causes problems and really does need to be deleted and recreated afresh.
What I do is have two classes of database users (as defined in custom NT security groups specific to my Access application(s)) -- DBAdmins and everyone else. The DBAdmins have FULL permissions, everybody else only CHANGE. The result is that any time a DBAdmin exits as the final user, the LDB is deleted. This setup works really well, and I've been using it for well over a decade.
Using a hidden share for your back end is really only "security by obscurity," and not really worth the effort. Sophisticated users can figure it out through any number of methods (depending on how you've locked down your front end):
view the MSysObjects table and find
the CONNECT string for the tables,
which will identify the hidden
share.
examine the results of
CurrentDB.TableDefs("name of linked
table").Connect in the immediate window in
the VBE
Now, if you've properly secured your app using Jet user-level security (and it's very easy to think you've secured your database and find out that there are holes, simply because it's really easy to forget some of the crucial steps in the process), they won't be able to do this, but even if you have, Jet ULS security is crackable (it's pretty easy to Google it and find cracking software), so is not really something you should depend on 100%.
Yes - it resolves down to file access permissions as well as read/write. You can't execute any type of data update stuff (you'll get "operation requires an updateable query") unless the user supplies credentials that allow them to write, or you allow write on the file.
Running a query requires only read access.