I'm trying out the new localdb version of express. I like what I see, but I'm having problems restoring existing databases into the localdb instance. Here's my script:
ALTER DATABASE MyDatabase
SET SINGLE_USER WITH
ROLLBACK IMMEDIATE
RESTORE DATABASE MyDatabase
FROM DISK = 'D:\Databases\Backup\MyDatabase_backup_2012_05_13_225810_0645069.bak'
WITH MOVE 'MyDatabase.Data' TO 'D:\Databases\MyDatabase.mdf',
MOVE 'MyDatabase.Log' TO 'D:\Databases\MyDatabase_log.ldf',
REPLACE
ALTER DATABASE MyDatabase SET MULTI_USER
GO
However, the restore fails with the following message:
Processed 8648 pages for database 'MyDatabase', file 'MyDatabase.Data' on file 1.
Processed 2 pages for database 'MyDatabase', file 'MyDatabase.Log' on file 1.
Msg 1853, Level 16, State 1, Line 7
The logical database file 'MyDatabase.Log' cannot be found. Specify the full path for the file.
Msg 3167, Level 16, State 1 ...
Go to the complete details ...