Sql-server – Secondary replica database file location in Availability Group

availability-groupssql server

I inherit a setup of two nodes (primary & secondary replica) Availability Group.

On my secondary replica node, the SQL server instance default files are stored at:

enter image description here

My default primary replica node files are as follow:

enter image description here

When I look at the synchronizing database's properties on my secondary replica, I see its database files as follow

enter image description here

They are primary replica node directories. Is this how it works in Availability Group?

That is when you look at the file group of your secondary replica database, they show the paths of the primary replica database even though the data file and log file are stored at a different local directory?

Best Answer

If you try and open the database properties window on a secondary replica, SSMS will throw you an error, so my guess is that you're not actually connected to the secondary replia when you're checking these paths.

Run the following on both nodes:

select db_name(database_id), name, physical_name
from sys.master_files

This will show you the physical paths that SQL Server is using to access each file, and I would expect will show you different paths on each replica.