Примечание.
Для доступа к этой странице требуется авторизация. Вы можете попробовать войти или изменить каталоги.
Для доступа к этой странице требуется авторизация. Вы можете попробовать изменить каталоги.
Attaches a copied subscription database at the Subscriber.
Пространство имен: Microsoft.SqlServer.Replication
Сборка: Microsoft.SqlServer.Rmo (in microsoft.sqlserver.rmo.dll)
Синтаксис
'Декларация
Public Sub AttachSubscriptionDatabase ( _
databaseName As String, _
fileName As String, _
subscriberSecurity As ConnectionSecurityContext _
)
public void AttachSubscriptionDatabase (
string databaseName,
string fileName,
ConnectionSecurityContext subscriberSecurity
)
public:
void AttachSubscriptionDatabase (
String^ databaseName,
String^ fileName,
ConnectionSecurityContext^ subscriberSecurity
)
public void AttachSubscriptionDatabase (
String databaseName,
String fileName,
ConnectionSecurityContext subscriberSecurity
)
public function AttachSubscriptionDatabase (
databaseName : String,
fileName : String,
subscriberSecurity : ConnectionSecurityContext
)
Параметры
- databaseName
A string value that specifies the name of the database being attached.
- fileName
A string value that specifies the complete path to, and the file name of, the data (.mdf) file being attached.
- subscriberSecurity
A ConnectionSecurityContext that specifies the connection context that is used to establish a connection with the Subscriber.
Исключения
| Тип исключения | Условие |
|---|---|
| ApplicationException | When the Subscriber is not running on SQL Server 2000 or later. |
| ArgumentException | If string parameters are null, contain null characters, or are too long. If the subscriberSecurity parameter is null. |
Замечания
The AttachSubscriptionDatabase method can be called by members of the sysadmin fixed server role.
The AttachSubscriptionDatabase method is equivalent to executing sp_attachsubscription (Transact-SQL).
This property is available with SQL Server 2000 and SQL Server 2005.
This namespace, class, or member is supported only in version 2.0 of the .NET Framework.
Синхронизация потоков
Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Платформы
Платформы разработки
Список поддерживаемых платформ см. в разделе Hardware and Software Requirements for Installing SQL Server 2005.
Целевые платформы
Список поддерживаемых платформ см. в разделе Hardware and Software Requirements for Installing SQL Server 2005.
См. также
Справочник
ReplicationServer Class
ReplicationServer Members
Microsoft.SqlServer.Replication Namespace