????? ??? ?? ?????? ?????? ??? ??????? ?????? ???? ?????? ???????? ????????

?????? ????????? ?????? ?????????
???? ???????: 240867 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

?? ??? ??????

??????

??????? ??????? ???? ?????? ???????? ?? ??? ????? ?? ????? ?????? SQL Server. ??????? ??????? ???? ?????? ???????? ?????? ?? ????? ?????? ???? ???? ???? Microsoft Search. ?? ??? ??????? ????? ??????? ??????? ???? ???? ????? ??????? Microsoft SQL Server. ????? ?? ???? ????? ??????? ?????? SQL ???????? BACKUP ? RESTORE ???? ????? ????????? ???????? ??????? ?????? ???? ??????. ???? ??? ?????? ????????? ?? ??????? ??? ?????? ??????? ??????? ???? ?????? ???? ?????. ????? ?????? Microsoft Windows NT ??? ????? Microsoft Search ?????? ??? ????? ??????? ??????? ???? ??????.

??? ????? ?? ?? ?? ????? ??????? ????? ?????? SQL Server ?? ????? ??? ??????? ???? ???? ??????? ???????? ????? ??????? ??????? ????? ????? ????? ???????? ?? ??????? ??????? ???? ???? ???? ????. ??? ???? ???? ???? ???? ??? ?? ????? ??? ??????? ???? ?? ??????? ??? ???????? ???? ?????? ????? ????? ?????? ???????. ??????? ?? ????? ???????? ??? ???? ??? ??????? ?????? ????? ???? ???? ???? ?? ???? ??????? ?????????. ??? ??? ??????? ??????? ??????? ???? ????? ????????? ?????? ?? ???? ??????? ??????? ??? ????? ?????? ????. ???? ??? ??????? ???? ???? ???.

??? ??????? ????????? ?????? ?? ???????? ???? ????? ????????? ?? ????? ?? ?????, ?? ????? ??? ??????? ?? ??????? ?????? ???? ?????? ???????? ???????? ?? ??? ??????:
  • ??????? SQL Server ???? ???????? ?? ?????.
  • ??? ?? ???? ?????? ???? ?????? ???????? ???????? ??? ???? ????? ????.
  • ??????? ????????? ?????? ???? ?????? ??? ???????? ??? ?????? ??????? ?????? ??????.
  • ???? ????? ?????? ?????? ???? ???? ? ???? ?????? ??? ?? ???? ????? ??? ????? ??? ??? ?? ??? ???????? ???? ???? ??? ????????.
????? ??? ????????? ??? ?????? ??? ?????? ?? Cluster ????????? ???? SQL.

??? ???????? ??????? ??????? ???? ?????? ??????? ?? ???????? ????????. ??????? ?????????? ?? ??????? ??????? ???? ???? ??:

Microsoft SQL Server 7.0 :
\Mssql7\FTDATA

Microsoft SQL Server 2000 :
???? ?????????: Program Files\Microsoft Server\MSSQL\FTDATA SQL
???? ??????: Program Files\Microsoft SQL $ Server\MSSQL instancename\FTDATA

?? ?????? ???? ?????? ??????? ???????? ??? ???????? ??? ???? ?????? ?????? ??????? ??????? ?????? ??? dbid ?? ???? ????? ???????? ???????? ftcatid ??? ????? ?????? ???? ??????:

" yyyyy SQLxxxxx ( dbid ) " ( ftcatid )

?? ftcatid ??? ?????? ?? ????? ???????? ???????.

????? ??? ?????? ?? ???????? ?? ?????? ??? ??? ??????? ???? ????? ????? ????? ???????. ??? ???? ?? ???? ????? ????? ??? ??? ?????? ??????? ???? ????. ?????? ???? ?? ?? ?????? ??? ???????? ??????. ?? ??? ????? ????? ????????? ??????? ??? ?? ??????. ?? ????? ??????? ??????? ?? ??? ???? ?????. ?????? ??? ???? ?? ????????? ??? ????? ????? ????? ????????? ?????????? ???????? ???? ??? ??? ?????? ?????? ???? ??????? ?? ????? ?????Microsoft:
322756 ????? ????? ????? ????????? ?????????? ??????? ?? Windows

