This article, discusses how you can resolve the error you might get in SQL Server: Operating System Error 170(Requested Resource is in use)
The Root Cause for the Error Message
It might happen at some point, under certain circumstances, to get the “Operating System Error 170” error message on your SQL Server environment.
The above error means that some other process put a lock on a database file (or other related SQL Server files as well, i.e. log files, etc.) and SQL Server cannot access it in order to write in it. This is an unpleasant situation because many times, at a first look, you don’t identify something wrong but the problem persists!
So, what you can do? You have a situation where SQL Server reports as a critical error that it cannot write on one or more of its hosted databases.
You hope that you can resolve this issue fast and without any downtime.
It did happen to me in the past as well, so I would like to share some tips with you, which you might find useful for resolving this issue.
How to Resolve the Requested Resource is in Use Error
Here’s what you can try for resolving the error:
– Check via Windows Resource Monitor – overview – disk activity to see if any database/log files are used by any other activity than SQL Server
– Use Sysinternals “Handle” tool to see if there are any other handles on the file rather than SQL Server itself
– Check if antivirus is using the specific file thus keeping it locked
Example of using Handle.exe:
Hope this helps!
Strengthen your SQL Server Administration Skills – Enroll to our Online Course!
Check our online course on Udemy titled “Essential SQL Server Administration Tips”
(special limited-time discount included in link).Via the course, you will learn essential hands-on SQL Server Administration tips on SQL Server maintenance, security, performance, integration, error handling and more. Many live demonstrations and downloadable resources included!
Featured Online Courses:
- AI Essentials: A Beginner’s Guide to Artificial Intelligence
- SQL Server 2022: What’s New – New and Enhanced Features
- Working with Python on Windows and SQL Server Databases
- Introduction to Azure Database for MySQL
- Boost SQL Server Database Performance with In-Memory OLTP
- Introduction to Azure SQL Database for Beginners
- Essential SQL Server Administration Tips
- SQL Server Fundamentals – SQL Database for Beginners
- Essential SQL Server Development Tips for SQL Developers
- Introduction to Computer Programming for Beginners
- .NET Programming for Beginners – Windows Forms with C#
- SQL Server 2019: What’s New – New and Enhanced Features
- Entity Framework: Getting Started – Complete Beginners Guide
- Data Management for Beginners – Main Principles
- A Guide on How to Start and Monetize a Successful Blog
Read Also:
Here are some other SQL Server troubleshooting articles which you can check out for finding solutions to related technical issues you might encounter:
- An error occurred within the report server database. This may be due to a connection failure, timeout or low disk condition within the database
- A network-related or instance-specific error occurred while establishing a connection to SQL Server
- SQLServerAgent could not be started (reason: Unable to connect to server ‘(local)’; SQLServerAgent cannot start)
- There is no SQL Server Failover Cluster Available to Join
- Resolving the Error Message: Rule “KB2919355 Installation” failed
- …more
Rate this article:
Reference: SQLNetHub (https://www.sqlnethub.com)
© SQLNetHub
Artemakis Artemiou is a seasoned Senior Database and AI/Automation Architect with over 20 years of expertise in the IT industry. As a Certified Database, Cloud, and AI professional, he has been recognized as a thought leader, earning the prestigious Microsoft Data Platform MVP title for nine consecutive years (2009-2018). Driven by a passion for simplifying complex topics, Artemakis shares his expertise through articles, online courses, and speaking engagements. He empowers professionals around the globe to excel in Databases, Cloud, AI, Automation, and Software Development. Committed to innovation and education, Artemakis strives to make technology accessible and impactful for everyone.