Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Error attaching MdxStepByStep.mdf for SQL Server 2008 MDX Step by Step. Expand / Collapse
Author
Message
Posted Sunday, June 17, 2012 3:27 PM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 2:44 PM
Points: 42,443, Visits: 35,498
What is the exact script you are using?

Why don't you contact MS press or the author and ask them for a working DB?



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1317090
Posted Sunday, June 17, 2012 3:40 PM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Monday, July 21, 2014 3:00 PM
Points: 4,175, Visits: 4,257
GilaMonster (6/17/2012)
What is the exact script you are using?

Why don't you contact MS press or the author and ask them for a working DB?


This is one of the scripts.

CREATE DATABASE MdxStepByStep
ON (FILENAME = 'D:\MSSQL\MdxStepByStep.mdf')
FOR ATTACH_REBUILD_LOG;

I got the Database from the CD.

The script that I provided is the same as in the CD.


For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/

For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

Post #1317093
Posted Sunday, June 17, 2012 4:47 PM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 2:44 PM
Points: 42,443, Visits: 35,498
And what is the exact error message you get running that?


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1317095
Posted Sunday, June 17, 2012 5:00 PM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Monday, July 21, 2014 3:00 PM
Points: 4,175, Visits: 4,257
I looked up the reviews on Amazon and the solutions that the author provided did not work.

It is a hassle.

This is the exact error:

Msg 5173, Level 16, State 1, Line 5
One or more files do not match the primary file of the database. If you are attempting to attach a database, retry the operation with the correct files. If this is an existing database, the file may be corrupted and should be restored from a backup.
Log file 'C:\Microsoft Press\MDX SBS\Setup\SQL Server\MdxStepByStep_log.LDF' does not match the primary file. It may be from a different database or the log may have been rebuilt previously.
Msg 1813, Level 16, State 2, Line 5
Could not open new database 'MdxStepByStep'. CREATE DATABASE is aborted.

If you download the files you will see what I mean.


For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/

For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

Post #1317097
Posted Monday, June 18, 2012 1:44 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 2:44 PM
Points: 42,443, Visits: 35,498
All I can suggest is contact the author and/or MS Press and complain/ask for a working DB.


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1317163
Posted Tuesday, February 12, 2013 6:34 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, June 19, 2014 7:53 AM
Points: 87, Visits: 100
GilaMonster (6/18/2012)
All I can suggest is contact the author and/or MS Press and complain/ask for a working DB.


I am also facing the same problem....
Post #1418931
Posted Tuesday, February 12, 2013 6:49 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Monday, July 21, 2014 3:00 PM
Points: 4,175, Visits: 4,257
I was able to come up with a workaround.

If you delete the log file and revise the script you can attach the database.

I would provide the script but I lost it when my hard drive went bad.



For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/

For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

Post #1418932
Posted Tuesday, February 12, 2013 6:53 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, June 19, 2014 7:53 AM
Points: 87, Visits: 100
Welsh Corgi (2/12/2013)
I was able to come up with a workaround.

If you delete the log file and revise the script you can attach the database.

I would provide the script but I lost it when my hard drive went bad.



i have deleted the Log file and i am using the GUI and not script to attach the primary file but now its saying that info and also saying that the Log file is missing
Post #1418933
Posted Tuesday, February 12, 2013 6:58 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 2:44 PM
Points: 42,443, Visits: 35,498
GilaMonster (6/17/2012)
When you attach, explicitly remove the ldf in the dialog (if they didn't provide it). Or use CREATE DATABASE ... FOR ATTACH_REBUILD_LOG



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1418937
Posted Tuesday, February 12, 2013 7:04 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, June 19, 2014 7:53 AM
Points: 87, Visits: 100
GilaMonster (2/12/2013)
GilaMonster (6/17/2012)
When you attach, explicitly remove the ldf in the dialog (if they didn't provide it). Or use CREATE DATABASE ... FOR ATTACH_REBUILD_LOG


Yes the Script was useful ... i have deleted the Log file which it is referencing internally and executed it worked.. Thanks for u Guys :)
Post #1418942
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse