Solved

How to expel users from a database

Posted on 2011-09-30
8
169 Views
Last Modified: 2012-05-12
How can you use code to expel all users from a database?
0
Comment
Question by:Milewskp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 500 total points
ID: 36893217

I took Peter's FSD free app (http://www.peterssoftware.com/fsd.htm) ... and rolled it into a full blown app that works very well.

And related is this:

http://www.peterssoftware.com/isd.htm

These two will definitely do it for you.

mx
0
 
LVL 1

Author Comment

by:Milewskp
ID: 36893364
Thanks mx,
I use the same method described in the first link you provided to kick users out. It's surprising how similar the two are.

The second link you provided is about how to kick out inactive (stale) users. I was planning to use the same idea for my databases, but I believe I now have a better idea: Instead of kicking out stale users, I plan to put the database in sleep mode:
- A modal pop up form called Sleep Mode opens to tell the user the database is sleeping.
- All linked tables are converted to local tables with one record each (to prelude the database from getting huge).
- Any persistent connections that were established to other databases are broken.

If the user hits the Wake Up button, then
- The tables are converted back to linked tables.
- Persistent connections are re-established (for speed).
- the current form is requeried.
- the Sleep Mode form closes.

The database will close at midnight regardless of what the user does.

Of course, this method applies only if each user has their own front end.
0
 
LVL 75
ID: 36893582
Sounds interesting ... and it's sure making me sleepy just thinking about it :-)

mx
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 30

Expert Comment

by:hnasr
ID: 36895091
One simple Idea:

a table in the database, to schedule for closing the database.

User's copy processes a timer event every say 5 minutes.
Reads the table and checks for close time.
Warns the user to exit the application.
New users are not allowed to enter.
At the right time, a force exit is issued if user did not respond.
0
 
LVL 1

Author Comment

by:Milewskp
ID: 36902960
Hi hnasr,
I think that's basially what http://www.peterssoftware.com/fsd.htm does. Maybe the reason we are all coming up with the same answer is that there really is only one good way to do it.
0
 
LVL 75
ID: 36904599
Peters app works! Guaranteed.

mx
0
 
LVL 1

Author Closing Comment

by:Milewskp
ID: 36904682
Thanks mx!
0
 
LVL 75
ID: 36904714
You are welcome.

mx
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question