Encrypt a database by using a database password (2024)

When you want to help prevent unauthorized use of an Access database, consider encrypting the database by setting a password. If you know the password for an encrypted database, you can also decrypt the database and remove its password. This article explains how to encrypt a database by using a database password, and how to decrypt a database and remove its password.

In earlier versions of Access, you could create user accounts and passwords using a feature named user-level security. This topic does not discuss user-level security, which is not available when you use the .accdb file format.

If you encrypt a database and then lose the password, you will be unable to use the database. You cannot remove a database password if you do not know the password.

In this article

  • Overview

  • Encrypt a database by using a password

  • Encrypt a split database

  • Open and decrypt a database

  • Remove a password from a database

Overview

The encryption tool makes your data unreadable by other tools, and sets a password that is required to use the database. Remember these rules as you proceed:

  • The new encryption feature applies only to databases in the .accdb file format.

  • The tool uses a stronger encryption algorithm than was used in earlier versions of Access.

  • If you want to encode or apply a password to an earlier-version Access database (an .mdb file), Access uses the Encoding and Password features fromAccess 2003.

Top of Page

Encrypt a database by using a password

The steps in this section explain how to create and apply a password to an Access desktop database.

Encrypt a database

  1. Open the database in Exclusive mode.

    How do I open a database in Exclusive mode?

    1. On the File tab, click Open.

    2. In the Open dialog box, browse to the file that you want to open, and then select the file.

    3. Click the arrow next to the Open button, and then click Open Exclusive. The following figure depicts the menu.

      Encrypt a database by using a database password (1)

  2. On the File tab, click Info, and then click Encrypt with Password.

    The Set Database Password dialog box appears.

  3. Type your password in the Password box, type it again in the Verify box, and then click OK.

    Notes:

    • Use strong passwords that combine uppercase and lowercase letters, numbers, and symbols. Weak passwords don't mix these elements. Strong password: Y6dh!et5. Weak password: House27. Passwords should be 8 or more characters in length. A pass phrase that uses 14 or more characters is better.

    • It is critical that you remember your password. If you forget your password, Microsoft cannot retrieve it. Store the passwords that you write down in a secure place away from the information that they help protect.

Top of Page

Encrypt a split database

To encrypt a split database, you encrypt both the front-end database and the back-end database. After you encrypt the back-end database, you relink to its tables.

  1. Using the steps provided in the previous section Encrypt a database by using a password, encrypt the back-end database.

  2. In the front-end database, delete the links to the tables in the back-end database, and then link to them again. Access will prompt you for the back-end database password when you relink.

  3. After you relink the tables, encrypt the front-end database by using the steps provided previously in the section Encrypt a database by using a password.

Open and decrypt a database

As a reminder, make sure that you remember your password — if you forget your password, there is no method by which it can be retrieved.

  1. Open the encrypted database the way that you open any other database.

    The Password Required dialog box appears.

  2. Type your password in the Enter database password box, and then click OK.

Top of Page

Remove a password from a database

Note:When you remove a password from a database, you can restore it at any time (or replace it with another password) by repeating the steps in Encrypt a database by using a password, earlier in this article.

Remove a password

  1. Open the database in Exclusive mode.

    How do I open a database in Exclusive mode?

    1. On the File tab, click Open.

    2. In the Open dialog box, browse to the file that you want to open, and then select the file.

    3. Click the arrow next to the Open button, and then click Open Exclusive. The following figure depicts the menu.

      Encrypt a database by using a database password (2)

  2. On the File tab, click Info, and then click Decrypt Database. (Note, if you're usingAccess 2007 on the Database Tools tab, in the Database Tools group, click Decrypt Database.)

    The Unset Database Password dialog box appears.

  3. Type your password in the Password box, and then click OK.

Top of Page

Encrypt a database by using a database password (2024)

FAQs

How to encrypt password before storing in database? ›

It's simple, apply the same hash function on the password which user entered and then compare it with the hash stored in the database. If both hashes match then the user is authenticated (since hash of same input will give same output).

Can you encrypt an entire database? ›

TDE protects data files and log files at rest. Encrypting the entire database after enabling TDE on an unencrypted database is a sizable data operation and the time it takes depends on the system resources on which this database is running.

What are two ways to encrypt data in a database? ›

Generally, there are two ways to encrypt data in a database: by using data-at-rest encryption, or by using data-in-transit encryption.

How to encrypt MySQL database password? ›

MySQL server uses the PASSWORD function to encrypt MySQL passwords for storage in the Password column of the user grant table. The value returned by the PASSWORD function is a hashed string, or NULL if the argument was NULL. The PASSWORD function accepts one parameter which is the string to be encrypted.

Why do we encrypt passwords in database? ›

Encryption scrambles your password so it's unreadable and/or unusable by hackers. That simple step protects your password while it's sitting in a server, and it offers more protection as your password zooms across the internet. Imagine that you've created the strongest password possible.

What key is used to encrypt database? ›

The symmetric key is created during SQL Server initialization when you first start the SQL Server instance. The key is used by SQL Server to encrypt sensitive data that is stored in SQL Server. Public and private keys are created by the operating system and they are used to protect the symmetric key.

How do I encrypt a local database? ›

Open the local database. Click File > Application > Properties> Encryption Settings. Select Locally encrypt this database using and select an encryption level. Strong is recommended and may be the only encryption level available.

Should you encrypt database data? ›

Encryption is one of the most important techniques for securing data in a database, especially for sensitive information such as passwords, credit card numbers, or personal details.

Top Articles
Latest Posts
Article information

Author: Catherine Tremblay

Last Updated:

Views: 6668

Rating: 4.7 / 5 (47 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Catherine Tremblay

Birthday: 1999-09-23

Address: Suite 461 73643 Sherril Loaf, Dickinsonland, AZ 47941-2379

Phone: +2678139151039

Job: International Administration Supervisor

Hobby: Dowsing, Snowboarding, Rowing, Beekeeping, Calligraphy, Shooting, Air sports

Introduction: My name is Catherine Tremblay, I am a precious, perfect, tasty, enthusiastic, inexpensive, vast, kind person who loves writing and wants to share my knowledge and understanding with you.