?????? ??? ??????? ?????? ???? ?????? ??? ??????? ????? ?? ????

  1. ????? ???? Microsoft Search ??? ??????? ?????. ?? ??? ????? ???? SQL ???? ??? ?????? ???? ?????? ??? ????????. ??? ????? ???? Microsoft Search, ?? ???? ????? ????????? ???? ?????? ????? ?????? ?? ???????? CONTAINS ?? FREETEXT, ?? ?? ?????? ??? ??? ??????? CONTAINSTABLE ?? FREETEXTTABLE ????? ????? ??????. ???????? ??? ???? ?? ???? ????????? ????? ?? ???? ??????, ?? ???? ????? ????? ??????? ?????? ???????:
    ?? ????? ????: Msg 7602 ?? ????? 16, 1? ???? ?? ?? ????-???? 2 Microsoft Search (). ??? ?? ???? ??????? ?? ?????? ??? ??????.
  2. ??????? ??? Microsoft Windows NT ???????? ???? ??????? ??? Exec ????? ????????? ?? ???? ??? ?? ????? ????????? ??????? ??????? ???? ?????? ????????? ? files.The ?? ????????? ???? ?????? ?? ????? ????? ???? ???? ( sysfulltextcatalogs ) ?? ????? ?????? SQL Server.
  3. ????????? ??? ???? ????? ????? ????????? ??????? ??????? ??? ??? ??????? ??????? ???????:
    \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Search\1.0\Indexer\SQLServer\[FT_Catalog_Folder \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Search\1.0\Gathering Manager\Applications\SQLServer\Projects\ [FT_Catalog_Folder] \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Search\1.0\Gather\SQLServer\[FT_Catalog_Folder \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Search\1.0\CatalogNames\SQLServer\[FT_Catalog_Folder \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Search\1.0\Applications\SQLServer\Catalogs\[FT_Catalog_Folder]]]] [FT_Catalog_Folder] ?? ??? ???? ?????? ??????? " SQLxxxxx(dbid)yyyyy(ftcatid) "
    ??????? ???? ???? ?? SQL Server? ????? ??????? ?? InstanceName \SQLServer$ \.
  4. ??????? 2. ?? ??????? ??????? ??????? ?????? ??? ??????? ????? ??????? ???????: (??? ??????? ???? ???????? ???? ???? ??? ??????.)
    ????? ??????? ??????? ???? ???? ?? SQL Server ?? InstanceName \SQLServer$
    \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Search\1.0\Applications\SQLServer\Catalogs \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Search\1.0\CatalogNames\SQLServer \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Search\1.0\Gather\SQLServer \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Search\1.0\Gathering...
    \.

???????? ???????? ???? ???? ??? ??? ?????? ??? ??? ???? ????? ???? ?? ????

  1. ????? ???? Microsoft Search. ?????? ????? ?????? ??????? ??? ??? ?? ????? ????? ??????. ????? ????? ??? ?????? 3.
  2. ?? ???????? ?? ????? ????? ???????? ??? ??? ?????? ???? ??????. ??? ??????? ????? ????????? ???? ?? ?? ???? ????? ???????? (***) ?? ???? ??? ??? ??? ??????? ????.
    ?????? ??? ?? ????? ????? ???????? ???????? ????? sp_attach_db , ???? ?? ????? sp_fulltext_database exec ' ????? ' ????? ??? ????? ????? ???????? ?? ???? ??????.
  3. ?????? dbid ?? ????? ????????? ???????? ???????:
    Use dbname
    go
    select db_id()
    ?????? ??? ??????? ??????? ??????? ???????? ???? ?????? 4. ???????? ???? ??????? ???????? ?????? ??? ?????? 5.
  4. ??????? ??????? ??????? ???? ??? ????????? ????? ????????? ?????????? ???????. ?? ???? ????????? ??????? ??? ????? ??? ??????.
    \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Search\1.0\Indexer\SQLServer\[FT_Catalog_Folder \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Search\1.0\Gathering Manager\Applications\SQLServer\Projects\ [FT_Catalog_Folder] \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Search\1.0\Gather\SQLServer\[FT_Catalog_Folder \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Search\1.0\CatalogNames\SQLServer\[FT_Catalog_Folder \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Search\1.0\Applications\SQLServer\Catalogs\[FT_Catalog_Folder]]]] [FT_Catalog_Folder] ?? ??? ???? ?????? ??????? " SQLxxxxx(dbid)yyyyy(ftcatid) "
    ??????? ???? ???? ?? SQL Server? ????? ??????? ?? InstanceName \SQLServer$ \.
  5. ???????? ???? ??????? ??????? ??? ??????? ??????? ??????? ??????? ???????. ?? ???? ????????? ??????? ??? ????? ??? ??????.
    ????? ??????? ??????? ???? ???? ?? SQL Server ?? InstanceName \SQLServer$
    \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Search\1.0\Applications\SQLServer\Catalogs \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Search\1.0\CatalogNames\SQLServer \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Search\1.0\Gather\SQLServer \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Search\1.0\Gathering...
    \.
  6. ?? ???????? ??????? ??????? ?? ?????? ?????????? ??? ?????? ????????? ???? ??? ????????? ???? ??.
  7. ??? ????? ???? Microsoft Search.
  8. ????? ?? ???? ???? catalogs ???????? ??? ??????? ?? ?????? ???????? Transact-SQL ????? SELECT ?? ??????? ?????? CONTAINS ?? FREETEXT ?? ???? WHERE.

??? ??? ?? ??? ???????? ???? ???? ??? ?????? ??????? ??????? ?? ???????? ??? ??? ????????? ???? ???? ?????? ???? SQL

  1. ????? ??? ?????? ???? ?????? ? ???? ????? ???? ?? ???? ???????? sp_help_fulltext_catalogs ' FT_Catalog_Name '. ??? ?? ???????? ???? ???? ??? ????? ???? ????? ???? ????????? ??????.
  2. ????? ???? Microsoft Search. ????? ?????? 3 ?4 ??? ??? ?? ????? ????? ?????? ?? ??? ?? ??? ?????? ??????? ????? ????? ??? ?????? 5.
  3. ?? ???????? ?? ????? ????? ???????? ??? ??? ?????? ???? ??????. ??? ??????? ????? ????????? ???? ?? ?? ???? ????? ???????? (***) ?? ???? ??? ??? ??? ??????? ????.

    ?????? ??? ?? ????? ????? ???????? ???????? ????? sp_attach_db , ???? ?? ????? sp_fulltext_database exec ' ????? ' ????? ??? ????? ????? ???????? ?? ???? ??????.

    ?????? dbid ?? ????? ????????? ???????? ???????:
    Use dbname
    go
    select db_id()
  4. ??????? ??????? ??????? ???????. ?? ???? ????????? ??????? ??? ????? ??? ??????.
    \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Search\1.0\Indexer\SQLServer\[FT_Catalog_Folder \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Search\1.0\Gathering Manager\Applications\SQLServer\Projects\ [FT_Catalog_Folder] \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Search\1.0\Gather\SQLServer\[FT_Catalog_Folder \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Search\1.0\CatalogNames\SQLServer\[FT_Catalog_Folder \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Search\1.0\Applications\SQLServer\Catalogs\[FT_Catalog_Folder]]]] [FT_Catalog_Folder] ?? ??? ???? ?????? ??????? " SQLxxxxx(dbid)yyyyy(ftcatid) "
    ??????? ???? ???? ?? SQL Server? ????? ??????? ?? InstanceName \SQLServer$ \.
  5. ????? ?? ???? ???? ????? ???? ???? ?????? ???? ??????. ??? ??????? ??????? ???? ?????? ??? ?????? ??????.
  6. ?????? ?????? ??????? ?????? ?????? ??????? ???? ????? ??????? sp_configure ? RECONFIGURE ?? ?????, ? ?? ???? [ database_name ]. ???? ?????? ??? ???? ????? ?? ???? ?????? ????????? ??????? ??? d:\FTData ?????? ???? ?????? ???? ???? dbo.sysfulltextcatalogs.
  7. ??????? ?????? ???????? regfind Windows NT 4.0 Resource Kit ?????? ????? ?????????? HKLM ??????? ????? ??? ??????? ?????? ??? ???? ?????? ???? ?????? (FT_Catalog_Folder) (??? ???? ??????? SQL0000500005):
    \SOFTWARE\Microsoft\Search\1.0\Gather\SQLServer\[FT_Catalog_Folder] \SOFTWARE\Microsoft\Search\1.0\Gathering Manager\Applications\SQLServer\Projects\[FT_Catalog_Folder] \SOFTWARE\Microsoft\Search\1.0\Indexer\SQLServer\[FT_Catalog_Folder]
    ???????? ??? ???? ???? ?? ??????? ?????? ???????? ??????? (" ") ?????? ?????? ??????? ?? ??? ??-p ? ??????-r. ??? ???? ??????::
    -m \\server_2 -p "<Key Name>" <Old_FT_Catalog_Path_and_Folder> -r <New_FT_Catalog_Path_and_Folder>

    ??????: ??????? < ??? ????? > ? <Old_FT_Catalog_Path_and_Folder>, ? <New_FT_Catalog_Path_and_Folder> ?? ????? ????????.
    ??? ???? ??????: -\\server_2 m-p " HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Search\1.0\Indexer\sqlserver$SQL2k\SQL0000500005 " d:\programme\Microsoft $SQL2K\FTDATA\SQL0000500005 Server\MSSQL SQL-r d:\programme\Microsoft SQL Location\SQL0000500005 $SQL2K\FTDATA\New Server\MSSQL

    ?????? ??? ???? ?? ????????? ??? ???? ???? ??? ??????? ???? regfind ???? ??????? ??????? ?? ???? ????? MS-DOS: regfind /?
  8. ????? ????? ???? Microsoft Search.
  9. ????? ?? ???? ???? catalogs ???????? ??? ??????? ?? ?????? ???????? Transact-SQL ????? SELECT ?? ??????? ?????? CONTAINS ?? FREETEXT ?? ???? WHERE.

