Groups | Blog | Home
all groups > sql server new users > july 2006 >

sql server new users : problem attaching 2000 db to 2005


Middletree
7/21/2006 9:00:20 AM
I have done this before with no problem, so I don't understand why I can't
do it now.

I have a SQL 2000 database, which I want to copy over to another machine. It
happens to have 2005. I understand that I can't detach and attach a 2005
database to 2000, but I should be able to go from 2000 to 2005.

I detached the 2000 database, and ended up with an mdf and a log file. I
deleted the log file, then brought the mdf over to the new machine. I
right-clicked, said to attach a database, and got an error that said it was
looking for a file with a .dat extension, which I never saw. I tried this on
two machines, one with SQL Express and the other with a full version, but I
am not sure exactly which.

In fact, I copied the entire message box below. Please note that I got
essentially the same message on the non-Express version.

Any help appreciated.




TITLE: Microsoft SQL Server Management Studio Express
------------------------------

Attach database failed for Server 'LUSR0594\SQLEXPRESS'.
(Microsoft.SqlServer.Express.Smo)

For help, click:
http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.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)

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

Directory lookup for the file "E:\ADSENTDB_DATA_5.DAT" failed with the
operating system error 21(The device is not ready.). (Microsoft SQL Server,
Error: 5133)

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

------------------------------
BUTTONS:

OK
------------------------------

Middletree
7/21/2006 9:37:04 AM
Follow-up:

I removed the log from the list on the bottom half of the Attach screen,
then made sure the other thing in that list (looking for the mdf) was
pointing to the correct location.

I then got the message below, looking for something on the E drive, which I
don't have on this machine. Not sure where this setting is, so I can tell it
to not look there






TITLE: Microsoft SQL Server Management Studio
------------------------------

Attach database failed for Server 'localhost'. (Microsoft.SqlServer.Smo)

For help, click:
http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.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.ConnectionInfo)

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

Could not open new database 'adsentdb'. CREATE DATABASE is aborted.
File activation failure. The physical file name "E:\ADSENTDB_LOG_5.DAT" may
be incorrect.
The log cannot be rebuilt because the database was not cleanly shut down.
(Microsoft SQL Server, Error: 1813)

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

------------------------------
BUTTONS:

OK
------------------------------

AddThis Social Bookmark Button