| YOU ARE HERE: HOME > WEB DESIGN ESSAYS > USING MS ACCESS |
Using MS Access as a Back-End Database - Making an MS Access Database Secureby Charles E. Brown MS Access vs. SQL However, this is not to say that Microsoft Access cannot be a great database application. Because MS Access is not designed to be a database server, it does not do as proficient of a job as SQL in providing clients with access to database information in a secure and reliable fashion. Nevertheless, many companies elect to use Microsoft Access instead of a program like SQL Server as the back-end database for their Active Server Page Applications (ASP). The number one reason for this is that MS products are very familiar to corporate entities and their staff. Secondly, most companies who have decided to establish an online presence would rather use software they already possess as opposed to incurring further expense and re-training all their personnel on new software. Third, it is a burden to try to transfer all database data over to a new database. This takes time and money away from a company. Fourth, creating and setting up a database in Access is much easier than in SQL Server. Finally, most companies can afford Microsoft Access but the requirements for SQL Server beyond just the software itself can be a problem for a financially strapped company. One major caveat of Access is that because it is not a database server, you don't have a server dedicated to passing out query results. This means it is not optimized for very heavy use. In addition to this is the fact that you must address the issue of security if you are going to use an Access database in an Internet setting. This means that unless you change many of the default settings in Access, your entire database can be open to anyone in the world. Security in Access works through your "data database" and a "user database". The "data database" is the database with your tables, queries, forms, reports, macros and modules. The "user database" stores user name, password, identifiers, groups and group membership information. All the "user database" does is validate a user and a password and provides the specific "permission" within itself. Even though it is not casually apparent, security is always on in Access. The reason that you don't see any "log-in" is because by default you are "logging-in" as the default administrator without a password. Eight Steps for Creating
and Securing an Access Database
Step 1: Creating a New
User Database: It is unlikely that this tool will make an appearance on your shortcut menu, therefore you will have to browse to find it. Most of the time there will be a shortcut for the tool in the "Microsoft Office" directory. However the simplest way to execute this program is to search for the name of the file, which is WRKGADM.EXE. Once you have located this tool, start it and you should see a dialog box. You should then choose "CREATE". You will then be prompted to supply a name for your "user database". Here you will enter the organization for the database as well as an ID for it. After you have supplied the information you should select "OK". You will now be prompted to supply the location where you want to create your "user database" and you will need to give the file a name. After you complete the file name and location, press "OK". You must then confirm that the information you have just supplied is correct. If the information is correct, press the "OK" button. If you need to make changes, press the "CHANGE" button. After you have successfully completed this task, the tool will tell you that you have successfully created and joined the "new user database". Step 2: Getting the
Log-in Box to Appear: Open MS Access and DON'T OPEN A DATABASE! From the menu, select "TOOLS-SECURITY-USER-GROUP ACCOUNTS". Once selected, switch over to the "CHANGE LOGON PASSWORD" tab. You'll notice that the old password for the "ADMIN" account by default is left blank. This is the reason you are able to log into Access without entering a password. You should now enter a new password for the "ADMIN" account and press "OK". Go ahead and shut down Access, once it is shut down, re-start it. If all goes correctly you will be prompted for a "NAME" and "PASSWORD". Use the "ADMIN" name and password you supplied in the previous step. Step 3: Creating a New
Admin: Once again, start Access and DON'T OPEN A DATABASE. On the menu, select "TOOLS-SECURITY-USER and GROUP ACCOUNTS". Go over to the "USER" tab and select it. You will now add a "NEW ADMIN", so you should press the "NEW" button. You must now supply the new administrator with a name and an identifier. It is necessary that the new administrator belong to the "ADMINS" group. Therefore your next move will be to highlight the "ADMINS" group in the "AVAILABLE GROUPS" list. After you have successfully completed this task, press the "ADD" button. Now simply press the "OK" button and the "NEW ADMIN" account is created. However since new accounts are created without a password we will need to create one. Once again, you need to close Access and restart it. Now you will log-in as the new administrator that you just created and leave the password field blank. As before, DON'T OPEN A DATABASE. Proceed to "TOOLS-SECURITY-USER and GROUP ACCOUNTS". Now go over to the "CHANGE LOGON PASSWORD" tab, there you should notice that the current account is the "NEW ADMIN" account. Leave the old password field blank since this is a new user. Supply a new password for the "NEW ADMIN". Step 4: Removing
the "Admin" from the "Admins" Group: In order to perform this task you need to log-in to the database as the "NEW ADMIN" account. As before, DON'T OPEN A DATABASE, go to the "TOOLS-SECURITY-USER and GROUP ACCOUNTS" menu. Move over to the "USERS" tab and under "NAME" choose "ADMIN". Look in the "MEMBER OF" list, find and highlight the "ADMINS" group and then select "REMOVE". Step 5: Taking Ownership
of the Unsecured Database: Log-in to Access as the "NEW ADMIN" and create a new database. Go to the "File" menu, there you will select "GET EXTERNAL DATA-IMPORT". You will now "browse" to one of the databases that contains the unsecured data and objects you wish to import into the new secure database. If your actions are correct up to this point you will be presented with the "IMPORT OBJECT" dialog box. Now you will be able to select all of the "TABLES, QUERIES, FORMS, REPORTS, MACROS and MODULES" that you want to be part of your new secured database. Note: On the "TABLES" tab, make sure that you are importing the "DEFINITION" and "DATA". You will need to repeat this step for each unsecured database that you wish to recreate as a secure database. Step 6: Removing
Privileges to the Secure Database: Start Access and Log-in as the "NEW ADMIN" and open one of the "secured databases". Next, from the menu choose "TOOLS-SECURITY-USER and GROUP PERMISSIONS". Look under "LIST" and find and select "GROUPS". Next, look in the "USER/GROUP NAME" list and select "USERS". You will now set the "OBJECT TYPE" to "DATABASE". Next you will uncheck all of the "PERMISSIONS" that are checked. Finally, press the "APPLY" button. If all the actions in step 6 were performed correctly, the original "ADMIN" should no longer be able to access this database. You should now test your security, exit Access and reenter as the original "ADMIN". Go ahead and try to open a newly secured database. You should be presented with an error message explaining that you do not have permissions on this database. You will need to perform step 6 for every new database that you created using step 5. Step 7: Encrypting the
Database: Go ahead and log-in to Access as the "NEW ADMIN" and open a secured database. Go to the menu and select "TOOLS-SECURITY-ENCRYPT/DECRYPT DATABASE". Next you will need to "browse" and find the database that you want to encrypt. Then, supply the new encrypted database with a name. You will need to repeat step 7 for all of your un-encrypted databases. Step 8: Additional
Users: You would do this by creating a "NEW USER" such as you did with the "NEW ADMIN". Then give them "permissions" to access the database and further issue them the "specific permissions" to the database that you wish them to have. This is similar to what we did when we removed the permissions from the "ADMIN" user previously. * * * Even after all of these changes MS Access is still not a database server and will not perform as well as SQL. However if you choose to use it as the back-end database you will now be able to do so with out paying a heavy price for lack of security. About the author... |