???? ???????? ???? ???? ??? ?????? ?? SQL Server ??? ??? ???? ????? ???? ?? ????

??? ???? ??????? ??????? ????? ??? ?? ??? ???? ?????? ???? ?????? ???????? ?? ??????? ?????? SQL Server (server_1) ??? ??????? ??? ?????? ???? SQL (server_2). ????? ??? ??????? ???? ????? ?? ?? ???? ????? SQL Server ? ???? ?????? ????? ???????? ??????? ???? ??? ?????. ?????? ???? ?? ??????? ??????? ???? ???? ?? ???? ???? ?? SQL Server ??? ???, ??? ?? ???? ????? ???????? ?????? ????. ???? ?? ?????? ???? server_2 (???? ??? ???? ?????? ???????) ???? ?????? ??????? (???????) ?? server_1.Confirm ?? dbids ??? ?? ?? server_1 ? server_2 ?? ??? ???????. ?????? ???? ???? ????? ??????? ??????? ??? ?????:
Use dbname
go
select db_id()
??? " ????? " dbids ?????? ??? dbid ??????? ??? server_2, ?????? sp_detach_db ? sp_attach_db ???? ???? re-attach ????? ???????? ???????. ??? ???? ??????? ??? ??? ???? ??????, ??? (dbid = 7) TestDB ? PerfDB (dbid = 8) ??? ?? ?? ????? ????????? ? ????? ?? re-attach PerfDB ????? ????????? ?? ????? TestDB . ??? ?????? ?? dbids: dbid ?? TestDB ???? 8 ? 7 ???? dbid ?? PerfDB . ????? ?????? ??????? dbid ?????? ?? ???? dbids ???????? ?????.

