Sqlserver
 sql >> Base de Dados >  >> RDS >> Sqlserver

SQL Server 2005:Anexar banco de dados usando sp_attach_db com catálogo de texto completo


Use CREATE DATABASE ... FOR ATTACH; . Veja o Exemplo H:
USE master;
GO
--Detach the AdventureWorks2008R2 database
sp_detach_db AdventureWorks2008R2;
GO
-- Physically move the full text catalog to the new location.
--Attach the AdventureWorks2008R2 database and specify the new location of the full-text catalog.
CREATE DATABASE AdventureWorks2008R2 ON 
    (FILENAME = 'c:\...\Data\AdventureWorks2008R2_Data.mdf'), 
    (FILENAME = 'c:\...\Data\AdventureWorks2008R2_log.ldf'),
    (FILENAME = 'c:\myFTCatalogs\AdvWksFtCat')
FOR ATTACH;
GO