How do I kill user connections to an Access Database?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I need to kill user connections to an Access database to do maintenance, but
cannot find how ANYWHERE. Any help will be greatly appreciated!

-Darren
 
Thanks for the INCREDIBLY quick replies. I do not wish to have sessions time
out, as this is an on-call application that is hit frequently by my team for
long periods of time. Is there a type of trigger button I could put on a
form that clears all users from the database?
 
Darren said:
Thanks for the INCREDIBLY quick replies. I do not wish to have
sessions time out, as this is an on-call application that is hit
frequently by my team for long periods of time. Is there a type of
trigger button I could put on a form that clears all users from the
database?

The only sure-fire way to boot them is via a network admin that disconnects them
from the file server, and depending on what they are doing that could corrupt
your file.
 
Darren said:
Thanks for the INCREDIBLY quick replies. I do not wish to have sessions time
out, as this is an on-call application that is hit frequently by my team for
long periods of time. Is there a type of trigger button I could put on a
form that clears all users from the database?

In the KB article 128814 the timer is set for 1000 milliseconds or
every second. Although the IDLEMINUTES is set for 5 minutes. Thus
that code is being executed every second. Now you can check the value
of some data in a table somewhere and abruptly kick people out.

However if you were to do that I'd bump the timer to at least ten
seconds just to ensure the app is swamping the server with traffic
from multiple workstations.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 
Darren said:
I need to kill user connections to an Access database to do maintenance, but
cannot find how ANYWHERE. Any help will be greatly appreciated!

Why would you want to do so?

Are you wanting to update the front end as it is a shared FE residing
on the server?

I specifically created the Auto FE Updater utility so that I could
make changes to the FE MDE as often as I wanted and be quite confident
that the next time someone went to run the app that it would pull in
the latest version. For more info on the errors or the Auto FE
Updater utility see the free Auto FE Updater utility at
http://www.granite.ab.ca/access/autofe.htm at my website to keep the
FE on each PC up to date.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 
Actually, this might sound silly, but the way you do this is to ask all
users to log out....

You can actually go into the server, and display who has the file opened,
and actually CHOP the user....

However, doing the above is nearly the same as un-plugging the machine while
the user is working. So, don't use the file admin tools to chop out users
that are connected, as you will simply blow out (corrupt) your data file...

Users MUST be shut down in a orderly, and graceful manor, else you risk data
not being saved, and as mentioned a much worse issue of user damaging the
data file..

I explain with some nice diagrams as to why corruption will occur if you
don't allow the user to finish up their writing of data here

http://www.members.shaw.ca/AlbertKallal/Wan/Wans.html

It is also assumed you split your applciation....I expalin this here

http://www.members.shaw.ca/AlbertKallal/Articles/split/index.htm
 
I've built applications that check the value of a flag in a table every time
a form is opened. If the flag is set appropriately, they're kicked out of
the database. You can combine that with the Timer checking every x minutes.
 
How do you see who is logged in? That would work, but i assumed there was no
way to do that. I come from a SQL Server background, so I know the commands
for SQL.
 
Darren said:
How do you see who is logged in? That would work, but i assumed there was
no
way to do that. I come from a SQL Server background, so I know the
commands
for SQL.

Not a question of is logged in, but WHO has the file opened. Remember we are
taking about a plane Jane file.

We are not taking about ms-access anymore, but simply mdb file sitting on
the disk drive...and who has it open. There is no database server here, but
only windows file system.

So, what happens is often a admin tries to back up a file on the hard disk,
but finds it is opened by someone else (that means the backup software will
usually skip the file). It also means you can't delete, or move the file
while someone else has it opened. So, often a admin will kill that user who
has the file opened.

To see who has a file open (be it a word file, excel file, or mdb file),
you go

start->control panel-> Administrative Tools->Computer management

on the left side, you expand the tree item Shared folders, and the highlight
open files...

On the right side, you will see a list of open files....it is also at this
point that over zealous admins kill open files....
(you can right click on any file in the list..and choose close to "CUT" the
connection).

As I mentioned, closing the file is really not different then pulling the
plug on your computer when you have a word document open...the changes never
get back to the disk drive. If you took time to read/view that diagram in
the above wans aritcle, you can see when changes to a ms-access file don't
get back to the disk drive, you can damage and currupt data..

The fact that you don't know how to do this is a good thing!!! (cutting
connections to a file while it is open is a bad idea!!).

So, really, at the end of the day, you need users to gracefully exit the
file, and that ensures their changes are written back to disk...
 
ie kicking them out via a timer_event
(gracefully offcourse)

Pieter

Albert D.Kallal said:
Not a question of is logged in, but WHO has the file opened. Remember we
are taking about a plane Jane file.

We are not taking about ms-access anymore, but simply mdb file sitting on
the disk drive...and who has it open. There is no database server here,
but only windows file system.

So, what happens is often a admin tries to back up a file on the hard
disk, but finds it is opened by someone else (that means the backup
software will usually skip the file). It also means you can't delete, or
move the file while someone else has it opened. So, often a admin will
kill that user who has the file opened.

To see who has a file open (be it a word file, excel file, or mdb file),
you go

start->control panel-> Administrative Tools->Computer management

on the left side, you expand the tree item Shared folders, and the
highlight open files...

On the right side, you will see a list of open files....it is also at this
point that over zealous admins kill open files....
(you can right click on any file in the list..and choose close to "CUT"
the connection).

As I mentioned, closing the file is really not different then pulling the
plug on your computer when you have a word document open...the changes
never get back to the disk drive. If you took time to read/view that
diagram in the above wans aritcle, you can see when changes to a ms-access
file don't get back to the disk drive, you can damage and currupt data..

The fact that you don't know how to do this is a good thing!!! (cutting
connections to a file while it is open is a bad idea!!).

So, really, at the end of the day, you need users to gracefully exit the
file, and that ensures their changes are written back to disk...

--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
(e-mail address removed)
http://www.members.shaw.ca/AlbertKallal



--
 
Back
Top