|
Real World Microsoft Access Database Protection and Security Authors: Robinson G. Published year: 2003 Pages: 52-54/176 |
In the next chapter, we will be looking at different ways that you can monitor who is in the database. Knowing who is in the database is very useful information if you have trouble with your backups or software updating because your database is open . You will also learn other useful administration techniques, such as logging when and by whom a database is opened and closed, logging when someone opens an object, and even how to keep people from logging onto the database. Also, I'll introduce an Access form that will show who is connecting to or sneaking into your databases without using the startup form or AutoExec macro.
In this chapter, you will learn how to find out who and how many people are using your database. This important surveillance information can help you with administration issues such as asking users to log off the database or network for maintenance and upgrades and with targeting security for your database. To help you with these issues and other related topics, this chapter has a number of easy-to-install Access objects and discusses some free products that you can use. You should consider deploying some of these solutions in your database because they may help you balance speculation with facts, something that is always a good idea before embarking on software upgrades, such as adding security.
To get you up to speed quickly with the tools necessary for surveillance, I start by providing you with an Access form that will allow you to view computer and Access workgroup logon names . Though this tool is useful for individual databases, if you have a large number of databases, you may want to use a tool such as the LDBView or the Access Workbench to find who is using these databases without opening the database itself.
There are a number of occasions where it is useful to keep a detailed log of who is using the database. To assist you with that, you can include software from the download database to capture the Windows user account and time that someone opened and closed the database. What I find useful about this information is that it allows you to monitor usage over time and diagnose who was using a database when a problem occurred. I will also show you how to detect whether someone has connected to your database without using the startup form or the AutoExec macro.
To be more specific, the demonstration material included for this chapter includes a number of forms and Visual Basic for Applications (VBA) examples like the following:
A form that lists computer names and allows you to stop new users from opening the database.
A free license for Access Workbench 1.3 that I wrote. This license allows you to list all users of your database, even if it is protected by workgroup security or a database password.
Access objects that log Windows user IDs, computer names, workgroup IDs, and the time that the user opens and closes the database.
Access forms and modules that log the use of forms or reports in the database.
A form that identifies database users who deliberately or unintentionally avoid your startup form or AutoExec macro.
| Note |
To find the demonstration material, open the download database for your version of Access ”for example, grMAP97.mdb ”and choose Chapter 6. |
Once again, I will provide three separate overviews: one for the developer, one for the database administrator (DBA), and one for the IT manager. I do this because people in each of these categories will approach the chapter in a different way. The developer will want to know how to add these surveillance techniques to a database, the DBA will want to find out about users unless they can see all the users of the database from their desk, and the IT manager should be aware of who, when, and how people are using databases when additional development is requested or performance and stability are proving troublesome .
Any Access 2000 or later database can import a form called frmJetUserRoster from the demonstration database. The user logon form and software demonstrated here are easy to add to your database and can provide you with a list of all the users currently connected to your database.
The functions provided in the demonstration database to log usage of forms and the reports complement the DoCmd object's OpenForm and OpenReport methods . The information that these functions gather provides you with an easy and practical way to assess which parts of your application are being used the most. The computer name and Windows user IDs functions are also handy if you want to set up customized security of your own.
If you administer a reasonably active multi-user Access database, it's a good bet that you'll routinely need to compact it. Less frequently, you'll probably also change objects in your database. Both of these activities require you to ask all the users in your database to log off. To help you with this task, you'll learn a number of different ways to view a list of computers that are accessing your database. You'll also learn how to stop additional users from opening your database when you're trying to shut it down.
Many DBAs will want to log access and changes to certain databases, a feature that allows you to monitor Windows users' IDs and the times when users opened and closed your database or forms and reports in your database.
The IT manager has a lot to gain from Access surveillance. Viewing user lists and logs can give you quantitative information on database use. This information is useful for deciding whether you need to upgrade to an industrial-strength database, such as a SQL Server, or invest additional money in improving your Access database software and database design.
The object logging functions can provide quantitative information on the use of forms and reports in your database. This sort of information allows you to focus the development effort on the most used elements of your Access database. It may also allow you to decide whether you can remove under-used parts of the application, saving you money on long- term development and maintenance costs.
| Note |
If the "S" word ”"surveillance" ”raises images of Big Brother, then I'm glad that I have your attention. You may want to refer this sort of data collection to a company ethics committee if you see any problem with the technology that is demonstrated in this chapter. |
|
Real World Microsoft Access Database Protection and Security Authors: Robinson G. Published year: 2003 Pages: 52-54/176 |