Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot restore bak file #48

Closed
jeroenterheerdt opened this issue Jun 5, 2019 · 1 comment
Closed

Cannot restore bak file #48

jeroenterheerdt opened this issue Jun 5, 2019 · 1 comment

Comments

@jeroenterheerdt
Copy link
Contributor

https://github.com/microsoft/sqlworkshops/blob/master/SQLServerMLServices/notebooks/03-Phase%201%20-%20Business%20Understanding.ipynb restores the database. It mentions a file Activity.bak but the link it provides downloads Analysis.bak. This is the code:
/* Restore Database */ USE master; GO RESTORE DATABASE Activity FROM DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Backup\Activity.bak'; GO

Fixed code:

/* Restore Database */
USE master;
GO
RESTORE DATABASE Analysis
   FROM DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Backup\Analysis.bak';
GO

Also, on my test machine with just one desk I cannot restore the Analysis.bak file, since it looking for D:\temp:

Msg 5133, Level 16, State 1, Line 3
Directory lookup for the file "d:\temp\tpcxbb_1gb.mdf" failed with the operating system error 3(The system cannot find the path specified.).
 Msg 3156, Level 16, State 3, Line 3
File 'tpcxbb_1gb' cannot be restored to 'd:\temp\tpcxbb_1gb.mdf'. Use WITH MOVE to identify a valid location for the file.
 Msg 5133, Level 16, State 1, Line 3
Directory lookup for the file "d:\temp\tpcxbb_1gb.ldf" failed with the operating system error 3(The system cannot find the path specified.).
 Msg 3156, Level 16, State 3, Line 3
File 'tpcxbb_1gb_log' cannot be restored to 'd:\temp\tpcxbb_1gb.ldf'. Use WITH MOVE to identify a valid location for the file.
 Msg 3119, Level 16, State 1, Line 3
Problems were identified while planning for the RESTORE statement. Previous messages provide details.
 Msg 3013, Level 16, State 1, Line 3
RESTORE DATABASE is terminating abnormally.
@BuckWoody
Copy link
Collaborator

Corrected - good catch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants