473,387 Members | 1,534 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 7799
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: jbmccluskey | last post by:
I'm a newbie so please be gentle. In attempting to run a restore I get the following error message: "Exclusive access could not be obtained because the database is in use." However, it doesn't...
1
by: Mike | last post by:
Need some help please. Trying to restore a 7.2 DB from one machine to a newer machine running 8.2. Upon restoring I get: SQL2519N The database was restored, but the restored database was not...
6
by: SS | last post by:
Hi I am trying to restore my database in V8 FP8. The first restore attempt failed(because of an incorrect parameter I defined), so I issued the command again(after correction!!). In version 7 this...
12
by: Ann Marinas | last post by:
Hi all, I would like to ask for some help regarding separating the asp.net webserver and the sql server. I have created an asp.net application for a certain company. Initially, we installed...
10
by: John Bunch | last post by:
I have installed Visual Studio 2005 Team Suite Beta 2, including SQL Server 2005 Express Edition April CTP, on Windows XP Professional SP2, including IIS 5.1. The SQL Server (SQLEXRPESS) service...
5
by: HSP | last post by:
hi. i need to restore an old database. The db was backed up using a DLT drive, using 2 volumes. The content for the tapes was copied to file onto Solaris machine using rsh and dd (for backup...
14
by: blueboy | last post by:
Hi, I am planning to automate a nighty restore of a DB on another server can someone point me in the right direction with the SQL script to modify the logical file names to the correct path and...
0
by: mitrofun63 | last post by:
Hello. On my production site i have DB2 9.1.2 database configured for archiving logs and making backup through TSM Data Protection for DB2 UDB The LOGARCHMETH1 parameter is set to ...
4
by: DL | last post by:
Background Info: Instance A: SQL Server 2005 on Windows Server 2003 OS Instance B: SQL Server 2005 on XP Prof w/ SP2 Process: backup a database on Instance A like this: step 1 -- Management...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.