Attaching database files that are in the C:\Program Files or C:\Program Files (x86) directory.
The default location for
ESOPT, CIBP, and other SQL Server files is in the program files directory.
However this can cause an error when you try to attach the files in SQL Server,
because Microsoft SQL Server Studio is not running with the correct permissions.
There are two options:
1. Move the .mdf and .ldf files to a new location, such as the SQL Server data directory or C:\ESOPT
2. Start MS SQL Server Studion using RAA, or “Run as Administrator”
a. To use RAA, find the icon used to launch MS SQL Server Studio in the Windows Start Menu, then RIGHT-click.
b. In the pop-up menu, choose Run as Administrator.