Beta Release - Please Report Issues
Who is online? There are 2498 guests and 0 members online.
Member login | Become a member
home » Blogs » timmurphy » murach's sample DB
posted 2/8/2010 by timmurphy
Has anyone tried to attach murach's sample DB for SQL Server 2008? I tried by using the "simple" steps outlined in the book and got these errors:
Msg 5120, Level 16, State 101, Line 1Unable to open the physical file "C:\Murach\SQL Server 2008\Databases\AP.mdf". Operating system error 5: "5(Access is denied.)".Msg 5120, Level 16, State 101, Line 2Unable to open the physical file "C:\Murach\SQL Server 2008\Databases\AP_AllObjects.mdf". Operating system error 5: "5(Access is denied.)".Msg 5120, Level 16, State 101, Line 2Unable to open the physical file "C:\Murach\SQL Server 2008\Databases\Examples.mdf". Operating system error 5: "5(Access is denied.)".Msg 5120, Level 16, State 101, Line 2Unable to open the physical file "C:\Murach\SQL Server 2008\Databases\ProductOrders.mdf". Operating system error 5: "5(Access is denied.)".
Msg 5120, Level 16, State 101, Line 1
Unable to open the physical file "C:\Murach\SQL Server 2008\Databases\AP.mdf". Operating system error 5: "5(Access is denied.)".
Msg 5120, Level 16, State 101, Line 2
Unable to open the physical file "C:\Murach\SQL Server 2008\Databases\AP_AllObjects.mdf". Operating system error 5: "5(Access is denied.)".
Unable to open the physical file "C:\Murach\SQL Server 2008\Databases\Examples.mdf". Operating system error 5: "5(Access is denied.)".
Unable to open the physical file "C:\Murach\SQL Server 2008\Databases\ProductOrders.mdf". Operating system error 5: "5(Access is denied.)".
It would be nice to use for the exercises at the end of chapters.
Here's the query, from their batch file:
CREATE DATABASE AP ON PRIMARY (FILENAME = 'C:\Murach\SQL Server 2008\Databases\AP.mdf') LOG ON (FILENAME = 'C:\Murach\SQL Server 2008\Databases\AP_log.ldf') FOR ATTACH GO CREATE DATABASE AP_AllObjects ON PRIMARY (FILENAME = 'C:\Murach\SQL Server 2008\Databases\AP_AllObjects.mdf') LOG ON (FILENAME = 'C:\Murach\SQL Server 2008\Databases\AP_AllObjects_log.ldf') FOR ATTACH GO CREATE DATABASE Examples ON PRIMARY (FILENAME = 'C:\Murach\SQL Server 2008\Databases\Examples.mdf') LOG ON (FILENAME = 'C:\Murach\SQL Server 2008\Databases\Examples_log.ldf') FOR ATTACH GO CREATE DATABASE ProductOrders ON PRIMARY (FILENAME = 'C:\Murach\SQL Server 2008\Databases\ProductOrders.mdf') LOG ON (FILENAME = 'C:\Murach\SQL Server 2008\Databases\ProductOrders_log.ldf') FOR ATTACH GO
timmurphy (Member since: 1/30/2010)
View timmurphy 's profile
Comment (No HTML)
It's fast, easy and free! Submit articles, get your own blog, ask questions & give answers in the forums, and become a better developer, faster.
enter your email address: