The problem of tango ward is that he tries to pass
full backup filee as a
script file to
I understood it as he wrote the error is
Could not find stored procedure 'TAPE'.
The first bytes of a backup file even if it's disk file are 'TAPE':
To make a simplest
restore from the
bak file without restoring it to another database and moving the files you still can use sqlcmd, but you should pass your file as a
backup file location, i.e. use this command:
restore database MyDB from disk = '/home/user1/Downloads/myspecialpresentforyou'
Here is simple example of doing it in
- First I launch
sqlcmd (without parameters I'll connect to my
default instance with win authentication, but you should use your
sa user and password as you did)
- Once launched
sqlcmd you'll see
1> it's a prompt to enter your
command, now enter there RESTORE...(the whole command, see above) and
after entering it (press ENTER) you'll see 2>
- Now enter GO to send your command
Here is how I restored my database
abc from full backup
If you restore to another database you should first know logical file names using
restore filelistonly and then move the files to new destination.
If it's your case you'd better use SSMS to see these files as sqlcmd output can be combersome if your db has many files.
Here the example in SSMS: