Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trouble Attaching a Database

Status
Not open for further replies.

ChewDoggie

Programmer
Mar 14, 2005
604
US
Hello All,

I just got done installing SSMS 2008. I logged in and connected to the Server OK. I'm attempting to attach an .mdf database file and it barfs with "An Error occurred while attaching the database".

Of course, none of the links provided in the Advanced information screen help. One message says, "Run DBCC CHECKTABLE on sysindexes", however, the database has to be ATTACHED in order to run this, so that's no good.

I'm logged into SSMS with 'sa' credentials and am listed as the sysadmin and db_owner in the Security area.

Any ideas...Im all eyes.

Many thanks !

Chew


10% of your life is what happens to you. 90% of your life is how you deal with it.
 
Run this (in a query window):

Select @@Version

And post the results back here.

-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Jiminy Cricket George....are you EVERYWHERE ?? :)

The results are:

Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05 Copyright (c) 1988-2003 Microsoft Corporation Desktop Engine on Windows NT 5.1 (Build 2600: Service Pack 3)

C.

10% of your life is what happens to you. 90% of your life is how you deal with it.
 
I think I just found my problem....trying backward compatability from 2008 to 2000. Can't be done.

Chew


10% of your life is what happens to you. 90% of your life is how you deal with it.
 
I just got done installing SSMS 2008

Let me explain what's going on here before I give you the bad news....

The SQL database engine is what's important. By running @@Version, I can tell that your database engine is SQL2000. SQL Server Management Studio (SSMS) is nothing more than a pretty front end for your database engine. Installing a newer version of the management studio does not affect the underlying database engine.

The bad news is.... there is absolutely nothing you can do to attach this database to your SQL2000 instance. Nothing. Don't even bother trying. Complete waste of effort. It's a "fools errand". Give up now. Seriously... ain't gonna happen.

You can only attach a sql database to an equivalent version or newer, not older. For example, if the DB you have is a SQL2005 database, you can attach it to SQL2005 or SQL2008, but not to SQL2000. If the size of the DB is less than 4 gigs, you could install SQL Server 2005 Express or SQL Server 2008 Express. Or... you can install one of the non-express versions, but they all have price tags associated with them.

If you absolutely MUST get the data in this database on to your SQL2000 instance, you will need to install SQL2005 (or SQL2008), script the database and run the scripts on a new (blank) SQL2000 database connected to your SQL2000 instance. Once the DB is scripted, you will need to also move the data from one instance/database to the other.

Good luck.

-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Thanks, George. Contrary to your words, there wasn't ANY "bad news" in your post. It's all good! I had been reading tons of posts on google/yahoo (prior to posting here) where they all said the same thing but I though, 'that doesn't apply to me'. THen I ran your query and I realized that they ALL applied to me. My new SSMS was just a pretty wrapper.

I just need a way to add some fields to some existing tables. Will likely install an express version.

Thanks again !

C.




10% of your life is what happens to you. 90% of your life is how you deal with it.
 
Just downloaded and installed SQL 2008 Express and was able to connect to the server and attach to a DB.

Thanks again gmMaestro !

C.


10% of your life is what happens to you. 90% of your life is how you deal with it.
 
No problem.

-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top