CopySubscriptionDatabase 메서드
Copies an existing pull subscription database.
네임스페이스: Microsoft.SqlServer.Replication
어셈블리: Microsoft.SqlServer.Rmo(Microsoft.SqlServer.Rmo.dll)
구문
‘선언
Public Sub CopySubscriptionDatabase ( _
databaseName As String, _
fileName As String, _
overwriteExistingFile As Boolean _
)
‘사용 방법
Dim instance As ReplicationServer
Dim databaseName As String
Dim fileName As String
Dim overwriteExistingFile As Boolean
instance.CopySubscriptionDatabase(databaseName, _
fileName, overwriteExistingFile)
public void CopySubscriptionDatabase(
string databaseName,
string fileName,
bool overwriteExistingFile
)
public:
void CopySubscriptionDatabase(
String^ databaseName,
String^ fileName,
bool overwriteExistingFile
)
member CopySubscriptionDatabase :
databaseName:string *
fileName:string *
overwriteExistingFile:bool -> unit
public function CopySubscriptionDatabase(
databaseName : String,
fileName : String,
overwriteExistingFile : boolean
)
매개 변수
- databaseName
유형: System. . :: . .String
A string value that specifies the name of a pull subscription database to copy.
- fileName
유형: System. . :: . .String
A string value that specifies the complete path, including file name, to which a copy of the data portion (.mdf) file is saved.
- overwriteExistingFile
유형: System. . :: . .Boolean
A Boolean value that specifies whether or not to overwrite an existing file of the same name specified in the fileName parameter, if there is one.
예외
예외 | 조건 |
---|---|
ApplicationException | When the server is not running on Microsoft SQL Server 2000 or later. |
ArgumentException | If a parameter is null, contains null characters, or exceeds 128 bytes. |
주의
[!참고]
Microsoft SQL Server의 이후 버전에서는 이 기능이 제거됩니다. 새 개발 작업에서는 이 기능을 사용하지 말고, 현재 이 기능을 사용하는 응용 프로그램은 가능한 한 빨리 수정하십시오.
Only single file databases can be copied.
The CopySubscriptionDatabase method can be called by a member of the db_owner fixed database role of the database that is being copied.
The CopySubscriptionDatabase method is equivalent to the sp_copysubscription(Transact-SQL) stored procedure.
This method is only available with instances of SQL Server 2000 and SQL Server 2005.
This namespace, class, or member is supported only in version 2.0 of the .NET Framework.