If you only have the MDF and it is healthy, you can attach it to your SQL Server. SQL Server will create the database from the .MDF and will create the .LDF for you. Try the following: USE MASTER EXEC sp_attach_single_file_db @dbname = 'YourBank', @physname = 'MDF location' Microsoft recommends not using this procedure anymore, as it will possibly be discontinued. You can get the same result through CREATE DATABASE with the FOR ATTACH parameter. USE MASTER CREATE DATABASE MeuBanco ON (NAME='FileLogicalName', FILENAME='FileLocation') FOR ATTACH_REBUILD_LOG IMPORTANT: The wizard does not work, only via script.
🔸 Guys, I created this blog to keep content, research and tips that at some point I needed and it took work to locate. The content is free, you can use it at will, but remember to validate and adapt to your needs. 🔸 Pessoal, criei esse blog para ir guardando conteúdos, pesquisas e dicas que em algum momento precisei e deu trabalho localizar. O conteúdo é gratuito, podem usar a vontade, mas lembre-se de validar e adaptar para a sua necessidade.