MSDE: sp_attach_db gives osql 'device activation error


I have a properly detached databasefile db.mdf and db.ldf copied to a cliënt computer wich has MSDE installed. When i try to attach this database in MSDE, i get the following error:

Msg 5105, Level 16, State 2, Server PC_LIEVE\TAAKOVERZICHT, Line 1
Device activation error. The physical file name 'D:\MSDETest\Taakoverzicht.MDF'
may be incorrect.

The file exists in the specified location, security is everyone permitted. What can be the cause of this?
Who is Participating?
Can you try this if it will make any difference:

EXEC sp_attach_single_file_db @dbname = N'Taakoverzicht',
   @physname = 'D:\MSDETest\Taakoverzicht_Data.MDF'
DroezelAuthor Commented:
1> EXEC sp_attach_db @dbname= N'Taakoverzicht', @filename1 = N'D:\MSDETest\Taako
verzicht_Data.MDF', @filename2 = N'D:\MSDETest\Taakoverzicht_Log.ldf'
2> GO

This is the command being used.
Melih SARICAOwnerCommented:
check filenames of the Files u gave a filename parameters
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

DroezelAuthor Commented:
These are the filenames, copied right out of explorer:


they are identical (believe me, i checked like 2500 times), permission on the folder = everyone - full control
I also log on using the administrator (sa) account with the following command:

osql -SLAPPIELIEVE\Taakoverzicht -Usa -PTOAdmin

And I still get the same error:
Msg 5105, Level 16, State 4, Server LAPPIELIEVE\TAAKOVERZICHT, Line 1
Device activation error. The physical file name
'D:\MSDETest\Taakoverzicht_Data.MDF' may be incorrect.

I have really no idea what's wrong here.

Is there maybe another way to attach a database from some kind of script or command?

DroezelAuthor Commented:
I found that the problem was that another sql server instance was running. When I stop that server, the attach works
Melih SARICAOwnerCommented:
i guess these databases r being used by other SQL Server Instance.. U ave the same databases on the other Instance..

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.