STB files on SQL Server…
Monday, January 14th, 2008Today a junior DBA asked me about the files with the .STB extension were for. Then I realized that other DBAs out there may not know what the .STB files are for and what creates them. The .STB files stand for STand By (STB). These files are created when a database is restored with the RESTORE DATABASE command with the clause WITH STAND BY. This statement puts the database in “Stand By Mode” and allows for further backups to be restored.
The caveat here is… when your bring a database online from standby mode the .STB file is sometimes deleted… sometimes it is not. So after you execute the following statement:
RESTORE DATABASE <database name>
WITH RECOVERY
You might still see the file <database name>.stb after the database is brought online. If you still see the file… then you can go ahead and delete the file after the database has been brought online.
