Workgroup locks database even when all users are shut down.

G

Guest

Every morning I turn on my computer and try to do my updates in the database
I designed and am the administrator for. I can not run these updates due to
the workgroup locking out the database as if someone has it open. I go and
either check all the user that have it and close the file or I shut down
thier computer completely and it still shows the database in use. I know you
can open the workgroup file in notepad and have done that. It does show what
computers have it running. The problem with that is it shows that even my
computer has it running even when I first start up my system and havent
opened a single file. Is there something I am doing wrong or have set wrong?
It usually takes me 15 mins every morning just to start and shut down my
system repeatedly to clear up this problem.
 
J

Joan Wild

Do all users have read, write, create, and delete permissions on the windows
folder?

Make sure you haven't named the mdw the same as your mdb.
 
G

Guest

No, All users do not have read, write, create or delete permission.
Administration is the only one with that ability. The mdw file is not named
the same as the mdb file either.
 
K

Keith Wilby

darrend7 said:
No, All users do not have read, write, create or delete permission.
Administration is the only one with that ability.

All users require RWXD permissions to the host folder so that the locking
file can be created by the first user in and deleted by the last user out.

Keith.
www.keithwilby.com
 
R

Rick Brandt

darrend7 said:
No, All users do not have read, write, create or delete permission.
Administration is the only one with that ability. The mdw file is not
named the same as the mdb file either.

That's your problem then. All users must have these permissions on the
folder.
 
G

Guest

Sorry, but I don't understand,, what is the RWXD permission. All users have
either read only permission or minimal editing permission. At the same time
why would the file still show as locked even though not a single computer has
the program up and running,, for that matter all computers were turned off
and it still showed locked.
 
R

Rick Brandt

darrend7 said:
Sorry, but I don't understand,, what is the RWXD permission. All
users have either read only permission or minimal editing permission.
At the same time why would the file still show as locked even though
not a single computer has the program up and running,, for that
matter all computers were turned off and it still showed locked.

R ead
W rite
e X ecute
D elete
(also need C reate)

Read is obvious.
Write is required to maintain the locking file (LDB)
Execute is obvious
Delete is required to delete the locking file when the last user exits.
Create is required to create the locking file when the first user enters.

If you could control Read/Write permissions with network permissions then there
would have been no need for Microsoft to develop User Level Security. Network
permissions can only be used for...

Keeping out non-users entirely.

Making a file read only for ALL users.

It cannot be used for mixed authorities (at least not not at the same time).
 
A

AzzA

Please keep in mind that the said permissions are for the FOLDER where
your database (or its back-end - I hope you do have it split) resides.
NOT for the database objects (forms/reportstables/ect).
All users of the db MUST have those permissions for the FOLDER where
the db is stored. If you have the db on a network, it is likely that
the folder it is stored in has limited access rights for some users of
the db. Put the db in a public folder on the network or change
permissions for the folder as noted by others in their posts.

Azadi
 
L

Lynn Trapp

At the same time
why would the file still show as locked even though not a single computer
has
the program up and running,, for that matter all computers were turned off
and it still showed locked.

Sometimes, when a user exits Access improperly (often by killing the file
using Ctrl+Alt+Delete), the locking file will not be closed and it will hang
around. You probably need to have a network administrator delete the locking
file.


--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html
 
G

Guest

I want to thank everyone that is responding to this but it looks like Lynn is
the only one so far that is getting it. I can not allow all users RWXD
access, what would be the point in using a workgroup then. Only I have total
access, one user group does have some access to manipulate data and the other
user group has only read only access. The file is in a shared directory that
everyone has access to and they are all capable of writing to this directory
if they had to. I do not have the database split but have thought about
looking into that. That is a new area for me and not really sure what the
benefits would be. The main problem is still the fact that the files show as
locked even though no computers are turned on. Maybe it is the hard shutdown
of some of the computers that Lynn mentioned, I don't know. I do have to do
that to the ones that are running if I think the have the program open
because I do not know their individual passwords. It isn't the right thing to
do I know but the only way I could think of shutting down the program.

If the network administrator is capable of deleting the locked files from
the directory why wouldn't I be able to do that too? I know administration
has more access but if the file is showing as in use by someone wouldnt that
still prevent administration from deleting the file too?
 
R

Rick Brandt

darrend7 said:
I want to thank everyone that is responding to this but it looks like
Lynn is the only one so far that is getting it. I can not allow all
users RWXD access, what would be the point in using a workgroup then.

The workgroup has to do with the permissions you assign in Access Security. The
RWXD is referring to Network permissions (totally different).
Only I have total access, one user group does have some access to
manipulate data and the other user group has only read only access.
The file is in a shared directory that everyone has access to and
they are all capable of writing to this directory if they had to.

Fine then. Can they also delete files from that folder? They need to be able
to do that as well.

If a user has edit file permissions but not delete file permissions on the
folder and they are the last user to leave your application then the LDB file
will not be cleaned up (deleted) because the only user still accessing it has no
permissions to do the deletion. Thus, the LDB file persists and your MDB file
will still have a lock on it even though no one is using it.
I do not have the database split but have thought about looking into
that. That is a new area for me and not really sure what the benefits
would be. The main problem is still the fact that the files show as
locked even though no computers are turned on. Maybe it is the hard
shutdown of some of the computers that Lynn mentioned, I don't know.

