O SQL Server é extremamente rápido. Você que não sabe usar!

Atendendo a pedidos e ao excelente feedback da comunidade, vamos agora para a parte 6!

Confira esta apresentação ONLINE e GRATUITA no Canal .NET em que serão mostradas mais dicas e técnicas de como otimizar o desempenho de bancos SQL Server, obtendo assim o máximo desse excelente SGBD! Falaremos novamente de muita coisa legal… e muito além de NOLOCK e Missing Index!

Palestrantes já confirmados:
– Dirceu Resende – Microsoft MVP
– Fabiano Neves Amorim – Microsoft MVP
– Marcel Inowe – DBA
– Luiz Vitor França Lima – DBA

Retrieve the SQL Server Version from a Backup File

Have you ever been in the need to retrieve the SQL Server version that was used on a backup file?

Well, if for some weird reason that happens to you, the following SQL can help you. It won’t restore the database, it’ll just retrieve some basic info about it.

With that, you’ll have the DatabaseVersion (Internal Number Version) where the backup was from. You can also grab some useful information like the Server Name, Creation Date, and more.

RESTORE HEADERONLY FROM DISK = N'b:\backup\data_backup.bak'

Below we have a table of  Versions x Internal Number.

Version Internal Number Version Compat. Level
SQL Server 2019 895 – 904 150
SQL Server 2017 868 – 869 140
SQL Server 2016 852 130
SQL Server 2014 782 120
SQL Server 2012 706 110

I hope it helps!