{"id":60,"date":"2014-01-02T22:14:44","date_gmt":"2014-01-02T14:14:44","guid":{"rendered":"http:\/\/suherman.asia\/w2\/?p=60"},"modified":"2014-01-02T22:14:44","modified_gmt":"2014-01-02T14:14:44","slug":"setting-up-database-mirroring-in-sql-server-2008-r2-using-t-sql","status":"publish","type":"post","link":"http:\/\/suherman.asia\/w2\/setting-up-database-mirroring-in-sql-server-2008-r2-using-t-sql.html","title":{"rendered":"Setting up Database Mirroring in SQL Server 2008 R2 using T-SQL"},"content":{"rendered":"<p>beberapa waktu yang lalu saya telah membuat step by step sederhana membuat database mirroring menggunakan Wizard yang telah ada <a href=\"http:\/\/mugi.or.id\/blogs\/suherman\/archive\/2011\/06\/25\/simple-step-by-step-database-mirroring.aspx\" target=\"_blank\">disini<\/a>. (jadi blog ini melanjutkan blog sebelumnya).<\/p>\n<p>namun bagaimana jika anda setelah melakukan persiapan seperti <a href=\"http:\/\/mugi.or.id\/blogs\/suherman\/archive\/2011\/06\/25\/simple-step-by-step-database-mirroring.aspx\" target=\"_blank\">disini<\/a> kemudian hendak membuat database mirroringnya dengan menggunakan T-SQL ? berikut langkah2nya :<\/p>\n<p>Misalkan kita telah menyiapkan <strong>3 buah instances<\/strong> yang terletak di 2 buah server yg berbeda (<strong>ASET-1<\/strong> dan <strong>SUHERMAN-PC<\/strong>).<\/p>\n<p>Principal&nbsp; Server Instance saya terletak pada instance <strong>ASET-1\\SS2008R2<\/strong>,&nbsp; Mirror Server Instance saya terletak pada instance <strong>SUHERMAN-PC\\MIRRORSERVER<\/strong>, dan Witness Server instance saya terletak pada instance <strong>SUHERMAN-PC\\SQLEXPRESS<\/strong>.<\/p>\n<p><a href=\"http:\/\/mugi.or.id\/cfs-file.ashx\/__key\/CommunityServer.Blogs.Components.WeblogFiles\/suherman\/image_5F00_2ADB74AC.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"http:\/\/mugi.or.id\/cfs-file.ashx\/__key\/CommunityServer.Blogs.Components.WeblogFiles\/suherman\/image_5F00_thumb_5F00_4A8A4E74.png\" width=\"259\" height=\"108\"><\/a><\/p>\n<p>Langkah selanjutnya adalah membuat Endpoint Mirroring di setiap server instances.<\/p>\n<p>Buat endpoint database mirroring pada Principal Server Instance (ASET-1\\SS2008R2) dengan menggunakan T-SQL berikut :<\/p>\n<div id=\"codeSnippetWrapper\">\n<div id=\"codeSnippet\" style=\"border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4\">\n<pre style=\"border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white\"><span style=\"color: #0000ff\">CREATE<\/span> ENDPOINT endpoint_mirroring<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4\">    <span style=\"color: #0000ff\">STATE<\/span> = STARTED<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white\">    <span style=\"color: #0000ff\">AS<\/span> TCP ( LISTENER_PORT = 7022 )<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4\">    <span style=\"color: #0000ff\">FOR<\/span> DATABASE_MIRRORING (<span style=\"color: #0000ff\">ROLE<\/span>=PARTNER);<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white\">GO<\/pre>\n<p><!--CRLF--><\/div>\n<p>Buat endpoint database mirroring pada Mirror Server Instance (SUHERMAN-PC\\MIRRORSERVER) dengan menggunakan T-SQL berikut :<\/p><\/div>\n<div id=\"codeSnippetWrapper\">\n<div id=\"codeSnippet\" style=\"border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4\">\n<pre style=\"border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white\"><span style=\"color: #0000ff\">CREATE<\/span> ENDPOINT endpoint_mirroring<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4\">    <span style=\"color: #0000ff\">STATE<\/span> = STARTED<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white\">    <span style=\"color: #0000ff\">AS<\/span> TCP ( LISTENER_PORT = 7022 )<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4\">    <span style=\"color: #0000ff\">FOR<\/span> DATABASE_MIRRORING (<span style=\"color: #0000ff\">ROLE<\/span>=PARTNER);<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white\">GO<\/pre>\n<p><!--CRLF--><\/div>\n<p>Buat endpoint database mirroring pada Witness Server Instance (SUHERMAN-PC\\SQLEXPRESS) dengan menggunakan T-SQL berikut :<\/p><\/div>\n<div id=\"codeSnippetWrapper\">\n<div id=\"codeSnippet\" style=\"border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4\">\n<pre style=\"border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white\"><span style=\"color: #0000ff\">CREATE<\/span> ENDPOINT endpoint_mirroring<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4\">    <span style=\"color: #0000ff\">STATE<\/span> = STARTED<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white\">    <span style=\"color: #0000ff\">AS<\/span> TCP ( LISTENER_PORT = 7025 )<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4\">    <span style=\"color: #0000ff\">FOR<\/span> DATABASE_MIRRORING (<span style=\"color: #0000ff\">ROLE<\/span>=WITNESS);<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white\">GO<\/pre>\n<p><!--CRLF--><\/div>\n<\/div>\n<div>Kemudian, pada Mirror Server Instance, jalankan T-SQL Berikut :<\/div>\n<div id=\"codeSnippetWrapper\">\n<div id=\"codeSnippet\" style=\"border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4\">\n<pre style=\"border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white\"><span style=\"color: #0000ff\">USE<\/span> MASTER<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4\"><span style=\"color: #0000ff\">GO<\/span><\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white\">&nbsp;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4\"><span style=\"color: #0000ff\">ALTER<\/span> <span style=\"color: #0000ff\">DATABASE<\/span> ADVENTUREWORKS <\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white\"><span style=\"color: #0000ff\">SET<\/span> PARTNER = <span style=\"color: #006080\">'TCP:\/\/ASET-1.SOMEDOMAIN.COM:7022'<\/span>;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4\">GO<\/pre>\n<p><!--CRLF--><\/div>\n<\/div>\n<div>kemudian pada Principal Server Instance, jalankan T-SQL berikut :<\/div>\n<div id=\"codeSnippetWrapper\">\n<div id=\"codeSnippet\" style=\"border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4\">\n<pre style=\"border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white\"><span style=\"color: #0000ff\">USE<\/span> MASTER<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4\"><span style=\"color: #0000ff\">GO<\/span><\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white\">&nbsp;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4\"><span style=\"color: #0000ff\">ALTER<\/span> <span style=\"color: #0000ff\">DATABASE<\/span> ADVENTUREWORKS <\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white\"><span style=\"color: #0000ff\">SET<\/span> PARTNER = <span style=\"color: #006080\">'TCP:\/\/SUHERMAN-PC.SOMEDOMAIN.COM:7022'<\/span>;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4\"><span style=\"color: #0000ff\">GO<\/span><\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white\">&nbsp;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4\"><span style=\"color: #0000ff\">ALTER<\/span> <span style=\"color: #0000ff\">DATABASE<\/span> ADVENTUREWORKS <\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white\"><span style=\"color: #0000ff\">SET<\/span> WITNESS = <span style=\"color: #006080\">'TCP:\/\/SUHERMAN-PC.SOMEDOMAIN.COM:7025'<\/span>;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4\">GO<\/pre>\n<p><!--CRLF--><\/div>\n<\/div>\n<p>Sampai disini, Database Mirroring langsung berjalan.<\/p>\n<p><a href=\"http:\/\/mugi.or.id\/cfs-file.ashx\/__key\/CommunityServer.Blogs.Components.WeblogFiles\/suherman\/image_5F00_2A030EC2.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"http:\/\/mugi.or.id\/cfs-file.ashx\/__key\/CommunityServer.Blogs.Components.WeblogFiles\/suherman\/image_5F00_thumb_5F00_14392665.png\" width=\"341\" height=\"396\"><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Semoga bermanfaat.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>beberapa waktu yang lalu saya telah membuat step by step sederhana membuat database mirroring menggunakan Wizard yang telah ada disini. (jadi blog ini melanjutkan blog sebelumnya). namun bagaimana jika anda setelah melakukan persiapan seperti disini kemudian hendak membuat database mirroringnya dengan menggunakan T-SQL ? berikut langkah2nya : Misalkan kita telah \u2026<\/p>\n<p class=\"continue-reading-button\"> <a class=\"continue-reading-link\" href=\"http:\/\/suherman.asia\/w2\/setting-up-database-mirroring-in-sql-server-2008-r2-using-t-sql.html\">Continue reading<i class=\"crycon-right-dir\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[20],"class_list":["post-60","post","type-post","status-publish","format-standard","hentry","category-sql-server","tag-mirroring"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Setting up Database Mirroring in SQL Server 2008 R2 using T-SQL - Suherman Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/suherman.asia\/w2\/setting-up-database-mirroring-in-sql-server-2008-r2-using-t-sql.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Setting up Database Mirroring in SQL Server 2008 R2 using T-SQL - Suherman Blog\" \/>\n<meta property=\"og:description\" content=\"beberapa waktu yang lalu saya telah membuat step by step sederhana membuat database mirroring menggunakan Wizard yang telah ada disini. (jadi blog ini melanjutkan blog sebelumnya). namun bagaimana jika anda setelah melakukan persiapan seperti disini kemudian hendak membuat database mirroringnya dengan menggunakan T-SQL ? berikut langkah2nya : Misalkan kita telah \u2026 Continue reading\" \/>\n<meta property=\"og:url\" content=\"http:\/\/suherman.asia\/w2\/setting-up-database-mirroring-in-sql-server-2008-r2-using-t-sql.html\" \/>\n<meta property=\"og:site_name\" content=\"Suherman Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/emantin34\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/emantin34\" \/>\n<meta property=\"article:published_time\" content=\"2014-01-02T14:14:44+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/mugi.or.id\/cfs-file.ashx\/__key\/CommunityServer.Blogs.Components.WeblogFiles\/suherman\/image_5F00_thumb_5F00_4A8A4E74.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\/\/suherman.asia\/w2\/setting-up-database-mirroring-in-sql-server-2008-r2-using-t-sql.html#article\",\"isPartOf\":{\"@id\":\"http:\/\/suherman.asia\/w2\/setting-up-database-mirroring-in-sql-server-2008-r2-using-t-sql.html\"},\"author\":{\"name\":\"admin\",\"@id\":\"http:\/\/suherman.asia\/w2\/#\/schema\/person\/63654a129ee88012961c1a00415967dc\"},\"headline\":\"Setting up Database Mirroring in SQL Server 2008 R2 using T-SQL\",\"datePublished\":\"2014-01-02T14:14:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/suherman.asia\/w2\/setting-up-database-mirroring-in-sql-server-2008-r2-using-t-sql.html\"},\"wordCount\":181,\"commentCount\":2,\"publisher\":{\"@id\":\"http:\/\/suherman.asia\/w2\/#\/schema\/person\/63654a129ee88012961c1a00415967dc\"},\"image\":{\"@id\":\"http:\/\/suherman.asia\/w2\/setting-up-database-mirroring-in-sql-server-2008-r2-using-t-sql.html#primaryimage\"},\"thumbnailUrl\":\"http:\/\/mugi.or.id\/cfs-file.ashx\/__key\/CommunityServer.Blogs.Components.WeblogFiles\/suherman\/image_5F00_thumb_5F00_4A8A4E74.png\",\"keywords\":[\"Mirroring\"],\"articleSection\":[\"SQL Server\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"http:\/\/suherman.asia\/w2\/setting-up-database-mirroring-in-sql-server-2008-r2-using-t-sql.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/suherman.asia\/w2\/setting-up-database-mirroring-in-sql-server-2008-r2-using-t-sql.html\",\"url\":\"http:\/\/suherman.asia\/w2\/setting-up-database-mirroring-in-sql-server-2008-r2-using-t-sql.html\",\"name\":\"Setting up Database Mirroring in SQL Server 2008 R2 using T-SQL - Suherman Blog\",\"isPartOf\":{\"@id\":\"http:\/\/suherman.asia\/w2\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\/\/suherman.asia\/w2\/setting-up-database-mirroring-in-sql-server-2008-r2-using-t-sql.html#primaryimage\"},\"image\":{\"@id\":\"http:\/\/suherman.asia\/w2\/setting-up-database-mirroring-in-sql-server-2008-r2-using-t-sql.html#primaryimage\"},\"thumbnailUrl\":\"http:\/\/mugi.or.id\/cfs-file.ashx\/__key\/CommunityServer.Blogs.Components.WeblogFiles\/suherman\/image_5F00_thumb_5F00_4A8A4E74.png\",\"datePublished\":\"2014-01-02T14:14:44+00:00\",\"breadcrumb\":{\"@id\":\"http:\/\/suherman.asia\/w2\/setting-up-database-mirroring-in-sql-server-2008-r2-using-t-sql.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/suherman.asia\/w2\/setting-up-database-mirroring-in-sql-server-2008-r2-using-t-sql.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/suherman.asia\/w2\/setting-up-database-mirroring-in-sql-server-2008-r2-using-t-sql.html#primaryimage\",\"url\":\"http:\/\/mugi.or.id\/cfs-file.ashx\/__key\/CommunityServer.Blogs.Components.WeblogFiles\/suherman\/image_5F00_thumb_5F00_4A8A4E74.png\",\"contentUrl\":\"http:\/\/mugi.or.id\/cfs-file.ashx\/__key\/CommunityServer.Blogs.Components.WeblogFiles\/suherman\/image_5F00_thumb_5F00_4A8A4E74.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/suherman.asia\/w2\/setting-up-database-mirroring-in-sql-server-2008-r2-using-t-sql.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\/\/suherman.asia\/w2\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Setting up Database Mirroring in SQL Server 2008 R2 using T-SQL\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/suherman.asia\/w2\/#website\",\"url\":\"http:\/\/suherman.asia\/w2\/\",\"name\":\"Suherman Blog\",\"description\":\"Just Another Geek Site\",\"publisher\":{\"@id\":\"http:\/\/suherman.asia\/w2\/#\/schema\/person\/63654a129ee88012961c1a00415967dc\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/suherman.asia\/w2\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"http:\/\/suherman.asia\/w2\/#\/schema\/person\/63654a129ee88012961c1a00415967dc\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/suherman.asia\/w2\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/eed6f889b4c2af2a8c18cb3bf63de6a4?s=96&d=retro&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/eed6f889b4c2af2a8c18cb3bf63de6a4?s=96&d=retro&r=g\",\"caption\":\"admin\"},\"logo\":{\"@id\":\"http:\/\/suherman.asia\/w2\/#\/schema\/person\/image\/\"},\"sameAs\":[\"http:\/\/suherman.asia\",\"https:\/\/www.facebook.com\/emantin34\",\"https:\/\/x.com\/emantin34\"],\"url\":\"http:\/\/suherman.asia\/w2\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Setting up Database Mirroring in SQL Server 2008 R2 using T-SQL - Suherman Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/suherman.asia\/w2\/setting-up-database-mirroring-in-sql-server-2008-r2-using-t-sql.html","og_locale":"en_US","og_type":"article","og_title":"Setting up Database Mirroring in SQL Server 2008 R2 using T-SQL - Suherman Blog","og_description":"beberapa waktu yang lalu saya telah membuat step by step sederhana membuat database mirroring menggunakan Wizard yang telah ada disini. (jadi blog ini melanjutkan blog sebelumnya). namun bagaimana jika anda setelah melakukan persiapan seperti disini kemudian hendak membuat database mirroringnya dengan menggunakan T-SQL ? berikut langkah2nya : Misalkan kita telah \u2026 Continue reading","og_url":"http:\/\/suherman.asia\/w2\/setting-up-database-mirroring-in-sql-server-2008-r2-using-t-sql.html","og_site_name":"Suherman Blog","article_publisher":"https:\/\/www.facebook.com\/emantin34","article_author":"https:\/\/www.facebook.com\/emantin34","article_published_time":"2014-01-02T14:14:44+00:00","og_image":[{"url":"http:\/\/mugi.or.id\/cfs-file.ashx\/__key\/CommunityServer.Blogs.Components.WeblogFiles\/suherman\/image_5F00_thumb_5F00_4A8A4E74.png","type":"","width":"","height":""}],"author":"admin","twitter_misc":{"Written by":"admin","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/suherman.asia\/w2\/setting-up-database-mirroring-in-sql-server-2008-r2-using-t-sql.html#article","isPartOf":{"@id":"http:\/\/suherman.asia\/w2\/setting-up-database-mirroring-in-sql-server-2008-r2-using-t-sql.html"},"author":{"name":"admin","@id":"http:\/\/suherman.asia\/w2\/#\/schema\/person\/63654a129ee88012961c1a00415967dc"},"headline":"Setting up Database Mirroring in SQL Server 2008 R2 using T-SQL","datePublished":"2014-01-02T14:14:44+00:00","mainEntityOfPage":{"@id":"http:\/\/suherman.asia\/w2\/setting-up-database-mirroring-in-sql-server-2008-r2-using-t-sql.html"},"wordCount":181,"commentCount":2,"publisher":{"@id":"http:\/\/suherman.asia\/w2\/#\/schema\/person\/63654a129ee88012961c1a00415967dc"},"image":{"@id":"http:\/\/suherman.asia\/w2\/setting-up-database-mirroring-in-sql-server-2008-r2-using-t-sql.html#primaryimage"},"thumbnailUrl":"http:\/\/mugi.or.id\/cfs-file.ashx\/__key\/CommunityServer.Blogs.Components.WeblogFiles\/suherman\/image_5F00_thumb_5F00_4A8A4E74.png","keywords":["Mirroring"],"articleSection":["SQL Server"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["http:\/\/suherman.asia\/w2\/setting-up-database-mirroring-in-sql-server-2008-r2-using-t-sql.html#respond"]}]},{"@type":"WebPage","@id":"http:\/\/suherman.asia\/w2\/setting-up-database-mirroring-in-sql-server-2008-r2-using-t-sql.html","url":"http:\/\/suherman.asia\/w2\/setting-up-database-mirroring-in-sql-server-2008-r2-using-t-sql.html","name":"Setting up Database Mirroring in SQL Server 2008 R2 using T-SQL - Suherman Blog","isPartOf":{"@id":"http:\/\/suherman.asia\/w2\/#website"},"primaryImageOfPage":{"@id":"http:\/\/suherman.asia\/w2\/setting-up-database-mirroring-in-sql-server-2008-r2-using-t-sql.html#primaryimage"},"image":{"@id":"http:\/\/suherman.asia\/w2\/setting-up-database-mirroring-in-sql-server-2008-r2-using-t-sql.html#primaryimage"},"thumbnailUrl":"http:\/\/mugi.or.id\/cfs-file.ashx\/__key\/CommunityServer.Blogs.Components.WeblogFiles\/suherman\/image_5F00_thumb_5F00_4A8A4E74.png","datePublished":"2014-01-02T14:14:44+00:00","breadcrumb":{"@id":"http:\/\/suherman.asia\/w2\/setting-up-database-mirroring-in-sql-server-2008-r2-using-t-sql.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/suherman.asia\/w2\/setting-up-database-mirroring-in-sql-server-2008-r2-using-t-sql.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/suherman.asia\/w2\/setting-up-database-mirroring-in-sql-server-2008-r2-using-t-sql.html#primaryimage","url":"http:\/\/mugi.or.id\/cfs-file.ashx\/__key\/CommunityServer.Blogs.Components.WeblogFiles\/suherman\/image_5F00_thumb_5F00_4A8A4E74.png","contentUrl":"http:\/\/mugi.or.id\/cfs-file.ashx\/__key\/CommunityServer.Blogs.Components.WeblogFiles\/suherman\/image_5F00_thumb_5F00_4A8A4E74.png"},{"@type":"BreadcrumbList","@id":"http:\/\/suherman.asia\/w2\/setting-up-database-mirroring-in-sql-server-2008-r2-using-t-sql.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/suherman.asia\/w2"},{"@type":"ListItem","position":2,"name":"Setting up Database Mirroring in SQL Server 2008 R2 using T-SQL"}]},{"@type":"WebSite","@id":"http:\/\/suherman.asia\/w2\/#website","url":"http:\/\/suherman.asia\/w2\/","name":"Suherman Blog","description":"Just Another Geek Site","publisher":{"@id":"http:\/\/suherman.asia\/w2\/#\/schema\/person\/63654a129ee88012961c1a00415967dc"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/suherman.asia\/w2\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"http:\/\/suherman.asia\/w2\/#\/schema\/person\/63654a129ee88012961c1a00415967dc","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/suherman.asia\/w2\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/eed6f889b4c2af2a8c18cb3bf63de6a4?s=96&d=retro&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/eed6f889b4c2af2a8c18cb3bf63de6a4?s=96&d=retro&r=g","caption":"admin"},"logo":{"@id":"http:\/\/suherman.asia\/w2\/#\/schema\/person\/image\/"},"sameAs":["http:\/\/suherman.asia","https:\/\/www.facebook.com\/emantin34","https:\/\/x.com\/emantin34"],"url":"http:\/\/suherman.asia\/w2\/author\/admin"}]}},"_links":{"self":[{"href":"http:\/\/suherman.asia\/w2\/wp-json\/wp\/v2\/posts\/60","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/suherman.asia\/w2\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/suherman.asia\/w2\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/suherman.asia\/w2\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/suherman.asia\/w2\/wp-json\/wp\/v2\/comments?post=60"}],"version-history":[{"count":1,"href":"http:\/\/suherman.asia\/w2\/wp-json\/wp\/v2\/posts\/60\/revisions"}],"predecessor-version":[{"id":61,"href":"http:\/\/suherman.asia\/w2\/wp-json\/wp\/v2\/posts\/60\/revisions\/61"}],"wp:attachment":[{"href":"http:\/\/suherman.asia\/w2\/wp-json\/wp\/v2\/media?parent=60"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/suherman.asia\/w2\/wp-json\/wp\/v2\/categories?post=60"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/suherman.asia\/w2\/wp-json\/wp\/v2\/tags?post=60"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}