title: Can't Run DBCC CHECKDB on master DB - Azure Files
body: <p>Storing SQL Server database files on new Azure Files share. Cannot run full / comprehensive CHECKDB against these databases - I think this has something to do with user account not having permissions to create snapshots. As a result, I offloaded these checks to an alternate server where I can also test .baks. Everything works fine except for the master db, which registers corruption when you restore it as a user db and run CHECKDB against it (<a href="https://www.itprotoday.com/my-master-database-really-corrupt" rel="nofollow noreferrer">https://www.itprotoday.com/my-master-database-really-corrupt</a>), even though it's not corrupt.</p>
  
  <p><strong>Questions:</strong></p>
  
  <p>1) Has anyone run into the same problem running CHECKDB on SQL db files stored on an Azure Files share? Is there a workaround?</p>
  
  <p>2) What's an alternative to running CHECKDB on master if I cannot run it in PROD? Can I somehow restore master to another SQL instance and check it there?</p>
  
  <p>Error when I execute DBCC CHECKDB (master) in PROD:</p>
  
  <p><em>Msg 5030, Level 16, State 12, Line 4
  The database could not be exclusively locked to perform the operation.
  Msg 7926, Level 16, State 1, Line 4
  Check statement aborted. The database could not be checked as a database snapshot could not be created and the database or table could not be locked. See Books Online for details of when this behavior is expected and what workarounds exist. Also see previous errors for more details.</em></p>
  
  <p>Message when I run DBCC CHECKDB on user db in PROD:</p>
  
  <p><em>DBCC CHECKDB will not check SQL Server catalog or Service Broker consistency because a database snapshot could not be created or because WITH TABLOCK was specified.</em></p>