lunes, 8 de octubre de 2012

FullTextCatalog, RESTORE DATABASE is terminating abnormally


If you execute this sentence to restore database with FullTextCatalog,

RESTORE DATABASE YourDB
  FROM DISK = 'X:\ Backup\ DatabaseBackup.bak
  WITH
    MOVE 'YourDB_data'   TO 'Z:\DATA\YourDB.mdf',
    MOVE 'YourDB _log'   TO 'Z:\DATA\YourDB_log.ldf',
    REPLACE,
    Recovery, 
    STATS = 10
go


If you will have an error like this:

Msg 9953, Level 16, State 1, Line 1
The path 'Z:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\FTData\XXXXX_FullTextCatalog' has invalid attributes. It needs to be a directory. It must not be hidden, read-only, or on a removable drive.
Msg 3156, Level 16, State 50, Line 1
File 'sysft_XXXXX_FullTextCatalog' cannot be restored to 'Z:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\FTData\XXXXX_FullTextCatalog'. 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.

It’s because you’ve to add a move statement in restore sentence for FullTextCatalog.
To ensure that the Database has FullTextCatalog, and what’s his file path, use a sentence like this:

restore filelistonly from disk ='X:\Backup\DatabaseBackup.bak'


It shows the Data Files, Log Files, Full Text Catalog… (Type F is for FullTextCatalog).

Line 3 show FullTextCatalog information, use Logical and Physical Name to complete the move instruction in restore sentence:

RESTORE DATABASE YourDB
  FROM DISK = 'X:\ Backup\ DatabaseBackup.bak
  WITH
    MOVE 'YourDB_data'   TO 'Z:\DATA\YourDB.mdf',
    MOVE 'YourDB_log'   TO 'Z:\DATA\YourDB_log.ldf',
    MOVE 'sysft_FullTextCatalog' to 'Z:\Program
Files\Microsoft SQL
Server\MSSQL.1\MSSQL\FTData\XXXXX_FullTextCatalog',
    REPLACE,
    Recovery, 
    STATS = 10
go



No hay comentarios:

Publicar un comentario