STANDARD #1

How to find the data files and log files for those not in the proper drives as per database standards?

Data file check

select name, physical_name from sys.master_files
where type = 0 and left(physical_name,12) <> 'A:\Data\SQL\'

Log file Check


select name,database_id, physical_name from sys.master_files
where type = 1 and left(physical_name,12) <> 'B:\Logs\SQL\'

If any records found for the above query,if so seems to be some of the datafiles and log files not following database standard.

We need to change mdf and ldf to the appropriate path.

Comments

Popular posts from this blog

SSIS2008R2 Error: 0xC0209303 at Package:

SQL2008R2 Error: The remote copy of database "XXXXX" has not been rolled forward to a point in time that is encompassed in the local copy of the database log. (Microsoft SQL Server, Error: 1412)