Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to attach "AdventureWorks2008" Sample Database to a named Instance in SQL Server 2008

First of all "Northwind" and "AdventureWorksDW2008" databases attached without problem, but "AdventureWorks2008" fails with the following error.

//Msg 5120, Level 16, State 105, Line 1
 Unable to open the physical file 
"C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\Documents".
 Operating system error 2: "2(The system cannot find the file specified.)".
 Msg 5105, Level 16, State 14, Line 1
 A file activation error occurred. The physical file name 
 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\Documents' 
 may be incorrect. Diagnose and correct additional errors, and retry the operation.
 Msg 1813, Level 16, State 2, Line 1
 Could not open new database 'AdventureWorks2008'. CREATE DATABASE is aborted.

I did not use the default database instance "MSSQLSERVER" during install.

So where is it finding this path "C:...\MSSQL10.MSSQLSERVER...\Documents"?

like image 238
user366731 Avatar asked Dec 28 '25 16:12

user366731


1 Answers

go to sql server configuration manager sql server services SQL Server(MSSQLSERVER) change the "log on as" to "local system"

like image 107
Caroline Avatar answered Dec 31 '25 09:12

Caroline