Reputation: 109
In one of my production environment the data file extension for a database showing some crazy extension. Normally for a database files mdf is for data and ldf for log. But in my case instead of mdf it is showing as bak.
As per my understanding bak extension is for backup file. So how it comes as a data file extension and how it is working.
It will cause any database corruption. How I can resolve this one ?
Upvotes: 0
Views: 349
Reputation: 1767
The name of the file is actually irrelevant. As long as it is properly mapped in the metadata then it will cause no issues.
The MDF, NDF, LDF, BAK extensions are all just a convenience to quickly identify the file type without querying.
If it bothers you, you could change it (https://www.mssqltips.com/sqlservertip/4419/renaming-physical-database-file-names-for-a-sql-server-database/).
Upvotes: 1