The backup or restore was aborted - what could it be?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
2
down vote

favorite












use master
go
ALTER DATABASE Apcore SET SINGLE_USER WITH ROLLBACK IMMEDIATE

RESTORE DATABASE Apcore
FROM DISK=N'C:BackupsQG-V-SQL-TS$AIFS_DEVELOPMENT_APCore_FULL_20180909_230034.bak'
WITH FILE = 1,
MOVE N'APCoreDataPrimary' TO N'C:Program FilesMicrosoft SQL ServerMSSQL13.DEVELOPMENTMSSQLDATAAPCoreDataPrimary.mdf',
MOVE N'APCoreData1' TO N'C:Program FilesMicrosoft SQL ServerMSSQL13.DEVELOPMENTMSSQLDATAAPCoreData1.ndf',
MOVE N'APCoreData_nonclusteredIndexes' TO N'C:Program FilesMicrosoft SQL ServerMSSQL13.DEVELOPMENTMSSQLDATAAPCoreData_nonclusteredIndexes.ndf',
MOVE N'APCoreLog_log' TO N'C:Program FilesMicrosoft SQL ServerMSSQL13.DEVELOPMENTMSSQLDATAAPCoreLog_log.ldf',
recovery, NOUNLOAD, REPLACE, STATS = 1


enter image description here



While restoring a database on a developer's machine I got the above error.



The way I have done it is:



  • First let me say that I did not worry about - permissions, indexes, triggers, synonyms, etc.

  • I copied the backup file (less than 1 GB) from live to her local machine

  • did the restore filelestonly which is ok

  • I had to set the database into single_user mode because there are some services attempting to use it at every second

  • prepared the script above, and when running it and got that error message.

what could it be?



enter image description here










share|improve this question

















  • 1




    Any jobs running to KILL long-running commands?
    – Biju jose
    2 days ago
















up vote
2
down vote

favorite












use master
go
ALTER DATABASE Apcore SET SINGLE_USER WITH ROLLBACK IMMEDIATE

RESTORE DATABASE Apcore
FROM DISK=N'C:BackupsQG-V-SQL-TS$AIFS_DEVELOPMENT_APCore_FULL_20180909_230034.bak'
WITH FILE = 1,
MOVE N'APCoreDataPrimary' TO N'C:Program FilesMicrosoft SQL ServerMSSQL13.DEVELOPMENTMSSQLDATAAPCoreDataPrimary.mdf',
MOVE N'APCoreData1' TO N'C:Program FilesMicrosoft SQL ServerMSSQL13.DEVELOPMENTMSSQLDATAAPCoreData1.ndf',
MOVE N'APCoreData_nonclusteredIndexes' TO N'C:Program FilesMicrosoft SQL ServerMSSQL13.DEVELOPMENTMSSQLDATAAPCoreData_nonclusteredIndexes.ndf',
MOVE N'APCoreLog_log' TO N'C:Program FilesMicrosoft SQL ServerMSSQL13.DEVELOPMENTMSSQLDATAAPCoreLog_log.ldf',
recovery, NOUNLOAD, REPLACE, STATS = 1


enter image description here



While restoring a database on a developer's machine I got the above error.



The way I have done it is:



  • First let me say that I did not worry about - permissions, indexes, triggers, synonyms, etc.

  • I copied the backup file (less than 1 GB) from live to her local machine

  • did the restore filelestonly which is ok

  • I had to set the database into single_user mode because there are some services attempting to use it at every second

  • prepared the script above, and when running it and got that error message.

what could it be?



enter image description here










share|improve this question

















  • 1




    Any jobs running to KILL long-running commands?
    – Biju jose
    2 days ago












up vote
2
down vote

favorite









up vote
2
down vote

favorite











use master
go
ALTER DATABASE Apcore SET SINGLE_USER WITH ROLLBACK IMMEDIATE

RESTORE DATABASE Apcore
FROM DISK=N'C:BackupsQG-V-SQL-TS$AIFS_DEVELOPMENT_APCore_FULL_20180909_230034.bak'
WITH FILE = 1,
MOVE N'APCoreDataPrimary' TO N'C:Program FilesMicrosoft SQL ServerMSSQL13.DEVELOPMENTMSSQLDATAAPCoreDataPrimary.mdf',
MOVE N'APCoreData1' TO N'C:Program FilesMicrosoft SQL ServerMSSQL13.DEVELOPMENTMSSQLDATAAPCoreData1.ndf',
MOVE N'APCoreData_nonclusteredIndexes' TO N'C:Program FilesMicrosoft SQL ServerMSSQL13.DEVELOPMENTMSSQLDATAAPCoreData_nonclusteredIndexes.ndf',
MOVE N'APCoreLog_log' TO N'C:Program FilesMicrosoft SQL ServerMSSQL13.DEVELOPMENTMSSQLDATAAPCoreLog_log.ldf',
recovery, NOUNLOAD, REPLACE, STATS = 1


enter image description here



While restoring a database on a developer's machine I got the above error.



The way I have done it is:



  • First let me say that I did not worry about - permissions, indexes, triggers, synonyms, etc.

  • I copied the backup file (less than 1 GB) from live to her local machine

  • did the restore filelestonly which is ok

  • I had to set the database into single_user mode because there are some services attempting to use it at every second

  • prepared the script above, and when running it and got that error message.

what could it be?



enter image description here










