BS

Thursday, March 14, 2019

Files - DB Physical


  1. Data File (Hold the data and objects such as tables, indexes, stored procedures, and views.)
    1. Primary mdf
    2. Seconday ndf
  2. Log File - .ldf

LCN /  File Groups / Pages - Extents / LSN - MiniLSN - Checkpoint

====================================================================
Find the Location of Data and Log Files for all DBs:-
USE master;
SELECT
  name 'Logical Name',
  physical_name 'File Location'
FROM sys.master_files;
====================================================================
Find the Location of Data and Log Files for Particular DB
USE Solutions;
SELECT
  name 'Logical Name', 
  physical_name 'File Location'
FROM sys.database_files;

No comments:

Post a Comment