How to Create an MDF File
- 1). Open Microsoft SQL Server Management console. When you're prompted for a user name and password, use the "sa" privileges. The "sa" user name is the system administrator, which is needed to create a database MDF file.
- 2). Right-click the "Database" icon and then select "New Database." A new window is opened, which is where you set the properties for your new database.
- 3). Enter a database name in the first text box. In the logical name and path list box, click the button labeled "..." to set a location for the MDF and LOG file. The log file is where the transactions are saved for your database.
- 4). Press the "Ok" button. It takes a few seconds for the MDF and LOG files to create. Once the database is finished, your MDF file is created and ready to save data.