Skip to content

Instantly share code, notes, and snippets.

@JwanKhalaf
Created January 18, 2020 13:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JwanKhalaf/6182eb876fd0262e7928e02ebd248469 to your computer and use it in GitHub Desktop.
Save JwanKhalaf/6182eb876fd0262e7928e02ebd248469 to your computer and use it in GitHub Desktop.
➜ ~ sqlcmd -S localhost -U SA -Q "RESTORE DATABASE [bejebeje] FROM DISK = N'/opt/mssql/BejebejeDb2018-04-13.bak' WITH FILE = 1, NOUNLOAD, REPLACE, NORECOVERY, STATS =5"
Password:
Msg 5133, Level 16, State 1, Server jwan-pc, Line 1
Directory lookup for the file "C:\Program Files\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\DATA\2J8fz00d6chl.mdf" failed with the operating system error 2(The system cannot find the file specified.).
Msg 3156, Level 16, State 3, Server jwan-pc, Line 1
File '2J8fz00d6chl' cannot be restored to 'C:\Program Files\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\DATA\2J8fz00d6chl.mdf'. Use WITH MOVE to identify a valid location for the file.
Msg 5133, Level 16, State 1, Server jwan-pc, Line 1
Directory lookup for the file "C:\Program Files\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\DATA\2J8fz00d6chl_log.ldf" failed with the operating system error 2(The system cannot find the file specified.).
Msg 3156, Level 16, State 3, Server jwan-pc, Line 1
File '2J8fz00d6chl_log' cannot be restored to 'C:\Program Files\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\DATA\2J8fz00d6chl_log.ldf'. Use WITH MOVE to identify a valid location for the file.
Msg 3119, Level 16, State 1, Server jwan-pc, Line 1
Problems were identified while planning for the RESTORE statement. Previous messages provide details.
Msg 3013, Level 16, State 1, Server jwan-pc, Line 1
RESTORE DATABASE is terminating abnormally.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment