I configured the sql server as E:-drive for default db files(master.mdf and .ldf , model .mdf and ldf and same remaining two dbs ) and F: drive to store the custom db data files (user created db such as x.mdf) and G: drive for custom db log file (x.ldf).
x is my local server and y is remote server .
I need to fetch the y’'s sql server file location from x.
so here my question , I used registry path to get the sql data root which is default db files
registry path “SOFTWARE\Microsoft\Microsoft SQL Server\$p\Setup”. how can I get the path for custom db data files and log files in remote server if I configured as mentioned above . Is there any way to get the path from registry or another service in windows .
Note:- There is no option to use the query to get form the sqlsever inbuilt tables or procedures .