{"id":18368,"date":"2019-07-29T12:57:04","date_gmt":"2019-07-29T10:57:04","guid":{"rendered":"https:\/\/www.triangle.es\/?p=18368"},"modified":"2024-05-21T14:27:16","modified_gmt":"2024-05-21T14:27:16","slug":"importance-of-sql-maintenance-for-dynamics-nav","status":"publish","type":"post","link":"https:\/\/triangle.desarrollobirdcom.es\/en\/sin-categorizar\/importance-of-sql-maintenance-for-dynamics-nav\/","title":{"rendered":"Importance of SQL maintenance for Dynamics NAV"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><span style=\"font-weight: 400;\">A database, is the heart of your application, is where all Dynamics data is stored, which can perform several operations with this data, such as showing it to the user, entering new records or modifying them, performing a subsequent statistical analysis, being able to resume business with former clients, offer new products to current clients or start your international expansion.<\/span><\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_85 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/triangle.desarrollobirdcom.es\/en\/sin-categorizar\/importance-of-sql-maintenance-for-dynamics-nav\/#Why_do_I_have_to_do_a_maintenance_on_my_database\" >Why do I have to do a maintenance on my database?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/triangle.desarrollobirdcom.es\/en\/sin-categorizar\/importance-of-sql-maintenance-for-dynamics-nav\/#How_do_I_know_if_my_database_is_well_optimized\" >How do I know if my database is well optimized?<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/triangle.desarrollobirdcom.es\/en\/sin-categorizar\/importance-of-sql-maintenance-for-dynamics-nav\/#The_SQL_server\" >The SQL server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/triangle.desarrollobirdcom.es\/en\/sin-categorizar\/importance-of-sql-maintenance-for-dynamics-nav\/#The_files\" >The files<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/triangle.desarrollobirdcom.es\/en\/sin-categorizar\/importance-of-sql-maintenance-for-dynamics-nav\/#LOG_file\" >LOG file<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/triangle.desarrollobirdcom.es\/en\/sin-categorizar\/importance-of-sql-maintenance-for-dynamics-nav\/#The_maintenance\" >The maintenance<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Why_do_I_have_to_do_a_maintenance_on_my_database\"><\/span><span style=\"font-weight: 400;\">Why do I have to do a maintenance on my database?<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"font-weight: 400;\">All time Dynamics Nav is accessing our database to perform any task related to this information, so it is very important that our database is well maintained and well optimized because it can cause our application to be affected by a poor performance generating waiting times and frustration to users.<\/span><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_do_I_know_if_my_database_is_well_optimized\"><\/span><span style=\"font-weight: 400;\">How do I know if my database is well optimized?<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"font-weight: 400;\">To know if your database is performing well, we must take into account the following aspects.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"The_SQL_server\"><\/span><strong>The SQL server<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"font-weight: 400;\">A point to consider is to have an SQL server with enough CPU and RAM so that our database does not suffer delays in the requests it will receive.<\/span><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"font-weight: 400;\">If you have a configuration that limits the maximum amount of RAM that it can consume to the SQL instance, when all the server memory is consumed it can generate problems and affect the task management of the operating system itself.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"The_files\"><\/span><strong>The files<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"font-weight: 400;\">An SQL database can contain mainly 3 types of files.<\/span><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><span style=\"font-weight: 400;\"> Database file<\/span><\/li>\n\n\n\n<li><span style=\"font-weight: 400;\"> Temporary archive<\/span><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"LOG_file\"><\/span><strong>LOG file<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"font-weight: 400;\">These files must be stored in different disk drives (HDD), because when making queries, modifications or insertions, when reading and writing to different drives, you can manage them faster.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"The_maintenance\"><\/span><strong>The maintenance<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"font-weight: 400;\">When performing SQL maintenance it is very important to periodically check the server consumption, especially at times of the day where many users are working hard.<\/span><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"font-weight: 400;\">A series of controls should also be carried out on the size of the database, in order to estimate how much the database will grow, and thus increase disk space if necessary.<\/span><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"font-weight: 400;\">It is very important to make daily backup copies of your database and log file. These tasks have to be monitored to ensure that you will always have the last copy of the day saved and if possible you should also make a copy on a Cloud storage.<\/span><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"font-weight: 400;\">The log file has to be emptied after copying, this is necessary because the file increases its size significantly during the day and if it is not emptied, we may run out of disk space.<\/span><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>You also may like<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.triangle.es\/en\/working-with-reports-in-dynamics-365-business-central\/\" target=\"_blank\" rel=\"noopener\">Working with Reports in Dynamics 365 Business Central<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.triangle.es\/en\/how-to-manage-gdpr-data-in-dynamics-365-business-central\/\" target=\"_blank\" rel=\"noopener\">How to manage GDPR data in Dynamics 365 Business Central?<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.triangle.es\/en\/how-to-configure-soap-services-in-dynamics-nav\/\" target=\"_blank\" rel=\"noopener\">How to configure soap services in Dynamics NAV?<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>A database, is the heart of your application, is where all Dynamics data is stored, which can perform several operations &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"Importance of SQL maintenance for Dynamics NAV\" class=\"read-more button\" href=\"https:\/\/triangle.desarrollobirdcom.es\/en\/sin-categorizar\/importance-of-sql-maintenance-for-dynamics-nav\/#more-18368\" aria-label=\"Read more about Importance of SQL maintenance for Dynamics NAV\">LEER M\u00c1S<\/a><\/p>\n","protected":false},"author":6,"featured_media":18366,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-18368","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sin-categorizar","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"_links":{"self":[{"href":"https:\/\/triangle.desarrollobirdcom.es\/en\/wp-json\/wp\/v2\/posts\/18368","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/triangle.desarrollobirdcom.es\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/triangle.desarrollobirdcom.es\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/triangle.desarrollobirdcom.es\/en\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/triangle.desarrollobirdcom.es\/en\/wp-json\/wp\/v2\/comments?post=18368"}],"version-history":[{"count":1,"href":"https:\/\/triangle.desarrollobirdcom.es\/en\/wp-json\/wp\/v2\/posts\/18368\/revisions"}],"predecessor-version":[{"id":27088,"href":"https:\/\/triangle.desarrollobirdcom.es\/en\/wp-json\/wp\/v2\/posts\/18368\/revisions\/27088"}],"wp:attachment":[{"href":"https:\/\/triangle.desarrollobirdcom.es\/en\/wp-json\/wp\/v2\/media?parent=18368"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/triangle.desarrollobirdcom.es\/en\/wp-json\/wp\/v2\/categories?post=18368"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/triangle.desarrollobirdcom.es\/en\/wp-json\/wp\/v2\/tags?post=18368"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}