{"id":2655,"date":"2013-04-28T00:54:51","date_gmt":"2013-04-28T00:54:51","guid":{"rendered":"http:\/\/enjoyasp.net\/?p=2655"},"modified":"2013-04-28T02:24:16","modified_gmt":"2013-04-28T02:24:16","slug":"%e5%af%b9%e7%ad%89%e5%a4%8d%e5%88%b6%e5%a2%9e%e5%8a%a0article","status":"publish","type":"post","link":"https:\/\/enjoyasp.net\/index.php\/2013\/04\/28\/%e5%af%b9%e7%ad%89%e5%a4%8d%e5%88%b6%e5%a2%9e%e5%8a%a0article\/","title":{"rendered":"\u5bf9\u7b49\u590d\u5236\u589e\u52a0article"},"content":{"rendered":"<pre class=\"brush:sql;first-line:1;pad-line-numbers:true;highlight:null;collapse:false;\">\r\nSET QUOTED_IDENTIFIER ON \r\nGO\r\nSET ANSI_NULLS ON \r\nGO\r\n\r\nif exists (select * from dbo.sysobjects where id = object_id(N&#39;[dbo].[Repl_AddArticlePeer]&#39;) and OBJECTPROPERTY(id, N&#39;IsProcedure&#39;) = 1)\r\ndrop procedure [dbo].[Repl_AddArticlePeer]\r\nGO\r\n\r\n\/*\u5bf9\u7b49\u590d\u5236\u589e\u52a0Article\r\n EXEC Repl_AddArticlePeer &#39;testrepl&#39;\r\n*\/\r\n\r\nCREATE PROCEDURE Repl_AddArticlePeer\r\n@article AS sysname\r\nAS \r\nBEGIN \r\n\tIF ISNULL(@article,&#39;&#39;) = &#39;&#39;\r\n\tBEGIN\r\n\t\tRETURN\r\n\tEND  \r\n\r\n\tDECLARE @publication AS sysname;  \r\n\tSET @publication =DB_NAME(); \r\n\r\n\tDECLARE\r\n        @ins_cmd\tnvarchar (255),\r\n        @del_cmd\tnvarchar (255),\r\n        @upd_cmd\tnvarchar (255) \r\n\r\n\tSET @ins_cmd = &#39;CALL sp_MS&#39; + &#39;ins&#39; + &#39;_dbo&#39; + @article\r\n\tSET @del_cmd = &#39;CALL sp_MS&#39; + &#39;del&#39; + &#39;_dbo&#39; + @article\r\n\tSET @upd_cmd = &#39;CALL sp_MS&#39; + &#39;upd&#39; + &#39;_dbo&#39; + @article\r\n\r\n\tEXEC sp_addarticle @publication = @publication, @article = @article, @source_owner = N&#39;dbo&#39;, \r\n\t@source_object =@article, @type = N&#39;logbased&#39;, @description = null,@creation_script = null,\r\n\t@pre_creation_cmd = N&#39;drop&#39;, @schema_option = 0x0000000008035DDB, @force_invalidate_snapshot = 1, @identityrangemanagementoption = N&#39;manual&#39;, \r\n\t@destination_table = @article, @status = 16,@vertical_partition = N&#39;false&#39;, @ins_cmd = @ins_cmd, @del_cmd = @del_cmd, @upd_cmd = @upd_cmd\r\nEND \r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO if exi [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[],"class_list":["post-2655","post","type-post","status-publish","format-standard","hentry","category-sql-server"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/posts\/2655","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/comments?post=2655"}],"version-history":[{"count":0,"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/posts\/2655\/revisions"}],"wp:attachment":[{"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/media?parent=2655"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/categories?post=2655"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/tags?post=2655"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}