????? ??? ???? ???? ?? ??? ????? ???????? ???? ?? ???? ??? ???????? ???? ???? ??? ?? ???? ??? ???? ???? ????? ??? ?? ??? ????? ?????????. ???? " ?????-up ????????? " ?? ôMore ?????? Informationö ?????? ??????? ??????? ???? ????? ??????? ??????? ???? ?????? ?????? ???? ???? ??????? ?????? ??????.
  1. ???? ?? ??? dbid master.dbo.sysdatabases ?????? ????? ????? ???? ?????? ?? ????? ??? ?????.
  2. ??????? ???? [ database_name ]. ??? ????? dbo.sysobjects ?? ???? ???? ????? ??????? ?? ????? ??? ?????. ?????? ??? ???? ?? ????????? ??? ????? ?????? ??? ???? ????? ???? ???? ????? " object_id " ?? ??? SQL Server.
  3. ???? ?? ??? ?????? ???? ?????? ? ???? ????? ???? ?? ???? ?? ????? ??? ????? ???????? sp_help_fulltext_catalogs ' FT_Catalog_Name ' .
  4. ????? ???? Microsoft Search ??? server_1 ? server_2.
  5. ????? ??? ???? ????? ??? server_1 ??? ???? ??????? ?? ???? ??? server_2 ???????.
  6. ??? ?????? ?????? ???? ?????? ???????? ???? ??? ????? ?? ?????? 3 ?? server_1 ??? server_2 ???????? ????? xcopy ?? MS-DOS. ?????? ??? ?? ???? ???? ??????? ??????? ?????? ???? ?????? ???? ?? ???? ?????? ? ??? ?????? ?? ???? ??????? ??????? ?????? ???? ?????? ??????? ?? ?????? ??????. ?? ???? ??? ???? ???????? ?????? ??? server_2 ?? ????? ?????? xcopy /I ??????? /E ???? ???????? ??????. ???????? ???? ??????? ???????? ??? ???? ???????? ???????? ??? server_2.
  7. ????? ??????? DOS ????? /S RMDIR /Q ????? [FT_Catalog_drive / path] ??? server_1 ?????? ?????? ???? ?????? ??? server_1.

    ?????? ??? ??????? ??????? ??????? ???????? ???? ?????? 8. ???????? ???? ??????? ???????? ?????? ??? ?????? 9.
  8. ??????? ??????? ??????? ???? ??????? ???????? ??? ??????? ???????. ?? ???? ????????? ??????? ??? ????? ??? ??????.
    \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Search\1.0\Indexer\SQLServer \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Search\1.0\Gathering Manager\Applications\SQLServer\Projects\ [FT_Catalog_Folder] \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Search\1.0\Gather\SQLServer\[FT_Catalog_Folder \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Search\1.0\CatalogNames\SQLServer\[FT_Catalog_Folder \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Search\1.0\Applications\SQLServer\Catalogs\[FT_Catalog_Folder]]] [FT_Catalog_Folder] [FT_Catalog_Folder] ?? ??? ???? ?????? ??????? " SQLxxxxx(dbid)yyyyy(ftcatid) "
    ??????? ???? ???? ?? SQL Server? ????? ??????? ?? InstanceName \SQLServer$ \.
  9. ???????? ???? ??????? ??????? ??? ??????? ??????? ??????? ??????? ???????. ??? ???? ??? ??? ????? ???? ???? ??????? ??????? ???????? ??? server_2 ??? ????? ??? ??????. ?? ???? ????????? ??????? ??? ????? ??? ??????.
    \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Search\1.0\Applications\SQLServer\Catalogs \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Search\1.0\CatalogNames\SQLServer \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Search\1.0\Gather\SQLServer \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Search\1.0\Gathering Manager\Applications\SQLServer\Projects \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Search\1.0\Indexer\SQLServer
    ?????? ?????????? ???? ??????? ????????? ???? ????:
    SQL Server 7.0 : \Mssql7\FTDATA
    . Microsoft SQL Server 2000 ???? ????????? : \Program Files\Microsoft Server\MSSQL\FTDATA SQL
    ???? ???? SQL Server 2000 : \FTDATA InstanceName $ MSSQL
    ?? ????? ??? ??????? ????????? ?????? ?????? ??????? ??????. ??? ??? ??????? ???? ????? ??????? ??????? ????? ???? ???????? ??? ??? ?????? ?????? ?? ????????? ???? ???? ??? ????? ????????? ??? server_2.
    \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Search\1.0\CatalogNames\SQLServer \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Search\1.0\Indexer\SQLServer
    ????? ??????? ?????? ???????? regfind ??? ?????? ??? ??????? ??????? ?? ????? ?????? ????? ????????? ???? ????.
  10. ??? ????? ???? Microsoft Search ??? ?????.
  11. ????? ?? ???? ???? catalogs ???????? ??? ??????? ?? ?????? ???????? Transact-SQL ????? SELECT ?? ??????? ?????? CONTAINS ?? FREETEXT ?? ???? WHERE.

??????? ????

