sql 这会附加先前已分离的数据库。

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sql 这会附加先前已分离的数据库。相关的知识,希望对你有一定的参考价值。

CREATE DATABASE OPW_PWA_DB
      ON (FILENAME = 'G:\MSSQL11.SP2013\MSSQL\Data\OPW_PWA_DB.mdf') 
      FOR ATTACH ;
GO
CREATE DATABASE Profile DB
      ON (FILENAME = 'G:\MSSQL11.SP2013\MSSQL\Data\Profile DB.mdf') 
      FOR ATTACH ;
GO
CREATE DATABASE PWA_Archive_FMS_2010
      ON (FILENAME = 'G:\MSSQL11.SP2013\MSSQL\Data\PWA_Archive_FMS_2010.mdf') 
      FOR ATTACH ;
GO
CREATE DATABASE PWA_Draft_FMS_2010
      ON (FILENAME = 'G:\MSSQL11.SP2013\MSSQL\Data\PWA_Draft_FMS_2010.mdf') 
      FOR ATTACH ;
GO
CREATE DATABASE PWA_FMS
      ON (FILENAME = 'G:\MSSQL11.SP2013\MSSQL\Data\PWA_FMS.mdf') 
      FOR ATTACH ;
GO
CREATE DATABASE PWA_Published_FMS_2010
      ON (FILENAME = 'G:\MSSQL11.SP2013\MSSQL\Data\PWA_Published_FMS_2010.mdf') 
      FOR ATTACH ;
GO
CREATE DATABASE PWA_Reporting_FMS_2010
      ON (FILENAME = 'G:\MSSQL11.SP2013\MSSQL\Data\PWA_Reporting_FMS_2010.mdf') 
      FOR ATTACH ;
GO
CREATE DATABASE SharePoint_AdminContent_272130ef-55f0-43f7-a484-53a69ff1fb72
      ON (FILENAME = 'G:\MSSQL11.SP2013\MSSQL\Data\SharePoint_AdminContent_272130ef-55f0-43f7-a484-53a69ff1fb72.mdf') 
      FOR ATTACH ;
GO
CREATE DATABASE SharePoint_Config
      ON (FILENAME = 'G:\MSSQL11.SP2013\MSSQL\Data\SharePoint_Config.mdf') 
      FOR ATTACH ;
GO
CREATE DATABASE Social DB
      ON (FILENAME = 'G:\MSSQL11.SP2013\MSSQL\Data\Social DB.mdf') 
      FOR ATTACH ;
GO
CREATE DATABASE StateService_172b621a5f794da7a9e6b21c6962c75d
      ON (FILENAME = 'G:\MSSQL11.SP2013\MSSQL\Data\StateService_172b621a5f794da7a9e6b21c6962c75d.mdf') 
      FOR ATTACH ;
GO
CREATE DATABASE Sync DB
      ON (FILENAME = 'G:\MSSQL11.SP2013\MSSQL\Data\Sync DB.mdf') 
      FOR ATTACH ;
GO
CREATE DATABASE WSS_Content_383fd1ce-ae66-41f5-8104-672348e9f33c
      ON (FILENAME = 'G:\MSSQL11.SP2013\MSSQL\Data\WSS_Content_383fd1ce-ae66-41f5-8104-672348e9f33c.mdf') 
      FOR ATTACH ;
GO
CREATE DATABASE WSS_Content_26c2fa03-cc73-4601-800a-9fd2e480ac55
      ON (FILENAME = 'G:\MSSQL11.SP2013\MSSQL\Data\WSS_Content_26c2fa03-cc73-4601-800a-9fd2e480ac55.mdf') 
      FOR ATTACH ;
GO
CREATE DATABASE WSS_Content_38943c58-e329-4228-b6d9-1d9da32392f0
      ON (FILENAME = 'G:\MSSQL11.SP2013\MSSQL\Data\WSS_Content_38943c58-e329-4228-b6d9-1d9da32392f0.mdf') 
      FOR ATTACH ;
GO
CREATE DATABASE WSS_Content_a021fc1d-b44c-4075-894e-66e2f3ca3223
      ON (FILENAME = 'G:\MSSQL11.SP2013\MSSQL\Data\WSS_Content_a021fc1d-b44c-4075-894e-66e2f3ca3223.mdf') 
      FOR ATTACH ;
GO
CREATE DATABASE WSS_Content_FMS_2010
      ON (FILENAME = 'G:\MSSQL11.SP2013\MSSQL\Data\WSS_Content_FMS_2010.mdf') 
      FOR ATTACH ;
GO
CREATE DATABASE WSS_Content_mySite
      ON (FILENAME = 'G:\MSSQL11.SP2013\MSSQL\Data\WSS_Content_mySite.mdf') 
      FOR ATTACH ;
GO
CREATE DATABASE WSS_Content_OPW_Project
      ON (FILENAME = 'G:\MSSQL11.SP2013\MSSQL\Data\WSS_Content_OPW_Project.mdf') 
      FOR ATTACH ;
GO

以上是关于sql 这会附加先前已分离的数据库。的主要内容,如果未能解决你的问题,请参考以下文章

sql server分离及附加数据库

为啥我的SQL Server 2008把数据库分离出来后就附加不进去了呢?

08.SQL Server 基本操作分离(脱机)附加(联机)

SQL Server:如何附加/修复分离/损坏的数据库?

SQL学习之分离与附加数据库

sql server 2008 日志文件删除后怎么附加