Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 The file you have specified is not a valid sql

Author  Topic 

mrmprg
Starting Member

5 Posts

Posted - 2011-06-24 : 05:11:31
Dear
I format my hard and then restor my mdf and ldf file .after i want to attach them to sqlserver 2000 it doesnt attach.
It shows this message : the file you have specified is not a valid sql Server database file.
anyone can help me for this problem?
I can send files if you want.
Thanks and best regards.

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2011-06-24 : 05:37:47
Is sql server the same vaersion/service pack?
Could be you might have corrupt files. Try it without the ldf.

Don't you have a backup?
If not then treat it as a learning experience.


==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

mrmprg
Starting Member

5 Posts

Posted - 2011-06-24 : 06:01:59
quote:
Originally posted by nigelrivett

Is sql server the same vaersion/service pack?
Could be you might have corrupt files. Try it without the ldf.

Don't you have a backup?
If not then treat it as a learning experience.


==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.


Thanks for attention
yes,Sql server is the same and i tested it without ldf
How i can send file for you?
Go to Top of Page

raghuveer125
Constraint Violating Yak Guru

285 Posts

Posted - 2011-06-24 : 06:15:24
What is size of file.

Which version of sql you are using? and which version of sp(service pack)?

In Love... With Me!
Go to Top of Page

mrmprg
Starting Member

5 Posts

Posted - 2011-06-24 : 06:38:30
Mdf is 1.4 Mb
and ldf is 1.2 MB
I use personal sql server 2000 and win XP Sp2
Thanks
Go to Top of Page

raghuveer125
Constraint Violating Yak Guru

285 Posts

Posted - 2011-06-24 : 07:59:14
Then try this first

Create database with same mdf file name next stop your mssqlserver and copy your old mdf,ldf and replace with new one then restart mssqlserver and try to access your database.

If not possible then let me know whether database is in suspect mode or not?


In Love... With Me!
Go to Top of Page

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2011-06-24 : 08:21:16
Try this?
http://www.nigelrivett.net/SQLAdmin/RecoverCorruptDatabase.html

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

mrmprg
Starting Member

5 Posts

Posted - 2011-06-24 : 09:50:35
quote:
Originally posted by raghuveer125

Then try this first

Create database with same mdf file name next stop your mssqlserver and copy your old mdf,ldf and replace with new one then restart mssqlserver and try to access your database.

If not possible then let me know whether database is in suspect mode or not?


In Love... With Me!


I did it and database is in suspect mode.
Thanks and best regards.
Go to Top of Page

mrmprg
Starting Member

5 Posts

Posted - 2011-06-25 : 00:36:57
Is there a way that i send my database and any one check it ?
Its very important for me that i can recover my database.
its dtabase of a CallCenter Program that i wrote with c# and i dont want redesign it from begin.
Thanks.

Go to Top of Page

raghuveer125
Constraint Violating Yak Guru

285 Posts

Posted - 2011-06-27 : 03:56:51
Hey go through nigelrivett link

It will solve your problem



In Love... With Me!
Go to Top of Page
   

- Advertisement -