Solved

Error attaching to database version 612 vs the MDF and LDF are from 655?

Posted on 2010-08-21
16
2,143 Views
Last Modified: 2012-06-27
TITLE: Microsoft SQL Server Management Studio Express
------------------------------

Attach database failed for Server 'KNOWLTON-PC\SQLEXPRESS'.  (Microsoft.SqlServer.Express.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)

------------------------------

The database 'Nitrobids' cannot be opened because it is version 655. This server supports version 612 and earlier. A downgrade path is not supported.
Could not open new database 'Nitrobids'. CREATE DATABASE is aborted. (Microsoft SQL Server, Error: 948)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=948&LinkId=20476





I have tried to upgrade to SP3.  The install seems to go okay...no errors....but it still says Service Pack 2 when I do this:


select @@version


in the query editor


(Full results:)

Microsoft SQL Server 2005 - 9.00.4035.00 (Intel X86)   Nov 24 2008 13:01:59   Copyright (c) 1988-2005 Microsoft Corporation  Express Edition on Windows NT 6.0 (Build 6002: Service Pack 2)
0
Comment
Question by:knowlton
  • 9
  • 7
16 Comments
 
LVL 21

Accepted Solution

by:
huslayer earned 500 total points
ID: 33493665
Hi, is there's a need to keep using express 2005 ?
 why don't you uninstall and install the latest 2008 R2 express !
http://www.microsoft.com/express/database/
0
 
LVL 5

Author Comment

by:knowlton
ID: 33493672
The biggest concern (for my situation) is that I am able to open the MDF file I have been sent.

Apparently it was created under a version more updated than mine.  655 vs my version is 612.

Do those numbers mean anything to you?

Is SQL Server 2008 the same as 655?


In the meantime....I will install 2008 R2 as you recommend.
0
 
LVL 21

Expert Comment

by:huslayer
ID: 33493686

Something does not make sense,
Are you using Visual Studio..? IF yes then make sure you have latest service packs for your version of Visual Studio (e.g. Service pack 1 for VS 2008)

The error message is saying that  MDF you are trying to attach is created in the later version of SQL Server then what you currently have.  

This can happen if you are trying to attach a 2008 database in SQL 2005 but I don't think that is the case.

Yes 2008 R2 should import any other erlier versions.
0
 
LVL 21

Expert Comment

by:huslayer
ID: 33493697
make sure to uninstall first, so the new instance gets the same name "SQLEXPRESS"
0
 
LVL 5

Author Comment

by:knowlton
ID: 33538246
I've moved on from the 612 vs 655 version problem now  (thank you so much).

It did require a complete uninstall and reinstall (which takes forever, but it was worth it).

NOW it is complaining that the MDF file is Read Only  (can you believe it?)

I checked the file attributes, and the Read Only attribute is NOT checked.

Any help, huslayer?
0
 
LVL 21

Expert Comment

by:huslayer
ID: 33541286
Well I'm a nice guy, I can beleive anything :)
so did you attach it and it's showing as grey colored - read only, or you can't attach it at all ?


Anyway, i never had that before, but could due to many reasons.

1-Make sure the file's properities are not read only --- Done
2-Make sure the SQL account has read and write to the directory (can you create new DBs?)
3-Make sure the volume c:\ or D:\ or whatever is not compressed or encrypted
4-if you're using the "NETWORK SERVICE" account- so try adding it with read-write permissions on the database to the folder where the mdf and log files are located.
5-try to attach using this command ---->   exec sp_attach_db 'yourdbname' ,'X:\Mssql\Data\yourdb.mdf'
6-last resort

Run

 

select is_read_only, *From sys.databases

select databaseproperty('testdb','isreadonly')

 

IF the above statement return 1 , then the database is set as readonly.

 

Run the following statement to make it as read-write

 

alter database testdb set READ_WRITE

 

test and tell me ...

 
0
 
LVL 5

Author Comment

by:knowlton
ID: 33544152
No, it will not attach, at all.

0
 
LVL 5

Author Comment

by:knowlton
ID: 33544421
I can create a new database and add a table to it.


Here is a screenshot of the exact error I am getting:
readonlyattachdenied.jpg
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 21

Expert Comment

by:huslayer
ID: 33547951
any of the abpve steps worked?
did you try steps 2 to 5 ?
0
 
LVL 21

Expert Comment

by:huslayer
ID: 33547991
do you wanna send me the DB to try to attach it or it has sensetive data? you can use my personal e-mail huslayer@hotmail.com
 
0
 
LVL 5

Author Comment

by:knowlton
ID: 33548103
I would send the files...but they are quite large.

Plus, yeah...they do have sensitive information...names...addresses, etc.


What would it take to MAKE this error occur in an MDF and LDF that are working?
0
 
LVL 21

Expert Comment

by:huslayer
ID: 33549171
The files belongs to sql 2000 and was a read only or wasn't de-ttached correct, was just copied, and while sql 2008 attaching them it needs to upgrade them, and hence it's read only sql fails.
the last hope is to attach them to sql 2000 which I have.
Don't how can I help further...
0
 
LVL 5

Author Closing Comment

by:knowlton
ID: 33559266
Thx.  Although my problem is not solved, I no longer believe it to be fixable on my end.  I believe the original sender of the database files needs to resend them.  You did answer my original question.  Thank you, huslayer
0
 
LVL 21

Expert Comment

by:huslayer
ID: 33560182
Sorry really to hear that and I still want to help.

I can get SQL 2000 evaluation CD, do you want me to upload it and you try to install it and attach the DB again?
0
 
LVL 5

Author Comment

by:knowlton
ID: 33560256
Give me a few weeks and I will know better if I need to pursue this more.

I suspect that what may have happened was the database was in use while being copied.  Could this be causing the problem?

My situation is I am working on a website that connects to a database.  I am trying to setup a local version on my laptop.  They provided me with a copy of the database (90+ mb).  They gave me a MDF and an LDF file.  

This may all be moot.  I have delivered the code and I am just waiting to see if they have any tweaks or feedback for me.  In essence I am saying...there is a possibility I am done with the project.

But yes...I'll come back and post if I think I need more help.  

I appreciate all of your time and effort, and willingness to continue helping.

Tom
0
 
LVL 21

Expert Comment

by:huslayer
ID: 33560499
Tom,
No problem, anytime, Best of luck.

Hussein
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

758 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

Need Help in Real-Time?

Connect with top rated Experts

27 Experts available now in Live!

Get 1:1 Help Now