ReplicationServer.CopySubscriptionDatabase Método
Copies an existing pull subscription database.
Espacio de nombres: Microsoft.SqlServer.Replication
Ensamblado: Microsoft.SqlServer.Rmo (en Microsoft.SqlServer.Rmo.dll)
Sintaxis
'Declaración
Public Sub CopySubscriptionDatabase ( _
databaseName As String, _
fileName As String, _
overwriteExistingFile As Boolean _
)
'Uso
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
)
Parámetros
- databaseName
Tipo: System.String
A string value that specifies the name of a pull subscription database to copy.
- fileName
Tipo: 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
Tipo: 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.
Excepciones
Excepción | Condición |
---|---|
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. |
Comentarios
[!NOTA]
Esta característica se quitará en una versión futura de Microsoft SQL Server. No utilice esta característica en nuevos trabajos de desarrollo y modifique lo antes posible las aplicaciones que actualmente la utilizan.
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.