This article is half-done without your Comment! *** Please share your thoughts via Comment ***
A typical interview question for SQL DBA is, How to get the User Name, who created Database Backup?
Don’t prepare your self for the hard questions, I took many interviews, and most of the DBA doesn’t know about this basic info. (Including senior DBA)
I already shared information about RESTORE HEADERONLY, but here I am again sharing the direct question and answer which is useful for interviews.
If you want to know any information about database backup, without restoring the database you can get those details using RESTORE HEADERONLY.
Check the below command:
This is my test backup path, in the result, you can get a column like a UserName which who created the database backup.
1 |
RESTORE HEADERONLY FROM DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL13.DBRND\MSSQL\BACKUP\dbrnd.bak' |
Leave a Reply