???????? ????? ???? SQL ?????? ???? ????? ??? ?? " ????? " ???? ?????? ???? ?????? ?? SQL Server 7.0 (server_1) ??? ??????? ??? ?????? SQL Server 7.0 (server_2) ??? ???? ????? ???? ??? ?? ???? ?????? ??? server_2. ????? ?? ??? ????? SQL Server 7.0 ?????? ????? ?? ?? ???? ??? ??????? ????? ??? Windows NT 4.0-??? ???? ??? ?????? ????? ???????? ??????? ??? ????? ??? ???????.

???? ??? ???????, Pubs (dbid = 5)) 645577338 = ????? (????? ???????? ??????? pub_info (???????_????) ?? ???? ???? ????? ?? ??? ??? ?????. ??????? server_2 ?? ??? ???? ?? ????????? ??? ?????? ???????? ???? ???? ? ???? ??????? ?? ???? ??????? ??? ?????? ???????? ???? ???? ? ???? ????? ?? ????.

???? ????? ????? ???? ?? ?????? ????????? ???????? ?????? ?? ???? ????? ?? SQL Server ??? ?????? ????? ?????? sysadmin (?? ????? ?????? ?? " sa "). ???????? ??? ???? ??? ?? ???? ???? ????? ???????? (DBO) ?? ????? ???????? ?????? ??????? ?????? ??????? ?? SQL Server.

????? ???????? ????? ???? SQL ?????? ??? ?????:
use pubs
go
sp_fulltext_service 'clean_up'
go
sp_fulltext_database 'enable'
go

-- Creates and activates the full-text catalog: PubInfo, if it does not exist.
-- Drops, re-creates and activates the full-text catalog: PubInfo, if it does
-- exist.
IF OBJECTPROPERTY ( object_id('pub_info'),
                    'TableHasActiveFulltextIndex') = 1
BEGIN
    print 'Table pub_info is Full-Text Enabled, dropping Full-Text Index
& Catalog...'
    EXEC sp_fulltext_table 'pub_info', 'drop'
    EXEC sp_fulltext_catalog 'PubInfo', 'drop'
    print 'Table pub_info is NOT Full-Text Enabled, creating FT Catalog,
Index & Activating...'
    EXEC sp_fulltext_catalog 'PubInfo', 'create'
    EXEC sp_fulltext_table 'pub_info', 'create', 'PubInfo', 'UPKCL_pubinfo'
    EXEC sp_fulltext_column 'pub_info', 'pub_id', 'add'
    EXEC sp_fulltext_column 'pub_info', 'pr_info', 'add'
    EXEC sp_fulltext_table 'pub_info', 'activate'
END
ELSE IF OBJECTPROPERTY ( object_id('pub_info'),'TableHasActiveFulltextIndex') = 0
BEGIN
    print 'Table pub_info is NOT Full-Text Enabled, creating FT Catalog,
Index & Activating...'
    EXEC sp_fulltext_catalog 'PubInfo', 'create'
    EXEC sp_fulltext_table 'pub_info', 'create', 'PubInfo', 'UPKCL_pubinfo'
    EXEC sp_fulltext_column 'pub_info', 'pub_id', 'add'
    EXEC sp_fulltext_column 'pub_info', 'pr_info', 'add'
    EXEC sp_fulltext_table 'pub_info', 'activate'
END
go -- Confirm Database ID, Object ID, FT Catalog ID and FT folder(default)
   -- location.
select dbid, name from master.dbo.sysdatabases where dbid = DB_ID('pubs')
-- dbid = 5
go
select id, name from pubs.dbo.sysobjects where id = object_id('pub_info') 
go
sp_help_fulltext_catalogs 'PubInfo' 
go
sp_help_fulltext_tables 'PubInfo', 'pub_info' 
go
sp_help_fulltext_columns 'pub_info' 
go
exec master..xp_cmdshell 'dir d:\MSSQL70\FTDATA'
go

--- After full-text is enabled and activated, start full crawl/population
BEGIN
SET NOCOUNT ON
EXEC sp_fulltext_catalog 'PubInfo', 'start_full'
--
--  Wait for crawl to complete
--  NOTE: Forlarger tables, increase the WAITFOR DELAY time appropriately
--
DECLARE @status int, @itemCount int, @keyCount int, @indexSize int
SELECT @status = FullTextCatalogProperty('PubInfo', 'populatestatus')
WHILE (@status <> 0)
BEGIN
  WAITFOR DELAY '00:00:01' -- wait for 1 second before checking FT
                           -- Populatestatus...
  SELECT @status = FullTextCatalogProperty('PubInfo', 'populatestatus')
END
WAITFOR DELAY '00:00:05' -- wait for 5 seconds to receive correct FT Property
                         -- info (add more time for larger tables)...
SET @itemCount = FullTextCatalogProperty('PubInfo', 'itemcount')
SET @keyCount = FullTextCatalogProperty('PubInfo', 'uniquekeycount')
SET @indexSize = FullTextCatalogProperty('PubInfo', 'indexsize')
PRINT 'Nbr. of Rows FT Indexed = ' + CAST((CONVERT(varchar(10), @itemCount)
- 1) as varchar(12)) + char(09) + 'Nbr. of Unique FT Words = '
+  CONVERT(varchar(10), @keyCount) + char(09)
SET NOCOUNT OFF
END
go

-- Confirm FT population, 1 row should be returned (pub_id = 0736). 
SELECT pub_id, pr_info FROM pub_info WHERE CONTAINS(pr_info, 'moon')
go

-- Stop the Microsoft Search service on both servers
exec master..xp_cmdshell 'net stop "Microsoft Search"'
go
????? ???????? ????? ?????? SQL Server ??? ???? SOURCE (server_1):
use pubs
go
-- Map a Drive letter to the destination server.
exec master..xp_cmdshell 'NET USE K: \\server_2\[drive]$'
go
-- Copy the destination server's FT catalog folder and files as a backup.
exec master..xp_cmdshell 'ROBOCOPY K:\MSSQL70\FTDATA\SQL0000500005
K:\MSSQL70\BACKUP\SQL0000500005 /E /NP'
go
-- Remove the destination server's full-text catalog folder and files.
exec master..xp_cmdshell 'RMDIR /S /Q K:\MSSQL70\FTDATA\SQL0000500005'
go
-- Copy the SOURCE full-text catalog folder and files to the destination server's
NEW full-text catalog location.
exec master..xp_cmdshell 'ROBOCOPY D:\MSSQL70\FTDATA\SQL0000500005
K:\FTData\SQL0000500005 /E /NP'
go
-- Restart the Microsoft Search service.
exec master..xp_cmdshell 'net start "Microsoft Search"'
go
-- Remove the mapped drive letter to the destination server, for example
-- K:\.
exec master..xp_cmdshell 'NET USE K: /delete'
go
??? ????? ???????? ????? SQL ?????? ??? ?????? ?????? (server_2):
use master
go
-- Enable system table updates.
sp_configure allow,1
go
reconfigure with override
go

use pubs
go
-- Record full-text catalog information (Note: path = NULL)
select * from sysfulltextcatalogs
go
-- Update the full-text catalog information with the new full-text catalog location
UPDATE sysfulltextcatalogs set path = 'E:\FTData'
   WHERE ftcatid = 5
go
-- Record full-text catalog info. (Note: path = E:\FTData)
select * from sysfulltextcatalogs
go

use master
go
-- Disable system table updates.
sp_configure allow,0
go
reconfigure with override
go

-- CAUTION: Back up your registry hive before you contine!

-- Search and replace HKLM "Gather" registry keys with new full-text catalog
-- folder location [10 row(s) affected]:
exec master..xp_cmdshell 'REGFIND -m \\server_2 -p
\Registry\Machine\SOFTWARE\Microsoft\Search\1.0\Gather\SQLServer\SQL0000500005
"E:\MSSQL70\FTDATA\SQL0000500005" -r "E:\FTData\SQL0000500005"'
go
-- Search and replace HKLM "Gatherer Manager" registry keys with new FT
-- catalog folder location [6 row(s) affected]:
exec master..xp_cmdshell 'REGFIND -m \\server_2 -p
"\Registry\Machine\SOFTWARE\Microsoft\Search\1.0\Gathering
Manager\Applications\SQLServer\Projects\SQL0000500005"
"E:\MSSQL70\FTDATA\SQL0000500005" -r "E:\FTData\SQL0000500005"'
go
-- Search and replace HKLM indexer registry keys with new FT catalog folder
-- location [6 row(s) affected]:
exec master..xp_cmdshell 'REGFIND -m \\server_2 -p
"\Registry\Machine\SOFTWARE\Microsoft\Search\1.0\Indexer\SQLServer\SQL0000500005"
"E:\MSSQL70\FTDATA\SQL0000500005" -r "E:\FTData\SQL0000500005"'
go

-- Restart the Microsoft Search service
exec master..xp_cmdshell 'net start "Microsoft Search"'
go

-- Confirm FT population, 1 row should be returned (pub_id = 0736). 
use pubs
go
SELECT pub_id, pr_info FROM pub_info WHERE CONTAINS(pr_info, 'moon')
go
????? " ????? " ?????? ???? ???? ??? ?????? ?????? ????? ????????? ???????? SQL Server ???????:

??????? ??? ?? ??? ??????? ?? ????? ????? ?????? ???????? ??? ??? ???? ???? ????? ???? ?????, ???? ?? ???? ??? ?????? ???? ?????? ??? ????!
-- Run the following code after starting full crawl/population through another connection.
use pubs
go
BEGIN
SET NOCOUNT ON
EXEC sp_fulltext_catalog 'PubInfo', 'stop'

-- Wait for crawl to stop

--  NOTE: For larger tables, increase the WAITFOR DELAY time appropriately

DECLARE @status int, @itemCount int, @keyCount int, @indexSize int
SELECT @status = FullTextCatalogProperty('PubInfo', 'populatestatus')
WHILE (@status <> 0)
BEGIN
  WAITFOR DELAY '00:00:01' -- wait for 1 second before checking FT
                           -- Populatestatus...
  SELECT @status = FullTextCatalogProperty('PubInfo', 'populatestatus')
END
WAITFOR DELAY '00:00:05' -- wait for 5 seconds to receive correct FT Property
                         -- info (add more time for larger tables)...
SET @itemCount = FullTextCatalogProperty('PubInfo', 'itemcount')
SET @keyCount = FullTextCatalogProperty('PubInfo', 'uniquekeycount')
SET @indexSize = FullTextCatalogProperty('PubInfo', 'indexsize')
PRINT 'Nbr. of Rows FT Indexed = ' + CAST((CONVERT(varchar(10), @itemCount) - 1)
as varchar(12)) + char(09) + 'Nbr. of Unique FT Words = ' +
CONVERT(varchar(10), @keyCount) + char(09)
SET NOCOUNT OFF
END
go
-- Can return: Nbr. of Rows FT Indexed = -1 Nbr. of Unique FT Words = 0 
-- (depending upon when the crawl/population stopped)
??????? clean-up

????? ???????? ????? SQL ?????? ??? ?????:

?? ????? ???? ???? ??????, ???????? ???? ??????, ?????? ????? ?? ???? ???? ?? ????? ?????? pubs :
use pubs
go
sp_fulltext_table 'pub_info', 'drop'
go
sp_fulltext_catalog 'PubInfo', 'drop'
go
sp_fulltext_database 'disable'
go
sp_fulltext_service 'clean_up'
go
-- end SQL Script !

REFERENCES

?????? ??? ???? ?? ????????? ??? ????? ?????? ??? dbid ??????? ?????? ?????? ?? ???? ????? " DB_ID " ?? ??? SQL Server ??? ??????.

?????? ???? ???? ????? ????? ?????? ?? ?? ???? ???? ?????? " DATABASEPROPERTY " ?? " IsFulltextEnabled " ?? ??? SQL Server ??? ??????.

?????? ??? ???? ?? ????????? ??? ftcatid, ???? " sp_help_fulltext_catalogs " ?? " OBJECTPROPERTY " ? ?? " TableFulltextCatalogId " ???????? ?? ??? SQL Server ??? ??????.

???????

???? ???????: 240867 - ????? ??? ??????: 20/?? ??????/1428 - ??????: 6.2
????? ???
  • Microsoft SQL Server 2000 Standard Edition, ????? ?????? ??:
    • Microsoft SQL Server 2000 Developer Edition
    • Microsoft SQL Server 2000 Standard Edition
    • Microsoft SQL Server 2000 Enterprise Edition
  • Microsoft SQL Server 7.0 Standard Edition
????? ??????: 
kbinfo KB240867 KbMtar kbmt
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????. ??? ?? ???? ??? ??????? ????? ?? ???????? ?? ??? ???????? ?????? ????? ????????? ??????? ???? ??? ???????
???? ??? ????? ??????? ?????? ??????????240867

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com