Skip to content

Convert MDB to MDF

Move an Access MDB database into SQL Server and validate the resulting MDF data file.

Convert MDB files online

We don’t have a dedicated online converter for MDB to MDF yet, but you can convert MDB files online to these and more formats:

Want to convert MDB to MDF?

Let us know. We pick the conversions to add next by how many people ask for them.

How to convert mdb to mdf file

A legacy Access database may need migration when a server application, administrator, or development tool requires SQL Server instead of an Access file. The result is a SQL Server database with an MDF data file and normally an accompanying LDF transaction-log file, not a renamed MDB file.

What the MDB format is

MDB is the classic Microsoft Access database format used for tables, queries, relationships, forms, reports, macros, and VBA code. Access versions through Access 2003 used MDB as the standard format; newer Access versions can still open and create MDB files for compatibility. MDB files commonly occur in legacy business applications, departmental databases, data exports, and applications built with Microsoft Jet or ACE.

An MDB can contain both relational data and an Access user interface. Its forms, reports, macros, VBA modules, linked-table definitions, and Access-specific queries do not automatically become equivalent SQL Server objects.

What the MDF format is

MDF is SQL Server's primary data-file format. It stores SQL Server tables, indexes, metadata, and other database objects. A SQL Server database normally also has an LDF transaction-log file and may have additional NDF data files.

SQL Server provides server-side security, transactions, concurrent access, scheduled backups, replication features, and T-SQL support. MDF is not a generic database container: changing an MDB extension to MDF does not convert the database, and an MDF cannot be opened directly in Microsoft Access.

How to convert MDB to MDF

SQL Server Migration Assistant for Access (SSMA for Access) is the appropriate general-purpose desktop tool. It converts the Access schema and migrates table data into a SQL Server database; the SQL Server instance creates and manages the MDF and LDF files.

  1. Make a backup copy of the MDB. Open the copy in Access and run Database Tools → Compact and Repair Database if the source may contain structural errors.
  2. Install a supported SQL Server edition, such as SQL Server Express or Developer, and install SSMA for Access from Microsoft. Install the Microsoft Access Database Engine if SSMA requires an Access provider. Its 32-bit or 64-bit architecture must be compatible with the installed SSMA components and the Access driver.
  3. In SSMA, create a project, select the target SQL Server version, and use File → Add Databases to add the MDB file.
  4. Connect SSMA to the SQL Server instance, select or create the destination database, and run Convert Schema. Review the assessment report for unsupported data types, reserved words, indexes, relationships, and Access-specific expressions.
  5. Use Synchronize with Database to create the SQL Server objects, then use Migrate Data to copy the table contents. Check the migration log for rejected rows and conversion warnings.
  6. In SQL Server Management Studio, compare row counts and verify primary keys, foreign keys, indexes, nullability, date values, decimal precision, identity values, and representative queries.

To control the MDF location, create the destination database in SQL Server before synchronizing the SSMA project. For example:

CREATE DATABASE [ConvertedDb]
ON PRIMARY (
    NAME = N'ConvertedDb',
    FILENAME = N'C:\SQLData\ConvertedDb.mdf'
)
LOG ON (
    NAME = N'ConvertedDb_log',
    FILENAME = N'C:\SQLData\ConvertedDb_log.ldf'
);

Connect SSMA to ConvertedDb and migrate into that database. The SQL Server service account must have permission to create and access the specified directory. The path must exist on the SQL Server computer, not merely on the computer running SSMA.

For a simple one-time table transfer, SQL Server Management Studio's Import and Export Wizard can use Microsoft Access as the source and SQL Server as the destination. SSMA is preferable when relationships, indexes, data-type conversion, and migration diagnostics matter.

Quality and compatibility limits

This is a database migration, not a format-preserving export. Access forms, reports, macros, VBA modules, linked-table definitions, and many Access-specific queries remain in Access and require manual redesign. A common architecture keeps an Access front end while moving its tables to SQL Server.

Review Yes/No fields, Attachment and multivalued fields, AutoNumber values, Memo or Long Text data, date-time values, currency precision, and queries using functions such as IIf, Nz, or domain functions. SQL Server may map these differently or require manual query changes. Recreate users, roles, permissions, scheduled tasks, and application connection strings in SQL Server; Access security settings are not transferred as an equivalent server-security configuration.

There is no generally suitable online service that produces an attachable MDF from an MDB. An MDF must be created by SQL Server, and uploading an MDB can expose its complete contents, connection details, and credentials. Use SSMA with a local or organization-controlled SQL Server instance for confidential or regulated data. Online MDB-to-CSV or MDB-to-SQL services can be useful for non-sensitive table extraction, but they do not preserve the complete Access database or create a native SQL Server MDF.

MDB vs MDF: format comparison

How the MDB and MDF formats compare on the properties that matter most for this conversion.

Comparison of the MDB and MDF file formats
Property .MDB Microsoft Access Database .MDF Media Descriptor File
Open standard No No
Compression — Both
Typical file size Medium Large
Opens in a web browser No No
Further editing Limited Not directly editable
Metadata support Basic Basic
Plain-text readable No No
Best used for Data exchange Long-term archiving
Introduced 1992 2000
Developer Microsoft Alcohol Soft

Information about file extensions and file types is provided by File-Extensions.org

Already downloaded

This file has already been downloaded. For your privacy it was deleted from our server right after the download, so it cannot be downloaded again. To get it once more, convert the file again.