How to fix the msg 5172 after attach acopied .mdf and .ldf

Posted on 2003-02-28
Medium Priority
Last Modified: 2008-02-01
I copied 2 files .mdf and .ldf then I tried this:

 EXEC sp_attach_db@dbname = N'portal_Bill'.
 @filename1 = N'd:\MSSQL7\Data\portal_Bill_Data.MDF',
 @filename2 = N'd:\MSSQL7\Data\portal_Bill_Log.LDF'

 server: msg 5172, level 16, state 15, line 1
 The header for file 'd:\MSSQL7\Data\portal_Bill_Log.LDF'
 is not a valid database file header. The PageAudit property is incorrect.
Question by:itsai6668
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 75

Expert Comment

by:Anthony Perkins
ID: 8043612
This probably does not apply, but ...
PRB: SQL Server Backup Performed on Computer Configured with DPT RAID Controller Card May Be Invalid


Author Comment

ID: 8043692
If the .mdf and .ldf from server 2000 but need to restore to SQL 7.0 ? OK ??
LVL 75

Expert Comment

by:Anthony Perkins
ID: 8044031
As far as I know this is not possible.  You will have to use DTS to convert the data.

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.


Accepted Solution

ARSRINI earned 200 total points
ID: 8050657
Do a Export Data from server 2000 to SQL 7.0.

Also when you copied the file, did you first detach the database from the original server?

Author Comment

ID: 8057976

Author Comment

ID: 8196635
any article describes how to connect to SQL Server 7.0 by using the Microsoft SQL Server 7.0 driver for JDBC ??

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Suggested Courses

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question