Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stopping MS Access database for maintenance purposes

Status
Not open for further replies.

mingis

Programmer
Jan 23, 2002
475
LT
I have some MS Access databases on servers (Win200, WinNT server and Win98) accessed by multiple users directly through Windows file system, not using ODBC. I wonder if there is possibility to stop these databases, when I want to take archives, compact them, etc? Is also possible to see what users are using the database at the moment? On Win98 there is a tool NetWatch, what about WinNT and Win2000?
 
Using Windows 2000:
1. See who's using the DB: Follow this trail on the computer hosting the database's data --> open Control Panel: Admin Tools: Computer Management: Shared Folders: Open Files, and check to see if your database's data file(s) are open. If they are, contact the user and ask them to exit.
2. Stop access: unfortunately for Mingis, I know of only two ways; I suspect there's a better way--perhaps someone else can help. But, method one: temporarily unshare the folder. Method two with W2K Server, pause the server (BUT, this pauses all server functions!!!) As a user with appropriate administrator privileges, at the command line, on the server, execute "net pause server". Perform your maintenance, then execute from the command line "net continue server".
 
For a better way of seeing who is logged in, try this:

This gives you a dll to install & an mdb which lets you choose a db and then view who is logged in, who has been logged in & who may have corrupted the file!

I use it all the time. Possibly the most useful utility I've seen.

With regards to stopping access, you could simply not allow people access to the share by changing the permissions, or you could put a couple of lines of code in the startup of the db that checks to see if access is allowed & logs you straight off if not.

hth

Ben ----------------------------------------------
Ben O'Hara

"Where are all the stupid people from...
...And how'd they get so dumb?"
NoFX-The Decline
----------------------------------------------
 
There are several threads re "booting users" out of a shared (.MDB) database here (in Tek-Tips). Use 'advanced' search key words [Boot | Users | BackEnd | FrontEnd], I havent seen the topic recently, so be sure to select the proper interval for the search (note it defaults to 7 days) and use a combination of the key words (probably "all words") I think the default is "any words" (which will get you lost in 100 mostly irrelevant posts).

In one sense, you cannot "stop" a "BackEnd" (Ms. A.) database. since it isn't a true client server process, its' execution depends on being 'in use'. When all users are 'disconnected' the connectoion count goes to zero and it 'stops', by being unloaded. In this mode, the concept of 'stopping' it for your maintenance tasks is -perhaps- at odds with 'who is using it', except in the process of making the list shrink to zero so you can perform the compact / repair / backup.

If you need both items seperatly, I would suggest the generation of seperate threads as, to some extent, atteempting to do both in the single thread may lead to conflicting advice and confusion.

MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top