If all users have the appropriate folder permissions then incorrect app
shutdowns is another good possibility. That is harder to track down though.
 
A

AzzA

darrend7 said:
I want to thank everyone that is responding to this but it looks like Lynn is
the only one so far that is getting it. I can not allow all users RWXD
access, what would be the point in using a workgroup then. Only I have total
access, one user group does have some access to manipulate data and the other
user group has only read only access. The file is in a shared directory that
everyone has access to and they are all capable of writing to this directory
if they had to.

As has been mentioned several times before, RWXD access is necessary
for your shared directory where the db is stored, not to the db
itself!!!
Being capable of writing to that directory does not imply full RWXD
access. If users of the db do not have Delete access to that
directory, the .ldb file can't be deleted automatically when the last
user exits the db.

I do not have the database split but have thought about
looking into that. That is a new area for me and not really sure what the
benefits would be.

The benefits are plenty, from reduced network traffic to easier updates
and maintenance. Serach this group for database splitting and you will
see.
The main problem is still the fact that the files show as
locked even though no computers are turned on. Maybe it is the hard shutdown
of some of the computers that Lynn mentioned, I don't know. I do have to do
that to the ones that are running if I think the have the program open
because I do not know their individual passwords. It isn't the right thing to
do I know but the only way I could think of shutting down the program.

When you have your database properly split, you can add some VB modules
that will allow you to remotely shutdown applications opened by other
users. Search this group for 'remote shutdown' for more info and code
samples.
If the network administrator is capable of deleting the locked files from
the directory why wouldn't I be able to do that too? I know administration
has more access but if the file is showing as in use by someone wouldnt that
still prevent administration from deleting the file too?

Depends on the access rights to that directory. If you do not have
Delete rights, you can't delete files. Once again, the RWXD rights are
assigned in the server's local security/user policies and have nothing
to do with your database.

Good luck.

Azadi
 
K

Keith Wilby

darrend7 said:
I want to thank everyone that is responding to this but it looks like Lynn
is
the only one so far that is getting it.

No offence but it appears that we all "get it" but you don't.
I can not allow all users RWXD
access,

Why not? It is a perfectly reasonable set-up. If you're twitched about
accidental or malicious deletion of your db file then just remove the
"delete" option from the *file*.
what would be the point in using a workgroup then.

ULS allows you to control permissions to database objects but will only work
as expcted if the *file* permissions are set correctly.
Only I have total
access, one user group does have some access to manipulate data and the
other
user group has only read only access.

To the *data*, right? Nothing to do with file permissions.
The file is in a shared directory that
everyone has access to and they are all capable of writing to this
directory
if they had to.

Write = good.
I do not have the database split but have thought about
looking into that. That is a new area for me and not really sure what the
benefits would be.

That's another issue, we'll park that for now.
The main problem is still the fact that the files show as
locked even though no computers are turned on.

Give your users the correct permissions to the folder and this problem will
go away. It's still there and locked because the last user out couldn't
delete it.
Maybe it is the hard shutdown
of some of the computers that Lynn mentioned, I don't know. I do have to
do
that to the ones that are running if I think the have the program open
because I do not know their individual passwords. It isn't the right thing
to
do I know but the only way I could think of shutting down the program.

You can mitigate for that by writing code that will cleanly shut down other
users' instances of the FE but your immediate problem really is simply
solved by giving all users the correct folder permissions.

Keith.
 
L

Lynn Trapp

Darrend,
Trust me, the other people who have commented here also "get it." They are
absolutely correct in saying that your users MUST have RWXD permissions on
the FOLDER where the database resides. That is an un-get-aroundable fact
when working with MS Access. In fact, the lack of those permissions can
contribute to your problem with the lock file hanging around when everyone
is out of the application.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html
 
G

Guest

Ok, I finally get what everyone is talking about and trust me no offence was
taken Keith. I don't know a lot about programming or networking but I find my
way around. I didn't realize that you were talking about the RWXD for the
folder the file was stored in. I am pretty sure that they all do have this
ability. This morning when I went in to work the locked files were actually
gone for the first time all week. I think it may be the hard shut down that I
have been doing and I have instructed everyone to make sure they, at the
least, shut down the access program before going home and it looks like that
may have worked.

Again I want to thank you all for your help. I will keep an eye on this for
the next couple of days and see how things go.
 
K

Keith Wilby

darrend7 said:
Ok, I finally get what everyone is talking about and trust me no offence
was
taken Keith. I don't know a lot about programming or networking but I find
my
way around. I didn't realize that you were talking about the RWXD for the
folder the file was stored in. I am pretty sure that they all do have this
ability. This morning when I went in to work the locked files were
actually
gone for the first time all week. I think it may be the hard shut down
that I
have been doing and I have instructed everyone to make sure they, at the
least, shut down the access program before going home and it looks like
that
may have worked.

Again I want to thank you all for your help. I will keep an eye on this
for
the next couple of days and see how things go.
It is well worth looking at setting up a utility to log your users out. The
tried and tested method is to have a form open on startup and use the timer
event to check the contents of a table. That table could contain, for
example, a flag, a name, a computer name, or a time - you could process this
data accordingly and get the app to quit if certain data is found.

Wow, it's early on a Monday as I write this, I hope it's not gibberish! ;-)

Keith.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top