Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2231
  • Last Modified:

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

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
Tom Knowlton
Asked:
Tom Knowlton
  • 9
  • 7
1 Solution
 
Jason Yousef, MSSr. BI DeveloperCommented:
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
 
Tom KnowltonWeb developerAuthor Commented:
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
 
Jason Yousef, MSSr. BI DeveloperCommented:

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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Jason Yousef, MSSr. BI DeveloperCommented:
make sure to uninstall first, so the new instance gets the same name "SQLEXPRESS"
0
 
Tom KnowltonWeb developerAuthor Commented:
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
 
Jason Yousef, MSSr. BI DeveloperCommented:
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
 
Tom KnowltonWeb developerAuthor Commented:
No, it will not attach, at all.

0
 
Tom KnowltonWeb developerAuthor Commented:
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
 
Jason Yousef, MSSr. BI DeveloperCommented:
any of the abpve steps worked?
did you try steps 2 to 5 ?
0
 
Jason Yousef, MSSr. BI DeveloperCommented:
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
 
Tom KnowltonWeb developerAuthor Commented:
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
 
Jason Yousef, MSSr. BI DeveloperCommented:
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
 
Tom KnowltonWeb developerAuthor Commented:
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
 
Jason Yousef, MSSr. BI DeveloperCommented:
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
 
Tom KnowltonWeb developerAuthor Commented:
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
 
Jason Yousef, MSSr. BI DeveloperCommented:
Tom,
No problem, anytime, Best of luck.

Hussein
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 9
  • 7
Tackle projects and never again get stuck behind a technical roadblock.
Join Now