Quantcast
Channel: SQL Server High Availability and Disaster Recovery forum
Viewing all articles
Browse latest Browse all 4532

Error on restore a database using sqlcmd

$
0
0

Hi

I wrote a command to to restore a database (from SQL server backup tool) , it works for a few restore files but faild with a specific bak file.

The error:

sqlcmd  -U sa -P password -Q "RESTORE DATABASE TfsWorkItemTracking FROM DISK='x:\tfs\TfsWorkItemTracking.bak' WITH  FILE = 1,
 MOVE N'TfsWorkItemTracking' TO N'D:\SQL_Data\Data\TfsWorkItemTracking.mdf',  MOVE N'TfsWorkItemTracking_log' TO N'L:\SQL_Data\Log\TfsWorkIt
emTracking_log.ldf',  NOUNLOAD,  REPLACE,  STATS = 100"
Msg 3634, Level 16, State 1, Server SRVRND-TFSDB10, Line 1
The operating system returned the error '3(failed to retrieve text for this error. Reason: 15105)' while attempting 'CreateFile' on 'C:\Prog
ram Files\Microsoft SQL Server\MSSQL.1\MSSQL\FTData\TeamFoundationServer10FullTextCatalog\SQL.HDR'.
Msg 3013, Level 16, State 1, Server SRVRND-TFSDB10, Line 1
RESTORE DATABASE is terminating abnormally.

I understood from the error that it is an access error - BUT the path the process try to create the file is not exist at all.

One more issue - when I use the SQL Management consle to restore the database it works propery.

Any idea ?


CM Consultant


Viewing all articles
Browse latest Browse all 4532

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>