restoring .bak file to new database using T-SQL

  • Glad we were finally able to help you with this issue.

  • Thank you for your patience... and I will study the books online and this solution to better understand this and similar issues that will arise in the future... again... thanks!

  • Hi

    You can restore SQL .bak file with few simple steps to process the same you will be required SQL Server (As you are using local server) & SQL Server Management Studio (SSMS).

    Please follow the given steps.

    1- Launch your SSMS and connect it to your server.

    2- Right-click the Databases node in Object Explorer and select Restore Database.

    3- Select Device, and then file location in your device.

    4- Select your SQL .bak file

    5- Select OK to close the Select backup devices dialog box.

    6 - Select OK to restore the backup of your database.

    Alternatively, you can run the following Transact-SQL script to restore your database. The path may be different on your computer:

    USE [master];

    GO

    RESTORE DATABASE [SQLTestDB]

    FROM DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\Backup\SQLTestDB.bak' WITH FILE = 1, NOUNLOAD, STATS = 5;

    GO

    Thanks

  • You do realise this thread is over 7 years old

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • Yes, I agree

    But If someone will face this situation again & found this thread, It may help someone.

    Thanks

  • This was removed by the editor as SPAM

Viewing 6 posts - 61 through 65 (of 65 total)

You must be logged in to reply to this topic. Login to reply