我這個問題 始終是我試着寫一個腳本,而不是使用wisard
DECLARE @publication AS sysname;
DECLARE @subscriber AS sysname;
DECLARE @subscriptionDB AS sysname;
DECLARE @frequency_type as int;
DECLARE @subscriber_security_mode as int;
DECLARE @subscriber_login AS sysname;
DECLARE @subscriber_password AS sysname;
SET @publication = N'8-9' ;
SET @subscriber =N'APPLI-SERV-EXT';
SET @subscriptionDB = N'89' ;
SET @subscriber_security_mode= 1;
SET @subscriber_login=N'xxx';
SET @subscriber_password=N'xxxx';
--Add a push subscription to a transactional publication.
USE [DBName]
EXEC sp_addsubscription
@publication = @publication,
@subscriber = @subscriber,
@destination_db = @subscriptionDB,
@subscription_type = N'push';
EXEC sp_addpushsubscription_agent
@publication = @publication,
@subscriber = @subscriber,
@subscriber_db = @subscriptionDB,
@[email protected]_security_mode,
@[email protected]_login,
@[email protected]_password,
@frequency_type = @frequency_type,
@job_login = N'xxxx',
@job_password = N'xxx';
GO
當我執行我得到了一個警告「警告:經銷代理的工作是隱式創建並將運行在SQL Server代理的服務帳戶下。「
如果我檢查訂戶,我發現該模式被複制,而不是在表中有一個418行,我有4012和表是空的,除非非空屬性是0 這裏是表的腳本
USE [test]
GO
/****** Object: Table [dbo].[clientEssai] Script Date: 15/09/2015 15:13:44 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[clientEssai](
[client_id] [int] NOT NULL,
[client_name] [varchar](255) NULL,
[contact_name] [varchar](255) NULL,
[tel] [varchar](255) NULL,
[gsm] [varchar](255) NULL,
[email] [varchar](255) NULL,
[adress] [varchar](255) NULL,
[registration_date] [date] NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
PS:我只選擇了一個物品複製是表ClientEssai 出版發行是2008實例 用戶2012 我做一推 和我使用的是同一個帳戶爲代理 是否有特定的配置要做? 謝謝
您能編寫出版物和文章,並將其粘貼到此處嗎?想看看你有什麼選擇。 – Greg
對不起,我不明白如何編寫出版物的腳本? –