share|improve this question













use master
go
ALTER DATABASE Apcore SET SINGLE_USER WITH ROLLBACK IMMEDIATE

RESTORE DATABASE Apcore
FROM DISK=N'C:BackupsQG-V-SQL-TS$AIFS_DEVELOPMENT_APCore_FULL_20180909_230034.bak'
WITH FILE = 1,
MOVE N'APCoreDataPrimary' TO N'C:Program FilesMicrosoft SQL ServerMSSQL13.DEVELOPMENTMSSQLDATAAPCoreDataPrimary.mdf',
MOVE N'APCoreData1' TO N'C:Program FilesMicrosoft SQL ServerMSSQL13.DEVELOPMENTMSSQLDATAAPCoreData1.ndf',
MOVE N'APCoreData_nonclusteredIndexes' TO N'C:Program FilesMicrosoft SQL ServerMSSQL13.DEVELOPMENTMSSQLDATAAPCoreData_nonclusteredIndexes.ndf',
MOVE N'APCoreLog_log' TO N'C:Program FilesMicrosoft SQL ServerMSSQL13.DEVELOPMENTMSSQLDATAAPCoreLog_log.ldf',
recovery, NOUNLOAD, REPLACE, STATS = 1


enter image description here



While restoring a database on a developer's machine I got the above error.



The way I have done it is:



  • First let me say that I did not worry about - permissions, indexes, triggers, synonyms, etc.

  • I copied the backup file (less than 1 GB) from live to her local machine

  • did the restore filelestonly which is ok

  • I had to set the database into single_user mode because there are some services attempting to use it at every second

  • prepared the script above, and when running it and got that error message.

what could it be?



enter image description here







sql-server backup sql-server-2016 restore






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 2 days ago









marcello miorelli

5,1181659120




5,1181659120







  • 1




    Any jobs running to KILL long-running commands?
    – Biju jose
    2 days ago












  • 1




    Any jobs running to KILL long-running commands?
    – Biju jose
    2 days ago







1




1




Any jobs running to KILL long-running commands?
– Biju jose
2 days ago




Any jobs running to KILL long-running commands?
– Biju jose
2 days ago










1 Answer
1






active

oldest

votes

















up vote
4
down vote



accepted










Most likely you have defined a command timeout when you connected to your server. Perhaps without thinking about it. Anyhow, the client (SSMS) will cancel the query after the specified amount of time and return that weird looking error of -2 (which wasn't thrown by the server, it is a client generates message). I tested this by connecting with the "Execution time-out" of 1 as in the picture below and then executed the SQL below.



enter image description here



SELECT 'before'
WAITFOR DELAY '00:00:05'
SELECT 'after'


Zero (0) means indefinitely.






share|improve this answer




















    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',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    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%2f217157%2fthe-backup-or-restore-was-aborted-what-could-it-be%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    4
    down vote



    accepted










    Most likely you have defined a command timeout when you connected to your server. Perhaps without thinking about it. Anyhow, the client (SSMS) will cancel the query after the specified amount of time and return that weird looking error of -2 (which wasn't thrown by the server, it is a client generates message). I tested this by connecting with the "Execution time-out" of 1 as in the picture below and then executed the SQL below.



    enter image description here



    SELECT 'before'
    WAITFOR DELAY '00:00:05'
    SELECT 'after'


    Zero (0) means indefinitely.






    share|improve this answer
























      up vote
      4
      down vote



      accepted










      Most likely you have defined a command timeout when you connected to your server. Perhaps without thinking about it. Anyhow, the client (SSMS) will cancel the query after the specified amount of time and return that weird looking error of -2 (which wasn't thrown by the server, it is a client generates message). I tested this by connecting with the "Execution time-out" of 1 as in the picture below and then executed the SQL below.



      enter image description here



      SELECT 'before'
      WAITFOR DELAY '00:00:05'
      SELECT 'after'


      Zero (0) means indefinitely.






      share|improve this answer






















        up vote
        4
        down vote



        accepted







        up vote
        4
        down vote



        accepted






        Most likely you have defined a command timeout when you connected to your server. Perhaps without thinking about it. Anyhow, the client (SSMS) will cancel the query after the specified amount of time and return that weird looking error of -2 (which wasn't thrown by the server, it is a client generates message). I tested this by connecting with the "Execution time-out" of 1 as in the picture below and then executed the SQL below.



        enter image description here



        SELECT 'before'
        WAITFOR DELAY '00:00:05'
        SELECT 'after'


        Zero (0) means indefinitely.






        share|improve this answer












        Most likely you have defined a command timeout when you connected to your server. Perhaps without thinking about it. Anyhow, the client (SSMS) will cancel the query after the specified amount of time and return that weird looking error of -2 (which wasn't thrown by the server, it is a client generates message). I tested this by connecting with the "Execution time-out" of 1 as in the picture below and then executed the SQL below.



        enter image description here



        SELECT 'before'
        WAITFOR DELAY '00:00:05'
        SELECT 'after'


        Zero (0) means indefinitely.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 2 days ago









        Tibor Karaszi

        8615




        8615



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f217157%2fthe-backup-or-restore-was-aborted-what-could-it-be%23new-answer', 'question_page');

            );

            Post as a guest













































































            Comments

            Popular posts from this blog

            What does second last employer means? [closed]

            List of Gilmore Girls characters

            Confectionery