How do I get SQL Server Management Studio to find a .bak file to restore?












0















I am trying to turn a .bak file into a database. I can't find the "Restore Database" button when I left-click "databases" when connected. This is what I should see. However, this is what I see.



I have been using this tutorial to try to restore a database from a .bak file. I placed the .bak file (named WideWorldImporters-Standard) in the SQL Server Management Studio folder. Here's the picture.



Things I've tried:




  • Restarting the Server Management Studio

  • Restarting my computer

  • Looking for updates on Server Management Studio

  • Looking for updates on my computer

  • Copying the .bak file to other folders and trying to open it as a
    file

  • Looking for anything weird going on with azure


I suspect that the problem might be that I am not connecting to the right database. The program seems to be logging into my azure account just fine, but I am not finding any of my existing servers to hook into.










share|improve this question













migrated from superuser.com Jan 4 at 22:26


This question came from our site for computer enthusiasts and power users.



















  • Backup/Restore commands are not available in SSMS in Azure SQL.

    – joeqwerty
    Jan 4 at 22:43
















0















I am trying to turn a .bak file into a database. I can't find the "Restore Database" button when I left-click "databases" when connected. This is what I should see. However, this is what I see.



I have been using this tutorial to try to restore a database from a .bak file. I placed the .bak file (named WideWorldImporters-Standard) in the SQL Server Management Studio folder. Here's the picture.



Things I've tried:




  • Restarting the Server Management Studio

  • Restarting my computer

  • Looking for updates on Server Management Studio

  • Looking for updates on my computer

  • Copying the .bak file to other folders and trying to open it as a
    file

  • Looking for anything weird going on with azure


I suspect that the problem might be that I am not connecting to the right database. The program seems to be logging into my azure account just fine, but I am not finding any of my existing servers to hook into.










share|improve this question













migrated from superuser.com Jan 4 at 22:26


This question came from our site for computer enthusiasts and power users.



















  • Backup/Restore commands are not available in SSMS in Azure SQL.

    – joeqwerty
    Jan 4 at 22:43














0












0








0








I am trying to turn a .bak file into a database. I can't find the "Restore Database" button when I left-click "databases" when connected. This is what I should see. However, this is what I see.



I have been using this tutorial to try to restore a database from a .bak file. I placed the .bak file (named WideWorldImporters-Standard) in the SQL Server Management Studio folder. Here's the picture.



Things I've tried:




  • Restarting the Server Management Studio

  • Restarting my computer

  • Looking for updates on Server Management Studio

  • Looking for updates on my computer

  • Copying the .bak file to other folders and trying to open it as a
    file

  • Looking for anything weird going on with azure


I suspect that the problem might be that I am not connecting to the right database. The program seems to be logging into my azure account just fine, but I am not finding any of my existing servers to hook into.










share|improve this question














I am trying to turn a .bak file into a database. I can't find the "Restore Database" button when I left-click "databases" when connected. This is what I should see. However, this is what I see.



I have been using this tutorial to try to restore a database from a .bak file. I placed the .bak file (named WideWorldImporters-Standard) in the SQL Server Management Studio folder. Here's the picture.



Things I've tried:




  • Restarting the Server Management Studio

  • Restarting my computer

  • Looking for updates on Server Management Studio

  • Looking for updates on my computer

  • Copying the .bak file to other folders and trying to open it as a
    file

  • Looking for anything weird going on with azure


I suspect that the problem might be that I am not connecting to the right database. The program seems to be logging into my azure account just fine, but I am not finding any of my existing servers to hook into.







backup database sql-server sql






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 4 at 22:22







Katelyn Rule











migrated from superuser.com Jan 4 at 22:26


This question came from our site for computer enthusiasts and power users.









migrated from superuser.com Jan 4 at 22:26


This question came from our site for computer enthusiasts and power users.















  • Backup/Restore commands are not available in SSMS in Azure SQL.

    – joeqwerty
    Jan 4 at 22:43



















  • Backup/Restore commands are not available in SSMS in Azure SQL.

    – joeqwerty
    Jan 4 at 22:43

















Backup/Restore commands are not available in SSMS in Azure SQL.

– joeqwerty
Jan 4 at 22:43





Backup/Restore commands are not available in SSMS in Azure SQL.

– joeqwerty
Jan 4 at 22:43










2 Answers
2






active

oldest

votes


















0














You can restore the database using the backup file using T-SQL:



RESTORE FILELISTONLY   
FROM DISK = N'C:Program FilesMicrosoft SQL ServerMSSQL14.MSSQLSERVERMSSQLBackupAdventureWorks2017.bak' ;
GO

--Restore database from backup


RESTORE DATABASE [AdventureWorks2017]
FROM DISK = N'C:Program FilesMicrosoft SQL ServerMSSQL14.MSSQLSERVERMSSQLBackupAdventureWorks2017.bak'
WITH FILE = 1,
MOVE N'AdventureWorks2017' TO N'C:Program FilesMicrosoft SQL ServerMSSQL14.MSSQLSERVERMSSQLDATAAdventureWorks2017.mdf',
MOVE N'AdventureWorks2017_log' TO N'C:Program FilesMicrosoft SQL ServerMSSQL14.MSSQLSERVERMSSQLLogAdventureWorks2017_log.ldf',
NOUNLOAD,
REPLACE,
STATS = 20
GO


Change the folder path and filenames as per your environment. If you get an error of "Permission denied" while executing the code move the .bak file to the default backup directory for the instance.
The RESTORE FILELISTONLY is to check the logical names for the database files.






share|improve this answer































    0














    I figured out a way around my problem. Apparently, my .bak file was corrupt. I got it from multiple places and still got the same problem. (Don't know how or why)



    I then downloaded the .bacpac file for the same database, and then used SQLBackupAndFTP to put the file onto my Azure server as a database. I can now access it with Microsoft SQL Management Studio and LINQPad 5. I can play around with SQL commands on the Db just fine now. I don't know if Visual Studio can access it, but I am optimistic.






    share|improve this answer
























    • It doesn't seem like the issue you posted on your question has something to do with the workaround you figured out.

      – Humberto Castellon
      Jan 5 at 23:35











    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "2"
    };
    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: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    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%2fserverfault.com%2fquestions%2f947659%2fhow-do-i-get-sql-server-management-studio-to-find-a-bak-file-to-restore%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown
























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    You can restore the database using the backup file using T-SQL:



    RESTORE FILELISTONLY   
    FROM DISK = N'C:Program FilesMicrosoft SQL ServerMSSQL14.MSSQLSERVERMSSQLBackupAdventureWorks2017.bak' ;
    GO

    --Restore database from backup


    RESTORE DATABASE [AdventureWorks2017]
    FROM DISK = N'C:Program FilesMicrosoft SQL ServerMSSQL14.MSSQLSERVERMSSQLBackupAdventureWorks2017.bak'
    WITH FILE = 1,
    MOVE N'AdventureWorks2017' TO N'C:Program FilesMicrosoft SQL ServerMSSQL14.MSSQLSERVERMSSQLDATAAdventureWorks2017.mdf',
    MOVE N'AdventureWorks2017_log' TO N'C:Program FilesMicrosoft SQL ServerMSSQL14.MSSQLSERVERMSSQLLogAdventureWorks2017_log.ldf',
    NOUNLOAD,
    REPLACE,
    STATS = 20
    GO


    Change the folder path and filenames as per your environment. If you get an error of "Permission denied" while executing the code move the .bak file to the default backup directory for the instance.
    The RESTORE FILELISTONLY is to check the logical names for the database files.






    share|improve this answer




























      0














      You can restore the database using the backup file using T-SQL:



      RESTORE FILELISTONLY   
      FROM DISK = N'C:Program FilesMicrosoft SQL ServerMSSQL14.MSSQLSERVERMSSQLBackupAdventureWorks2017.bak' ;
      GO

      --Restore database from backup


      RESTORE DATABASE [AdventureWorks2017]
      FROM DISK = N'C:Program FilesMicrosoft SQL ServerMSSQL14.MSSQLSERVERMSSQLBackupAdventureWorks2017.bak'
      WITH FILE = 1,
      MOVE N'AdventureWorks2017' TO N'C:Program FilesMicrosoft SQL ServerMSSQL14.MSSQLSERVERMSSQLDATAAdventureWorks2017.mdf',
      MOVE N'AdventureWorks2017_log' TO N'C:Program FilesMicrosoft SQL ServerMSSQL14.MSSQLSERVERMSSQLLogAdventureWorks2017_log.ldf',
      NOUNLOAD,
      REPLACE,
      STATS = 20
      GO


      Change the folder path and filenames as per your environment. If you get an error of "Permission denied" while executing the code move the .bak file to the default backup directory for the instance.
      The RESTORE FILELISTONLY is to check the logical names for the database files.






      share|improve this answer


























        0












        0








        0







        You can restore the database using the backup file using T-SQL:



        RESTORE FILELISTONLY   
        FROM DISK = N'C:Program FilesMicrosoft SQL ServerMSSQL14.MSSQLSERVERMSSQLBackupAdventureWorks2017.bak' ;
        GO

        --Restore database from backup


        RESTORE DATABASE [AdventureWorks2017]
        FROM DISK = N'C:Program FilesMicrosoft SQL ServerMSSQL14.MSSQLSERVERMSSQLBackupAdventureWorks2017.bak'
        WITH FILE = 1,
        MOVE N'AdventureWorks2017' TO N'C:Program FilesMicrosoft SQL ServerMSSQL14.MSSQLSERVERMSSQLDATAAdventureWorks2017.mdf',
        MOVE N'AdventureWorks2017_log' TO N'C:Program FilesMicrosoft SQL ServerMSSQL14.MSSQLSERVERMSSQLLogAdventureWorks2017_log.ldf',
        NOUNLOAD,
        REPLACE,
        STATS = 20
        GO


        Change the folder path and filenames as per your environment. If you get an error of "Permission denied" while executing the code move the .bak file to the default backup directory for the instance.
        The RESTORE FILELISTONLY is to check the logical names for the database files.






        share|improve this answer













        You can restore the database using the backup file using T-SQL:



        RESTORE FILELISTONLY   
        FROM DISK = N'C:Program FilesMicrosoft SQL ServerMSSQL14.MSSQLSERVERMSSQLBackupAdventureWorks2017.bak' ;
        GO

        --Restore database from backup


        RESTORE DATABASE [AdventureWorks2017]
        FROM DISK = N'C:Program FilesMicrosoft SQL ServerMSSQL14.MSSQLSERVERMSSQLBackupAdventureWorks2017.bak'
        WITH FILE = 1,
        MOVE N'AdventureWorks2017' TO N'C:Program FilesMicrosoft SQL ServerMSSQL14.MSSQLSERVERMSSQLDATAAdventureWorks2017.mdf',
        MOVE N'AdventureWorks2017_log' TO N'C:Program FilesMicrosoft SQL ServerMSSQL14.MSSQLSERVERMSSQLLogAdventureWorks2017_log.ldf',
        NOUNLOAD,
        REPLACE,
        STATS = 20
        GO


        Change the folder path and filenames as per your environment. If you get an error of "Permission denied" while executing the code move the .bak file to the default backup directory for the instance.
        The RESTORE FILELISTONLY is to check the logical names for the database files.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 4 at 22:41









        Humberto CastellonHumberto Castellon

        7181216




        7181216

























            0














            I figured out a way around my problem. Apparently, my .bak file was corrupt. I got it from multiple places and still got the same problem. (Don't know how or why)



            I then downloaded the .bacpac file for the same database, and then used SQLBackupAndFTP to put the file onto my Azure server as a database. I can now access it with Microsoft SQL Management Studio and LINQPad 5. I can play around with SQL commands on the Db just fine now. I don't know if Visual Studio can access it, but I am optimistic.






            share|improve this answer
























            • It doesn't seem like the issue you posted on your question has something to do with the workaround you figured out.

              – Humberto Castellon
              Jan 5 at 23:35
















            0














            I figured out a way around my problem. Apparently, my .bak file was corrupt. I got it from multiple places and still got the same problem. (Don't know how or why)



            I then downloaded the .bacpac file for the same database, and then used SQLBackupAndFTP to put the file onto my Azure server as a database. I can now access it with Microsoft SQL Management Studio and LINQPad 5. I can play around with SQL commands on the Db just fine now. I don't know if Visual Studio can access it, but I am optimistic.






            share|improve this answer
























            • It doesn't seem like the issue you posted on your question has something to do with the workaround you figured out.

              – Humberto Castellon
              Jan 5 at 23:35














            0












            0








            0







            I figured out a way around my problem. Apparently, my .bak file was corrupt. I got it from multiple places and still got the same problem. (Don't know how or why)



            I then downloaded the .bacpac file for the same database, and then used SQLBackupAndFTP to put the file onto my Azure server as a database. I can now access it with Microsoft SQL Management Studio and LINQPad 5. I can play around with SQL commands on the Db just fine now. I don't know if Visual Studio can access it, but I am optimistic.






            share|improve this answer













            I figured out a way around my problem. Apparently, my .bak file was corrupt. I got it from multiple places and still got the same problem. (Don't know how or why)



            I then downloaded the .bacpac file for the same database, and then used SQLBackupAndFTP to put the file onto my Azure server as a database. I can now access it with Microsoft SQL Management Studio and LINQPad 5. I can play around with SQL commands on the Db just fine now. I don't know if Visual Studio can access it, but I am optimistic.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Jan 5 at 20:22









            Katelyn RuleKatelyn Rule

            1




            1













            • It doesn't seem like the issue you posted on your question has something to do with the workaround you figured out.

              – Humberto Castellon
              Jan 5 at 23:35



















            • It doesn't seem like the issue you posted on your question has something to do with the workaround you figured out.

              – Humberto Castellon
              Jan 5 at 23:35

















            It doesn't seem like the issue you posted on your question has something to do with the workaround you figured out.

            – Humberto Castellon
            Jan 5 at 23:35





            It doesn't seem like the issue you posted on your question has something to do with the workaround you figured out.

            – Humberto Castellon
            Jan 5 at 23:35


















            draft saved

            draft discarded




















































            Thanks for contributing an answer to Server Fault!


            • 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%2fserverfault.com%2fquestions%2f947659%2fhow-do-i-get-sql-server-management-studio-to-find-a-bak-file-to-restore%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

            Plaza Victoria

            In PowerPoint, is there a keyboard shortcut for bulleted / numbered list?

            How to put 3 figures in Latex with 2 figures side by side and 1 below these side by side images but in...