Microsoft Dynamics 365 Blog

Earlier I did describe how to duplicate an installed and existing database in post “How to install more than one Dynamics NAV 2009 Demo Database“. This time I will attached the DB directly from DVD.
The steps is as follow

  1. Create the directory where you would like to have the new database.
  2. Copy the database from \DVD\SQLDemoDatabase\PFiles\Microsoft Dynamics NAV\60\Database\ Demo Database NAV (6-0)_Data.mdf to the new directory.
  3. Run the following command in SQL manager studio and replace the @physname path with the new created on and set @dbname to the database name you would like to use.
    sp_attach_single_file_db @dbname= ‘new_Demo Database NAV (6-0)’, @physname= ‘C:\Program Files (x86)\Microsoft Dynamics NAV\60\Database – Copy\Demo Database NAV (6-0)_Data.mdf’

You need to ensure that the SQL server user have correct permissions to ‘C:\Program Files (x86)\Microsoft Dynamics NAV\60\Database – Copy\’ or where you put the db files. I’m using ‘NETWORK SERVICE” as the SQL server user account, the NAV will use this account by default when doing demo installation.

To set permission

  1. Open properties for the directory.
  2. Click security tab
  3. Click advance
  4. Click edit
  5. If the SQL server user is not present press add and pick the user else select the SQL server user and click edit
  6. Change the permission so that the following permission is checked
    1. Read attributes
    2. Read extended attributes
    3. Create files / write data
    4. Create folders / append data
    5. Write attributes
    6. Write extended attributes
    7. Delete subfolders and files
    8. Delete
  7. Click OK
  8. Click Ok
  9. Click OK
  10. Click OK

We're always looking for feedback and would like to hear from you. Please head to the Dynamics 365 Community to start a discussion, ask questions, and tell us what you think!