Question

I Was able to backup using transact-sql, but I could not do a restore for some...

I Was able to backup using transact-sql, but I could not do a restore for some reason. IT says database have not been backup. But the .bak file is in the folder. Here is my code for restore:

USE master

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

GO

My backup file that was successful:

BACKUP DATABASE SmartHomes

TO DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\Backup\SmartHomes.bak' WITH NOFORMAT, NOINIT,  NAME = N'SmartHomes-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10

GO

Homework Answers

Answer #1

For backup from.bak file to sql requires the following steps:

1. connect to a proper instance of Microsoft SQL Server Database Engine

2. click on object explorer next to Databases node and choose Restore Database option from contextual tab

3. Select General menu and navigate to the Source section

4. Click on Device option to get the location and hit add button to locate the backup file and open the .bak file which is highlighted

5. specify the Restore Options as Overwrite the existing database via checking the options you need

6. hit Verify Backup Media button and click OK to check if all the desired database is attached properly or not

7. you will get a pop-up that says “Database ‘Name’ restored successfully”

i hope this help for your problem

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Hi, I am trying to create an XML JTree viewer using the DOM parser instead of...
Hi, I am trying to create an XML JTree viewer using the DOM parser instead of the SAX parser, I am having trouble changing my code in order to utilize the DOM parser to extract the XML data into the tree structure. Would you be able to explain what changes should be made to the code in order to use the DOM parser instead of the SAX parser? // Java Packages //      import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.File; import...
I did already posted this question before, I did get the answer but i am not...
I did already posted this question before, I did get the answer but i am not satisfied with the answer i did the code as a solution not the description as my solution, so i am reposting this question again. Please send me the code as my solution not the description In this project, build a simple Unix shell. The shell is the heart of the command-line interface, and thus is central to the Unix/C programming environment. Mastering use of...
Using the model proposed by Lafley and Charan, analyze how Apigee was able to drive innovation....
Using the model proposed by Lafley and Charan, analyze how Apigee was able to drive innovation. case:    W17400 APIGEE: PEOPLE MANAGEMENT PRACTICES AND THE CHALLENGE OF GROWTH Ranjeet Nambudiri, S. Ramnarayan, and Catherine Xavier wrote this case solely to provide material for class discussion. The authors do not intend to illustrate either effective or ineffective handling of a managerial situation. The authors may have disguised certain names and other identifying information to protect confidentiality. This publication may not be...