Link to home
Start Free TrialLog in
Avatar of Droezel
Droezel

asked on

MSDE: sp_attach_db gives osql 'device activation error

Hi,

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?
Avatar of Droezel
Droezel

ASKER

FYI,
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.
Avatar of Melih SARICA
check filenames of the Files u gave a filename parameters
Avatar of Droezel

ASKER

These are the filenames, copied right out of explorer:

D:\MSDETest\Taakoverzicht_Data.MDF
D:\MSDETest\Taakoverzicht_Log.ldf

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?

ASKER CERTIFIED SOLUTION
Avatar of rafrancisco
rafrancisco

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Droezel

ASKER

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

Melih SARICA