469,336 Members | 5,707 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,336 developers. It's quick & easy.

Restore database April CTP 2005 Failed?

The following failed in EM (or whatever it is called now management
studio I think) and I scripted it out and ran it in a query window to
get more info. This works fine in SQL 2000 but not in 2005. I also tried
to 'create' the database first then ran this command below but with the
'force restore over existing database' checked on but this failed also
which is odd as well. Any ideas. This is my very first play with 2005 so
it is not off to a great start although to be fair, i seem to have gor
lucky on the install as it all went OK. BTW, is there a more approriate
newsgroup for this query?

Thanks

RESTORE DATABASE [bob] FROM DISK = N'C:\BigFujiCopies\Bob.bak' WITH
FILE = 1,
MOVE N'bob_Data' TO N'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\bob_Data.MDF',
MOVE N'bob_Log' TO N'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\bob_Log.LDF',
NOUNLOAD, STATS = 10
GO
Msg 5122, Level 16, State 1, Line 1
Directory lookup for the file "c:\Program Files\Microsoft SQL
Server\MSSQL\Data\bob_Data.MDF"
failed with the operating system error 3(error not found).
Msg 3156, Level 16, State 3, Line 1
File 'bob_Data' cannot be restored to 'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\bob_Data.MDF'.
Use WITH MOVE to identify a valid location for the file.
Msg 5122, Level 16, State 1, Line 1
Directory lookup for the file "c:\Program Files\Microsoft SQL
Server\MSSQL\Data\bob_Log.LDF" failed with the operating system error
3(error not found).
Msg 3156, Level 16, State 3, Line 1
File 'bob_Log' cannot be restored to 'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\bob_Log.LDF'. Use WITH MOVE to identify a valid
location for the file.
Msg 3119, Level 16, State 1, Line 1
Problems were identified while planning for the RESTORE statement.
Previous messages provide details.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.

*** Sent via Developersdex http://www.developersdex.com ***
Jul 23 '05 #1
2 7618
Dearie me, if i would just take a closer look at what was stating me in
the face, i might just save myself countless wasted hours and an eggy
coupon. Suffice as to say the error is pretty much right as a database
cannot be restored/created to that location because of a complete lack
of a directory!! The directory structure in 2005 is a litlle differet as
MSSQL now appears under MSSQL.1, so ,he says (hanging head) it should be
'c:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data\bob_Data.MDF'.

and NOT

'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\bob_Data.MDF'.

Worth making a not of (although is there not a case for the restore
command to simply create the directory structure you wish to restore to
on the hoof which would save people having to come of management studio,
make the directory tree up for cases where they want to store data and
log files in odd places?)

*** Sent via Developersdex http://www.developersdex.com ***
Jul 23 '05 #2
DM**@devdex.com (DM**@devdex.com) writes:
Worth making a not of (although is there not a case for the restore
command to simply create the directory structure you wish to restore to
on the hoof which would save people having to come of management studio,
make the directory tree up for cases where they want to store data and
log files in odd places?)


Maybe there is, but the newsgroup to post this to is really
microsoft.private.sqlserver2005.tools.graphical. See
http://go.microsoft.com/fwlink/?linkid=31765 for access information.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Mike | last post: by
6 posts views Thread by SS | last post: by
reply views Thread by mitrofun63 | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.