user2053420
user2053420

Reputation:

Restore database in sql server

I have some sql server's backup file(format .bck). In my case, I do not know log file name. So I can't use with move in restore command. Is there anyway to restore database without move? If yes, please guide me.

I want to use like below one.

restore database testdb from disk = 'folderpath\aatest.bak'

Upvotes: 1

Views: 403

Answers (1)

Remus Rusanu
Remus Rusanu

Reputation: 294177

You sure can know the log file name and use WITH MOVE. Use RESTORE FILELISTONLY to retrieve the list of database files (including log) from the backup first.

Upvotes: 3

Related Questions