{"id":3176,"date":"2019-03-25T17:43:03","date_gmt":"2019-03-25T20:43:03","guid":{"rendered":"http:\/\/xexeu.elipse.com.br\/pt\/library-for-identifying-the-status-of-hotstandby-servers\/"},"modified":"2019-07-05T17:20:34","modified_gmt":"2019-07-05T20:20:34","slug":"library-for-identifying-the-status-of-hotstandby-servers","status":"publish","type":"post","link":"https:\/\/kb.elipse.com.br\/en\/library-for-identifying-the-status-of-hotstandby-servers\/","title":{"rendered":"Library for identifying the status of Hot-Standby servers."},"content":{"rendered":"<div align=\"justify\">\n<p>This library can be used in applications with two servers (Hot-Standby) to identify on screen each server&#8217;s status.<\/p>\n<p><b>Operation:<\/b><\/p>\n<p>The active server is detected by a script in the <i>Constructor <\/i>event of HotStandbyStatus XObject.<\/p>\n<p><span style=\"font-family: Courier New;\">Set WshNetwork = CreateObject(&#8220;WScript.Network&#8221;)<br \/>\nActiveServer = WshNetwork.ComputerName<\/span><\/p>\n<p>The logic for detecting the other server&#8217;s status is based on the synchronism between each server&#8217;s databases. To activate this resource, <i>EnableSynchronization <\/i>property must be enabled.<\/p>\n<p>In a nutshell, the library records data every 5 seconds in a table in the local database and queries the equivalent table in the other server to check its synchronization. According to this Query&#8217;s result, the other server&#8217;s status is defined:<\/p>\n<ul>\n<li>If it doesn&#8217;t return any data, the server has failed (turned off or out of the network).<\/li>\n<li>If it returns an &#8216;old&#8217; record, the server is in maintenance (disabled).<\/li>\n<li>If it returns a current record (considering the delay time to perform the synchronism), the server is running (standby).<\/li>\n<\/ul>\n<p><b>NOTE<\/b>: the library only works with an SQL Server (or SQL Server Express), which must be previously installed and configured in both servers.<\/p>\n<p><b><br \/>\nSettings:<\/b><\/p>\n<p>Before setting up the library, insert two Databases in the application: one to record locally (DB1), and another one to allow querying the back-up server (DB2).<\/p>\n<p>To use the library, insert a <b>HotStandbyStatus <\/b>object into the database, and set these properties as follows:<\/p>\n<ul>\n<li><i><b>DBLocal<\/b><\/i>: link it to the local Database<\/li>\n<li><i><b>DBStandby<\/b><\/i>: link it to the back-up Database<\/li>\n<li><i><b>ServerName1<\/b><\/i>: type Server 1&#8217;s name<\/li>\n<li><i><b>ServarName2<\/b><\/i>: type Server 2&#8217;s name<\/li>\n<li><i><b>OldRecordTime<\/b><\/i>: time (in seconds) before the record&#8217;s timestamp is deemed &#8216;old&#8217;<\/li>\n<\/ul>\n<p>Then, insert <b>HotStandbyViewer <\/b>object onto screen and link Source property to the <b>HotStandbyStatus <\/b>object that was previously configured.<\/p>\n<p><b>Notes:<\/b><\/p>\n<ul>\n<li>The back-up server status can take some seconds to be updated, because it depends on how long the Query takes to be completed.<\/li>\n<li>You will need to invert the Databases&#8217; settings in the secondary server. That is, in the secondary server, the DB1 object must connect to the secondary server&#8217;s database and the DB2 object must connect to the main server&#8217;s database.<\/li>\n<\/ul>\n<p>The figures below show you how to set up the database objects in the secondary server.<\/p>\n<div align=\"center\">\n<p><img loading=\"lazy\" title=\"\" src=\"http:\/\/kb.elipse.com.br\/pt-br\/images\/ID4861\/image1.png\" alt=\"\" width=\"465\" height=\"527\" align=\"Baseline\" border=\"0\" \/><\/p>\n<p><img loading=\"lazy\" title=\"\" src=\"http:\/\/kb.elipse.com.br\/pt-br\/images\/ID4861\/image2.png\" alt=\"\" width=\"465\" height=\"527\" align=\"Baseline\" border=\"0\" \/><\/p>\n<\/div>\n<p>Attached to this article are both the library and a demo application.<\/p>\n<h3>Attachments:<\/h3>\n<p><a href=\"\/wp-content\/uploads\/2019\/03\/ServerStatusEN.zip\">ServerStatusEN.zip<\/a><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>This library can be used in applications with two servers (Hot-Standby) to identify on screen each server&#8217;s status. Operation: The active server is detected by a script in the Constructor&hellip;<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0},"categories":[737],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Library for identifying the status of Hot-Standby servers. - Elipse Knowledgebase<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/kb.elipse.com.br\/en\/library-for-identifying-the-status-of-hotstandby-servers\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Library for identifying the status of Hot-Standby servers.\" \/>\n<meta property=\"og:description\" content=\"This library can be used in applications with two servers (Hot-Standby) to identify on screen each server&#8217;s status. Operation: The active server is detected by a script in the Constructor&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kb.elipse.com.br\/en\/library-for-identifying-the-status-of-hotstandby-servers\/\" \/>\n<meta property=\"og:site_name\" content=\"Elipse Knowledgebase\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/www.facebook.com\/elipsesoftware\" \/>\n<meta property=\"article:published_time\" content=\"2019-03-25T20:43:03+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-07-05T20:20:34+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/kb.elipse.com.br\/pt-br\/images\/ID4861\/image1.png\" \/>\n<meta name=\"author\" content=\"Paulo Gustavo S\u00fcffert\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Paulo Gustavo S\u00fcffert\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/library-for-identifying-the-status-of-hotstandby-servers\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/library-for-identifying-the-status-of-hotstandby-servers\/\"},\"author\":{\"name\":\"Paulo Gustavo S\u00fcffert\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/8517ae12d1613d5a70f61b30399b5090\"},\"headline\":\"Library for identifying the status of Hot-Standby servers.\",\"datePublished\":\"2019-03-25T20:43:03+00:00\",\"dateModified\":\"2019-07-05T20:20:34+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/library-for-identifying-the-status-of-hotstandby-servers\/\"},\"wordCount\":759,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#organization\"},\"articleSection\":[\"Domain \/ E3Server \/ HotStandBy\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/kb.elipse.com.br\/en\/library-for-identifying-the-status-of-hotstandby-servers\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/library-for-identifying-the-status-of-hotstandby-servers\/\",\"url\":\"https:\/\/kb.elipse.com.br\/en\/library-for-identifying-the-status-of-hotstandby-servers\/\",\"name\":\"[:pt]Library for identifying the status of Hot-Standby servers.[:en]Library for identifying the status of Hot-Standby servers.[:] - Elipse Knowledgebase\",\"isPartOf\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#website\"},\"datePublished\":\"2019-03-25T20:43:03+00:00\",\"dateModified\":\"2019-07-05T20:20:34+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/library-for-identifying-the-status-of-hotstandby-servers\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/kb.elipse.com.br\/en\/library-for-identifying-the-status-of-hotstandby-servers\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/library-for-identifying-the-status-of-hotstandby-servers\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"In\u00edcio\",\"item\":\"https:\/\/kb.elipse.com.br\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Library for identifying the status of Hot-Standby servers.\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/kb.elipse.com.br\/#website\",\"url\":\"https:\/\/kb.elipse.com.br\/\",\"name\":\"Elipse Knowledgebase\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/kb.elipse.com.br\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/kb.elipse.com.br\/#organization\",\"name\":\"Elipse Software\",\"url\":\"https:\/\/kb.elipse.com.br\/\",\"sameAs\":[\"http:\/\/www.facebook.com\/elipsesoftware\"],\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png\",\"contentUrl\":\"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png\",\"width\":161,\"height\":58,\"caption\":\"Elipse Software\"},\"image\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/8517ae12d1613d5a70f61b30399b5090\",\"name\":\"Paulo Gustavo S\u00fcffert\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ce04e818ef4126e9cba08720cfcfbf2a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ce04e818ef4126e9cba08720cfcfbf2a?s=96&d=mm&r=g\",\"caption\":\"Paulo Gustavo S\u00fcffert\"},\"url\":\"https:\/\/kb.elipse.com.br\/en\/author\/pgustavo\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Library for identifying the status of Hot-Standby servers. - Elipse Knowledgebase","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":"https:\/\/kb.elipse.com.br\/en\/library-for-identifying-the-status-of-hotstandby-servers\/","og_locale":"en_US","og_type":"article","og_title":"[:pt]Library for identifying the status of Hot-Standby servers.[:en]Library for identifying the status of Hot-Standby servers.[:] - Elipse Knowledgebase","og_description":"This library can be used in applications with two servers (Hot-Standby) to identify on screen each server&#8217;s status. Operation: The active server is detected by a script in the Constructor&hellip;","og_url":"https:\/\/kb.elipse.com.br\/en\/library-for-identifying-the-status-of-hotstandby-servers\/","og_site_name":"Elipse Knowledgebase","article_publisher":"http:\/\/www.facebook.com\/elipsesoftware","article_published_time":"2019-03-25T20:43:03+00:00","article_modified_time":"2019-07-05T20:20:34+00:00","og_image":[{"url":"http:\/\/kb.elipse.com.br\/pt-br\/images\/ID4861\/image1.png"}],"author":"Paulo Gustavo S\u00fcffert","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Paulo Gustavo S\u00fcffert","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kb.elipse.com.br\/en\/library-for-identifying-the-status-of-hotstandby-servers\/#article","isPartOf":{"@id":"https:\/\/kb.elipse.com.br\/en\/library-for-identifying-the-status-of-hotstandby-servers\/"},"author":{"name":"Paulo Gustavo S\u00fcffert","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/8517ae12d1613d5a70f61b30399b5090"},"headline":"Library for identifying the status of Hot-Standby servers.","datePublished":"2019-03-25T20:43:03+00:00","dateModified":"2019-07-05T20:20:34+00:00","mainEntityOfPage":{"@id":"https:\/\/kb.elipse.com.br\/en\/library-for-identifying-the-status-of-hotstandby-servers\/"},"wordCount":759,"commentCount":0,"publisher":{"@id":"https:\/\/kb.elipse.com.br\/#organization"},"articleSection":["Domain \/ E3Server \/ HotStandBy"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/kb.elipse.com.br\/en\/library-for-identifying-the-status-of-hotstandby-servers\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/kb.elipse.com.br\/en\/library-for-identifying-the-status-of-hotstandby-servers\/","url":"https:\/\/kb.elipse.com.br\/en\/library-for-identifying-the-status-of-hotstandby-servers\/","name":"[:pt]Library for identifying the status of Hot-Standby servers.[:en]Library for identifying the status of Hot-Standby servers.[:] - Elipse Knowledgebase","isPartOf":{"@id":"https:\/\/kb.elipse.com.br\/#website"},"datePublished":"2019-03-25T20:43:03+00:00","dateModified":"2019-07-05T20:20:34+00:00","breadcrumb":{"@id":"https:\/\/kb.elipse.com.br\/en\/library-for-identifying-the-status-of-hotstandby-servers\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kb.elipse.com.br\/en\/library-for-identifying-the-status-of-hotstandby-servers\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/kb.elipse.com.br\/en\/library-for-identifying-the-status-of-hotstandby-servers\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"In\u00edcio","item":"https:\/\/kb.elipse.com.br\/en\/"},{"@type":"ListItem","position":2,"name":"Library for identifying the status of Hot-Standby servers."}]},{"@type":"WebSite","@id":"https:\/\/kb.elipse.com.br\/#website","url":"https:\/\/kb.elipse.com.br\/","name":"Elipse Knowledgebase","description":"","publisher":{"@id":"https:\/\/kb.elipse.com.br\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kb.elipse.com.br\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/kb.elipse.com.br\/#organization","name":"Elipse Software","url":"https:\/\/kb.elipse.com.br\/","sameAs":["http:\/\/www.facebook.com\/elipsesoftware"],"logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/","url":"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png","contentUrl":"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png","width":161,"height":58,"caption":"Elipse Software"},"image":{"@id":"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/8517ae12d1613d5a70f61b30399b5090","name":"Paulo Gustavo S\u00fcffert","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ce04e818ef4126e9cba08720cfcfbf2a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ce04e818ef4126e9cba08720cfcfbf2a?s=96&d=mm&r=g","caption":"Paulo Gustavo S\u00fcffert"},"url":"https:\/\/kb.elipse.com.br\/en\/author\/pgustavo\/"}]}},"_links":{"self":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/3176"}],"collection":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/comments?post=3176"}],"version-history":[{"count":4,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/3176\/revisions"}],"predecessor-version":[{"id":7743,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/3176\/revisions\/7743"}],"wp:attachment":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/media?parent=3176"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/categories?post=3176"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/tags?post=3176"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}