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?
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
may be incorrect.
The file exists in the specified location, security is everyone permitted. What can be the cause of this?
check filenames of the Files u gave a filename parameters
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\Taakoverzich t -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?
D:\MSDETest\Taakoverzicht_
D:\MSDETest\Taakoverzicht_
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\Taakoverzich
And I still get the same error:
Msg 5105, Level 16, State 4, Server LAPPIELIEVE\TAAKOVERZICHT,
Device activation error. The physical file name
'D:\MSDETest\Taakoverzicht
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
Melih SARICA
ASKER
1> EXEC sp_attach_db @dbname= N'Taakoverzicht', @filename1 = N'D:\MSDETest\Taako
verzicht_Data.MDF', @filename2 = N'D:\MSDETest\Taakoverzich
2> GO
This is the command being used.