Installation of SQL Server 2008 MDX Step By Step MDX Sample

Hello,

I'm having trouble installing the sample from the SQL Server 2008 MDX Step By Step MDX Book.

I downloaded the sample data file from http://go.microsoft.com/fwlink/?LinkId=139491

which created a directory called:

C:\Microsoft Press\MDX SBS\Setup\SQL Server

I tried attaching the MdxStepByStep.mdf database, using the script

Msg 5173, Level 16, State 1, Line 1

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 1

Could not open new database 'MdxStepByStep'. CREATE DATABASE is aborted.

I've tried copying the file to the SSAS subdirectory and attaching, but no luck either.

Any ideas?

Thanks,

June 22nd, 2015 3:25am

1) place Log file in another folder or rename to another name, there should not log file in same folder.

2) 

CREATE DATABASE MdxStepByStep ON
(FILENAME = N'C:\Microsoft Press\MDX SBS\Setup\SQL Server\MdxStepByStep.mdf')
FOR ATTACH_REBUILD_LOG
GO


Free Windows Admin Tool Kit Click here and download it now
June 22nd, 2015 4:07am

It ran a rebuild, which looks good, created a new log file, but now I'm still not seeing it attached, and I get this error:

Msg 1801, Level 16, State 3, Line 1

Database 'MdxStepByStep' already exists. Choose a different database name.

It added it do my  Database instance, not my Analysis Services Instance.

It seems like there is one more step required.

Thank you so very much,


June 22nd, 2015 11:12am

Hi vsla,

According to your description, you get the above error when restoring the sample database. Right?

I get the same error when restoring the sample database for MDX SBS. It seems the log file holds the transaction shows that this database has been rebuilt. So based on the log file, SQL Server will abort creating the database. Please delete the log file under C:\Microsoft Press\MDX SBS\Setup\SQL Server\MdxStepByStep.ldf . Then you can restore the database successfully and generate a new log file.

Regards,

Free Windows Admin Tool Kit Click here and download it now
June 23rd, 2015 3:23am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics