TSQL Script – Determining Default Database File & Log Path

Below are two methods that can be used to determine the default location of data and transaction log files for your installation of SQL Server. This script can come handy when automating the deployment of databases in your environment.   Method 1   — Check if temp database exists — Tempdatabase is used for determining…

10