You are here: Re: copy database via tapefile no SQL 2005 « MsSQL Server « IT news, forums, messages
Re: copy database via tapefile no SQL 2005

Posted by Erland Sommarskog on 10/02/89 11:55

Mark (Scollop027@gmx.net) writes:
> if you got a tape file how can you restore the contained database onto a
> newly installed server? I choose Restore Database From Device then I
> choose DB and select same DB in combobox "To Database" but error
> occured:
>
> TITLE: Microsoft SQL Server Management Studio
> Restore failed for Server '...'. (Microsoft.SqlServer.Smo)
> ADDITIONAL INFORMATION:
> System.Data.SqlClient.SqlError: Directory lookup for the file "C:\Program
> Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\KidDatabase.mdf" failed with
> the operating system error 3(error not found). (Microsoft.SqlServer.Smo)
>
> what can I do to handle this problem?

First do

RESTORE FILELISTONLY FROM TAPE = 'tapedevice'

this will give you the logical names of the files of the database. Then
do:

RESTORE DATABASE db FROM TAPE = 'tapedevice' WITH
MOVE 'datafile' TO
C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\KidDatabase.mdf',
MOVE 'logfile' TO
C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\KidDatabase.ldf',
REPLACE

Here I've used the path from your error message. Howver, the error message
indicates that this is a non-existing path, so you may have to examine
where there is place on the server to put the databases.

--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация