Why is sqlservr.exe still running when SQL Server 2017 Express has been stopped?












0















I was unable to unlock an MDF file and when I used LockHunter to show who the culprit was, it displayed sqlservr.exe as the process that was locking the file. When I killed it, the lock was released. But I was under the impression that SQL Server 2017 Express service is the process that controls whether a database is in use or not. That is, stopping the SQL Server 2017 Epxress service did not release the lock, but killing sqlservr.exe did. I am confused.



PS: The MDF file was actually attached to using LINQPad, not through SQL Server Management Studio.



I am on a 64 bit Windows 10 system.










share|improve this question
















bumped to the homepage by Community 29 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.




















    0















    I was unable to unlock an MDF file and when I used LockHunter to show who the culprit was, it displayed sqlservr.exe as the process that was locking the file. When I killed it, the lock was released. But I was under the impression that SQL Server 2017 Express service is the process that controls whether a database is in use or not. That is, stopping the SQL Server 2017 Epxress service did not release the lock, but killing sqlservr.exe did. I am confused.



    PS: The MDF file was actually attached to using LINQPad, not through SQL Server Management Studio.



    I am on a 64 bit Windows 10 system.










    share|improve this question
















    bumped to the homepage by Community 29 mins ago


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.


















      0












      0








      0








      I was unable to unlock an MDF file and when I used LockHunter to show who the culprit was, it displayed sqlservr.exe as the process that was locking the file. When I killed it, the lock was released. But I was under the impression that SQL Server 2017 Express service is the process that controls whether a database is in use or not. That is, stopping the SQL Server 2017 Epxress service did not release the lock, but killing sqlservr.exe did. I am confused.



      PS: The MDF file was actually attached to using LINQPad, not through SQL Server Management Studio.



      I am on a 64 bit Windows 10 system.










      share|improve this question
















      I was unable to unlock an MDF file and when I used LockHunter to show who the culprit was, it displayed sqlservr.exe as the process that was locking the file. When I killed it, the lock was released. But I was under the impression that SQL Server 2017 Express service is the process that controls whether a database is in use or not. That is, stopping the SQL Server 2017 Epxress service did not release the lock, but killing sqlservr.exe did. I am confused.



      PS: The MDF file was actually attached to using LINQPad, not through SQL Server Management Studio.



      I am on a 64 bit Windows 10 system.







      sql-server sql-server-2017 windows-10






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 15 '18 at 15:50







      Sabuncu

















      asked Apr 15 '18 at 15:31









      SabuncuSabuncu

      1286




      1286





      bumped to the homepage by Community 29 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community 29 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
























          1 Answer
          1






          active

          oldest

          votes


















          0















          Why is sqlservr.exe still running when SQL Server 2017 Express has
          been stopped?




          As MSDB BOL here If started from the command prompt, sqlservr.exe must be stopped from the command prompt.



          For your further ref here






          share|improve this answer
























          • Thanks, but I had not explicitly started sqlservr.exe myself. Wasn't even aware it was running.

            – Sabuncu
            Apr 15 '18 at 15:52











          • @Sabuncu, But you had already said that "SQL Server Express 2017" has stopped but still "sqlservr.exe" is running.

            – Md Haidar Ali Khan
            Apr 15 '18 at 15:56











          • But aren't they the one and the same?

            – Sabuncu
            Apr 15 '18 at 16:00











          • @Sabuncu, How many "SQL Server instances" are running in that system.

            – Md Haidar Ali Khan
            Apr 15 '18 at 16:02











          • @sabuncu, you absolutely sure that there's only one instance? Check Services, check SQL configuration manager

            – Md Haidar Ali Khan
            Apr 15 '18 at 16:05











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "182"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f204010%2fwhy-is-sqlservr-exe-still-running-when-sql-server-2017-express-has-been-stopped%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0















          Why is sqlservr.exe still running when SQL Server 2017 Express has
          been stopped?




          As MSDB BOL here If started from the command prompt, sqlservr.exe must be stopped from the command prompt.



          For your further ref here






          share|improve this answer
























          • Thanks, but I had not explicitly started sqlservr.exe myself. Wasn't even aware it was running.

            – Sabuncu
            Apr 15 '18 at 15:52











          • @Sabuncu, But you had already said that "SQL Server Express 2017" has stopped but still "sqlservr.exe" is running.

            – Md Haidar Ali Khan
            Apr 15 '18 at 15:56











          • But aren't they the one and the same?

            – Sabuncu
            Apr 15 '18 at 16:00











          • @Sabuncu, How many "SQL Server instances" are running in that system.

            – Md Haidar Ali Khan
            Apr 15 '18 at 16:02











          • @sabuncu, you absolutely sure that there's only one instance? Check Services, check SQL configuration manager

            – Md Haidar Ali Khan
            Apr 15 '18 at 16:05
















          0















          Why is sqlservr.exe still running when SQL Server 2017 Express has
          been stopped?




          As MSDB BOL here If started from the command prompt, sqlservr.exe must be stopped from the command prompt.



          For your further ref here






          share|improve this answer
























          • Thanks, but I had not explicitly started sqlservr.exe myself. Wasn't even aware it was running.

            – Sabuncu
            Apr 15 '18 at 15:52











          • @Sabuncu, But you had already said that "SQL Server Express 2017" has stopped but still "sqlservr.exe" is running.

            – Md Haidar Ali Khan
            Apr 15 '18 at 15:56











          • But aren't they the one and the same?

            – Sabuncu
            Apr 15 '18 at 16:00











          • @Sabuncu, How many "SQL Server instances" are running in that system.

            – Md Haidar Ali Khan
            Apr 15 '18 at 16:02











          • @sabuncu, you absolutely sure that there's only one instance? Check Services, check SQL configuration manager

            – Md Haidar Ali Khan
            Apr 15 '18 at 16:05














          0












          0








          0








          Why is sqlservr.exe still running when SQL Server 2017 Express has
          been stopped?




          As MSDB BOL here If started from the command prompt, sqlservr.exe must be stopped from the command prompt.



          For your further ref here






          share|improve this answer














          Why is sqlservr.exe still running when SQL Server 2017 Express has
          been stopped?




          As MSDB BOL here If started from the command prompt, sqlservr.exe must be stopped from the command prompt.



          For your further ref here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Apr 15 '18 at 15:50









          Md Haidar Ali KhanMd Haidar Ali Khan

          3,60062340




          3,60062340













          • Thanks, but I had not explicitly started sqlservr.exe myself. Wasn't even aware it was running.

            – Sabuncu
            Apr 15 '18 at 15:52











          • @Sabuncu, But you had already said that "SQL Server Express 2017" has stopped but still "sqlservr.exe" is running.

            – Md Haidar Ali Khan
            Apr 15 '18 at 15:56











          • But aren't they the one and the same?

            – Sabuncu
            Apr 15 '18 at 16:00











          • @Sabuncu, How many "SQL Server instances" are running in that system.

            – Md Haidar Ali Khan
            Apr 15 '18 at 16:02











          • @sabuncu, you absolutely sure that there's only one instance? Check Services, check SQL configuration manager

            – Md Haidar Ali Khan
            Apr 15 '18 at 16:05



















          • Thanks, but I had not explicitly started sqlservr.exe myself. Wasn't even aware it was running.

            – Sabuncu
            Apr 15 '18 at 15:52











          • @Sabuncu, But you had already said that "SQL Server Express 2017" has stopped but still "sqlservr.exe" is running.

            – Md Haidar Ali Khan
            Apr 15 '18 at 15:56











          • But aren't they the one and the same?

            – Sabuncu
            Apr 15 '18 at 16:00











          • @Sabuncu, How many "SQL Server instances" are running in that system.

            – Md Haidar Ali Khan
            Apr 15 '18 at 16:02











          • @sabuncu, you absolutely sure that there's only one instance? Check Services, check SQL configuration manager

            – Md Haidar Ali Khan
            Apr 15 '18 at 16:05

















          Thanks, but I had not explicitly started sqlservr.exe myself. Wasn't even aware it was running.

          – Sabuncu
          Apr 15 '18 at 15:52





          Thanks, but I had not explicitly started sqlservr.exe myself. Wasn't even aware it was running.

          – Sabuncu
          Apr 15 '18 at 15:52













          @Sabuncu, But you had already said that "SQL Server Express 2017" has stopped but still "sqlservr.exe" is running.

          – Md Haidar Ali Khan
          Apr 15 '18 at 15:56





          @Sabuncu, But you had already said that "SQL Server Express 2017" has stopped but still "sqlservr.exe" is running.

          – Md Haidar Ali Khan
          Apr 15 '18 at 15:56













          But aren't they the one and the same?

          – Sabuncu
          Apr 15 '18 at 16:00





          But aren't they the one and the same?

          – Sabuncu
          Apr 15 '18 at 16:00













          @Sabuncu, How many "SQL Server instances" are running in that system.

          – Md Haidar Ali Khan
          Apr 15 '18 at 16:02





          @Sabuncu, How many "SQL Server instances" are running in that system.

          – Md Haidar Ali Khan
          Apr 15 '18 at 16:02













          @sabuncu, you absolutely sure that there's only one instance? Check Services, check SQL configuration manager

          – Md Haidar Ali Khan
          Apr 15 '18 at 16:05





          @sabuncu, you absolutely sure that there's only one instance? Check Services, check SQL configuration manager

          – Md Haidar Ali Khan
          Apr 15 '18 at 16:05


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Database Administrators Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f204010%2fwhy-is-sqlservr-exe-still-running-when-sql-server-2017-express-has-been-stopped%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          SQL Server 17 - Attemping to backup to remote NAS but Access is denied

          Always On Availability groups resolving state after failover - Remote harden of transaction...

          Restoring from pg_dump with foreign key constraints