SQL server by default stores
the data in the files with extensions .MDF and .LDF under the path
"C:\Program Files\Microsoft SQL Server\MSSQL\Data\"
So if you create a new database, it is mapped with the .MDF and .LDF files under this location.
However, if you want to change the location of these .MDF and .LDF files, you can do so by detaching the database and then moving these files to desired location and again attaching the database.
"C:\Program Files\Microsoft SQL Server\MSSQL\Data\"
So if you create a new database, it is mapped with the .MDF and .LDF files under this location.
However, if you want to change the location of these .MDF and .LDF files, you can do so by detaching the database and then moving these files to desired location and again attaching the database.
As all of us know SQL Server
database is associated with two types of files:-
(1)
*.mdf
(2) *.ldf.
*.mdf
files are actual physical database files where your data is stored finally.
*.ldf
(LOG) files are actually data, which is recorded from the last time data was
committed in the database.
Any SQL Server database is associated
with these files are actual physical database files where your data is stored
finally.