{"id":6345,"date":"2021-04-29T11:57:07","date_gmt":"2021-04-29T06:27:07","guid":{"rendered":"https:\/\/www.skynats.com\/?p=6345"},"modified":"2024-12-11T17:42:45","modified_gmt":"2024-12-11T12:12:45","slug":"fixing-sql-server-error","status":"publish","type":"post","link":"https:\/\/www.skynats.com\/blog\/fixing-sql-server-error\/","title":{"rendered":"How to fix SQL Server Error 9002"},"content":{"rendered":"\n<p>The SQL Server error used to occur when the SQL transaction log file becomes full or running out of space. Until or unless the log file utilizes the space that available on the desk, this will expand the transaction log file space.<\/p>\n\n\n\n<p>Usually, the file is filled when the SQL server database is online or if in recovery mode.<\/p>\n\n\n\n<p>As a part of&nbsp;our <a href=\"https:\/\/www.skynats.com\/linux-server-management\/\" target=\"_blank\" rel=\"noreferrer noopener\"><span style=\"color:#046995\" class=\"has-inline-color\">server management services<\/span><\/a>, we use to fix SQL server error 9002 on your behalf. For further detailed information, you can contact our technical team support for any assistance<\/p>\n\n\n\n<p><strong>Fixing the error.<\/strong><\/p>\n\n\n\n<p>A typical Error 9002 will look like the one given below:<\/p>\n\n\n\n<p>Follow the steps to fix this error:<\/p>\n\n\n\n<p>Paramount thing is to create a backup and truncate the translation logs<\/p>\n\n\n\n<p>Ensure to make log space to be available.<\/p>\n\n\n\n<p>Try to move the log file toward another disk drive<\/p>\n\n\n\n<p>Expand the log file size<\/p>\n\n\n\n<p>Add another log file on a separate disk<\/p>\n\n\n\n<p>Try to Complete or kill a long-running transaction<\/p>\n\n\n\n<p><strong>Create a backup and truncate the transaction logs<\/strong><\/p>\n\n\n\n<p>If the database is full or bulked with the logged recovery model and without the transaction log is backed up, you need to ensure to take the backup of transaction logs and then allow the database engine to truncate the transaction logs<\/p>\n\n\n\n<p>This will free some space for new transactions.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Make the disk space available<\/strong><\/li>\n<\/ol>\n\n\n\n<p>You can either delete the files or move to some other file on which the transaction file contained.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Move log file to another disk drive<\/strong><\/li>\n<\/ol>\n\n\n\n<p>Try to move the log file to another disk space, if you were not able to make any changes in the available disk space for a drive on which the transaction log file contains.<\/p>\n\n\n\n<p>Ensure to keep these points in mind&nbsp;<\/p>\n\n\n\n<p>Ensure whether the disk space has enough space for new transaction logs<\/p>\n\n\n\n<p>Follow the command to detach the database<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sp_detach_db<\/code><\/pre>\n\n\n\n<p>This action will make the log file unavailable as long as we do not re-attach it.<\/p>\n\n\n\n<p>Executive the following, in order to re-attach the database.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sp_attach_db<\/code><\/pre>\n\n\n\n<p><strong>Increase the log file size.<\/strong><\/p>\n\n\n\n<p>You can increase the file size if it has enough space on the log disk.<\/p>\n\n\n\n<p>In order to increase the log file size, please do follow any of the following.<\/p>\n\n\n\n<p>1. Produce a single growth increment<\/p>\n\n\n\n<p>2. Enable autogrow by the ALTER DATABASE statement<\/p>\n\n\n\n<p><strong>Add or enlarge the log file<\/strong><\/p>\n\n\n\n<p>You can add an extra log file for the database in order to increase the file size space.<\/p>\n\n\n\n<p>Use the ALTER DATABASE ADD LOG FILE to gain the additional log file on a separate disk<\/p>\n\n\n\n<p>&nbsp;Use MODIFY FILE clause of the ALTER DATABASE to enlarge the log file.<\/p>\n\n\n\n<p><strong>Complete or kill a long-running transaction<\/strong><\/p>\n\n\n\n<p><strong>Discovering long-running transactions<\/strong><\/p>\n\n\n\n<p>A very long-running transaction can cause the transaction log to fill.<\/p>\n\n\n\n<p>Use one of the following to check long-running transaction<\/p>\n\n\n\n<p>1.sys.dm_tran_database_transactions<\/p>\n\n\n\n<p>or<\/p>\n\n\n\n<p>2. DBCC OPENTRAN<\/p>\n\n\n\n<p><strong>Kill a transaction<\/strong><\/p>\n\n\n\n<p>It will be better to end the process if it\u2019s taking too long.<\/p>\n\n\n\n<p>We can use the KILL statement for doing this.<\/p>\n\n\n\n<p><strong>Conclusion<\/strong><\/p>\n\n\n\n<p>In brief, you can follow the instruction in order to fix the SQL server error 9002. If need further assistance you can contact our <a href=\"https:\/\/www.skynats.com\/contact-us\/\" target=\"_blank\" rel=\"noreferrer noopener\"><span style=\"color:#026996\" class=\"has-inline-color\">technical support<\/span><\/a> <a href=\"https:\/\/www.skynats.com\/contact-us\/\" target=\"_blank\" rel=\"noreferrer noopener\"><span style=\"color:#026996\" class=\"has-inline-color\">team<\/span><\/a>  to fix the error on your behalf.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The SQL Server error used to occur when the SQL transaction log file becomes full or running out of space. Until or unless the log file utilizes the space that available on the desk, this will expand the transaction log file space. Usually, the file is filled when the SQL server database is online or [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,300,250,257,68],"tags":[496,495],"class_list":["post-6345","post","type-post","status-publish","format-standard","hentry","category-blog","category-database","category-mssql-server","category-mysql","category-server-management","tag-fix-sql-server-error-9002","tag-troubleshoot-sql-error-log-9002"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to fix SQL Server Error 9002 | Skynats<\/title>\n<meta name=\"description\" content=\"The SQL Server error used to occur when the SQL transaction log file becomes full or running out of space. Until or unless the log file\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.skynats.com\/blog\/fixing-sql-server-error\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to fix SQL Server Error 9002\" \/>\n<meta property=\"og:description\" content=\"The SQL Server error used to occur when the SQL transaction log file becomes full or running out of space. Until or unless the log file\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.skynats.com\/blog\/fixing-sql-server-error\/\" \/>\n<meta property=\"og:site_name\" content=\"Server Management Services | Cloud Management | Skynats\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/skynats\" \/>\n<meta property=\"article:published_time\" content=\"2021-04-29T06:27:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-12-11T12:12:45+00:00\" \/>\n<meta name=\"author\" content=\"Nabeela\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@skynatstech\" \/>\n<meta name=\"twitter:site\" content=\"@skynatstech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nabeela\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/fixing-sql-server-error\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/fixing-sql-server-error\\\/\"},\"author\":{\"name\":\"Nabeela\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#\\\/schema\\\/person\\\/2968118a72bea0868796abf1237ab3e0\"},\"headline\":\"How to fix SQL Server Error 9002\",\"datePublished\":\"2021-04-29T06:27:07+00:00\",\"dateModified\":\"2024-12-11T12:12:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/fixing-sql-server-error\\\/\"},\"wordCount\":542,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#organization\"},\"keywords\":[\"fix sql server error 9002\",\"troubleshoot sql error log 9002\"],\"articleSection\":[\"Blog\",\"Database\",\"MSSQL server\",\"MySQL\",\"server management\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.skynats.com\\\/blog\\\/fixing-sql-server-error\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/fixing-sql-server-error\\\/\",\"url\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/fixing-sql-server-error\\\/\",\"name\":\"How to fix SQL Server Error 9002 | Skynats\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#website\"},\"datePublished\":\"2021-04-29T06:27:07+00:00\",\"dateModified\":\"2024-12-11T12:12:45+00:00\",\"description\":\"The SQL Server error used to occur when the SQL transaction log file becomes full or running out of space. Until or unless the log file\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/fixing-sql-server-error\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.skynats.com\\\/blog\\\/fixing-sql-server-error\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/fixing-sql-server-error\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to fix SQL Server Error 9002\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/\",\"name\":\"Server Management Services | Cloud Management | Skynats\",\"description\":\"Server Management and Cloud Management\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#organization\",\"name\":\"Skynats Technologies\",\"url\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/Sknats-Logo-New-whole.png\",\"contentUrl\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/Sknats-Logo-New-whole.png\",\"width\":989,\"height\":367,\"caption\":\"Skynats Technologies\"},\"image\":{\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/skynats\",\"https:\\\/\\\/x.com\\\/skynatstech\",\"https:\\\/\\\/www.instagram.com\\\/skynatstech\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/skynats-technologies\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCvTAjrFJ4_E2MJKwlDHomlg\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#\\\/schema\\\/person\\\/2968118a72bea0868796abf1237ab3e0\",\"name\":\"Nabeela\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/12a999d0e3cd16cf2383c5551b39d00d6ddc2d035a2581ce5d85fce0762d0372?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/12a999d0e3cd16cf2383c5551b39d00d6ddc2d035a2581ce5d85fce0762d0372?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/12a999d0e3cd16cf2383c5551b39d00d6ddc2d035a2581ce5d85fce0762d0372?s=96&d=mm&r=g\",\"caption\":\"Nabeela\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to fix SQL Server Error 9002 | Skynats","description":"The SQL Server error used to occur when the SQL transaction log file becomes full or running out of space. Until or unless the log file","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:\/\/www.skynats.com\/blog\/fixing-sql-server-error\/","og_locale":"en_US","og_type":"article","og_title":"How to fix SQL Server Error 9002","og_description":"The SQL Server error used to occur when the SQL transaction log file becomes full or running out of space. Until or unless the log file","og_url":"https:\/\/www.skynats.com\/blog\/fixing-sql-server-error\/","og_site_name":"Server Management Services | Cloud Management | Skynats","article_publisher":"https:\/\/www.facebook.com\/skynats","article_published_time":"2021-04-29T06:27:07+00:00","article_modified_time":"2024-12-11T12:12:45+00:00","author":"Nabeela","twitter_card":"summary_large_image","twitter_creator":"@skynatstech","twitter_site":"@skynatstech","twitter_misc":{"Written by":"Nabeela","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.skynats.com\/blog\/fixing-sql-server-error\/#article","isPartOf":{"@id":"https:\/\/www.skynats.com\/blog\/fixing-sql-server-error\/"},"author":{"name":"Nabeela","@id":"https:\/\/www.skynats.com\/blog\/#\/schema\/person\/2968118a72bea0868796abf1237ab3e0"},"headline":"How to fix SQL Server Error 9002","datePublished":"2021-04-29T06:27:07+00:00","dateModified":"2024-12-11T12:12:45+00:00","mainEntityOfPage":{"@id":"https:\/\/www.skynats.com\/blog\/fixing-sql-server-error\/"},"wordCount":542,"commentCount":0,"publisher":{"@id":"https:\/\/www.skynats.com\/blog\/#organization"},"keywords":["fix sql server error 9002","troubleshoot sql error log 9002"],"articleSection":["Blog","Database","MSSQL server","MySQL","server management"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.skynats.com\/blog\/fixing-sql-server-error\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.skynats.com\/blog\/fixing-sql-server-error\/","url":"https:\/\/www.skynats.com\/blog\/fixing-sql-server-error\/","name":"How to fix SQL Server Error 9002 | Skynats","isPartOf":{"@id":"https:\/\/www.skynats.com\/blog\/#website"},"datePublished":"2021-04-29T06:27:07+00:00","dateModified":"2024-12-11T12:12:45+00:00","description":"The SQL Server error used to occur when the SQL transaction log file becomes full or running out of space. Until or unless the log file","breadcrumb":{"@id":"https:\/\/www.skynats.com\/blog\/fixing-sql-server-error\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.skynats.com\/blog\/fixing-sql-server-error\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.skynats.com\/blog\/fixing-sql-server-error\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.skynats.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to fix SQL Server Error 9002"}]},{"@type":"WebSite","@id":"https:\/\/www.skynats.com\/blog\/#website","url":"https:\/\/www.skynats.com\/blog\/","name":"Server Management Services | Cloud Management | Skynats","description":"Server Management and Cloud Management","publisher":{"@id":"https:\/\/www.skynats.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.skynats.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.skynats.com\/blog\/#organization","name":"Skynats Technologies","url":"https:\/\/www.skynats.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.skynats.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2021\/08\/Sknats-Logo-New-whole.png","contentUrl":"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2021\/08\/Sknats-Logo-New-whole.png","width":989,"height":367,"caption":"Skynats Technologies"},"image":{"@id":"https:\/\/www.skynats.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/skynats","https:\/\/x.com\/skynatstech","https:\/\/www.instagram.com\/skynatstech\/","https:\/\/www.linkedin.com\/company\/skynats-technologies","https:\/\/www.youtube.com\/channel\/UCvTAjrFJ4_E2MJKwlDHomlg"]},{"@type":"Person","@id":"https:\/\/www.skynats.com\/blog\/#\/schema\/person\/2968118a72bea0868796abf1237ab3e0","name":"Nabeela","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/12a999d0e3cd16cf2383c5551b39d00d6ddc2d035a2581ce5d85fce0762d0372?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/12a999d0e3cd16cf2383c5551b39d00d6ddc2d035a2581ce5d85fce0762d0372?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/12a999d0e3cd16cf2383c5551b39d00d6ddc2d035a2581ce5d85fce0762d0372?s=96&d=mm&r=g","caption":"Nabeela"}}]}},"_links":{"self":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/6345","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/comments?post=6345"}],"version-history":[{"count":0,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/6345\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/media?parent=6345"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/categories?post=6345"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/tags?post=6345"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}