Fix to SQL server Express - 2005
1) Go to C or D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data, right-clicked on each file and make sure that "Compress contents" was NOT checked. When you check "ready to archive", you will get a different error (instead of 26 it was 40) when creating a new database.
2) Run SQLdiag found in C:\Program Files\Microsoft SQL Server\90\Tools\Binn, to get some hints.
3) Right Click SQLExpress in Services.msc and changed the Log On to "Local System Account" with the box check.
4) See-> Windows control panel -> Performance and maintenance -> Administrative tools -> Services ->right click on SQLEXPRESS -> Properties -> Under Logon tab check Local logon and allow interact with local services!
5) Granting the â€śNetwork Serviceâ€ť account Full Permission on the â€śC:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Dataâ€ť folder will do.
(NT AUTHORITY\NetworkService - Services.msc -> SQLExpress)