
Considerations for Restoring a SQL Server 2005 Full-Text Catalog to SQL Server 2008
One method of upgrading fulltext data from a SQL Server 2005 database to SQL Server 2008 is to restore a full database backup to SQL Server 2008.
While importing a catalog, you can back up and restore the database and the catalog file. The behavior is the same as in SQL Server 2005:
-
The full database backup will include the full-text catalog. To refer to the full-text catalog, use its SQL Server 2005 file name, sysft_+catalog-name.
-
If the full-text catalog is offline, the backup will fail.
For more information about backing up and restoring SQL Server 2005 full-text catalogs, see Backing Up and Restoring Full-Text Catalogs and File Backup and Restore and Full-Text Catalogs in SQL Server 2005 Books Online.
When the database is restored on SQL Server 2008, a new database file will be created for the full-text catalog. The default name of this file is ftrow_catalog-name.ndf. For example, if your catalog-name is cat1, the default name of the SQL Server 2008 database file would be ftrow_cat1.ndf. But if the default name is already being used in the target directory, the new database file would be named ftrow_catalog-name{GUID}.ndf, where GUID is the Globally Unique Identifier of the new file.
After the catalogs have been imported, the sys.database_files and sys.master_files are updated to remove the catalog entries and the path column in sys.fulltext_catalogs is set to NULL.
To back up a database
To restore a database backup
Example
The following example uses the MOVE clause in the RESTORE statement, to restore a SQL Server 2005 database named ftdb1. The SQL Server 2005 database, log, and catalog files are moved to new locations on the SQL Server 2008 server instance, as follows:
-
The database file, ftdb1.mdf, is moved to C:\Program Files\Microsoft SQL Server\MSSQL.1MSSQL10.MSSQLSERVER\MSSQL\DATA\ftdb1.mdf.
-
The log file, ftdb1_log.ldf, is moved to a log directory on your log disk drive, log_drive:\log_directory\ftdb1_log.ldf.
-
The catalog files that correspond to the sysft_cat90 catalog are moved to C:\temp. After the full-text indexes are imported, they will automatically be placed in a database file, C:\ftrow_sysft_cat90.ndf, and the C:\temp will be deleted.
|
RESTORE DATABASE [ftdb1] FROM DISK = N'C:\temp\ftdb1.bak' WITH FILE = 1,
MOVE N'ftdb1' TO N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\ftdb1.mdf',
MOVE N'ftdb1_log' TO N'log_drive:\log_directory\ftdb1_log.ldf',
MOVE N'sysft_cat90' TO N'C:\temp'; |