문서를 영문으로 보려면 영문 확인란을 선택하세요. 마우스 포인터를 텍스트 위로 이동시켜 팝업 창에서 영문 텍스트를 표시할 수도 있습니다.
번역
영문

Server.AttachDatabase 메서드 (String, StringCollection, String, AttachOptions)

Attaches an existing database that is made up of one or more files to the instance of SQL Server by using the specified name, data files, and attachment options. 

네임스페이스:  Microsoft.SqlServer.Management.Smo
어셈블리:  Microsoft.SqlServer.Smo(Microsoft.SqlServer.Smo.dll)

public void AttachDatabase(
	string name,
	StringCollection files,
	string owner,
	AttachOptions attachOptions
)

매개 변수

name
유형: System.String
A String value that specifies the name of the database to be attached.
files
유형: System.Collections.Specialized.StringCollection
A StringCollection object value that contains a list database files.
owner
유형: System.String
A String value that specifies the new owner of the database.
attachOptions
유형: Microsoft.SqlServer.Management.Smo.AttachOptions
A AttachOptions object value that contains the attachment options.

The data and transaction log files of a database can be detached and then reattached to the same or another instance of SQL Server. Detaching and attaching a database is useful if you want to change the database to a different instance of SQL Server on the same computer, or if you want to move the database.

Use this overload to specify the owner of the database after it is attached.

커뮤니티 추가 항목

추가
표시: