none
want to get the Logical names for secondary server on Mirroring on Prod

    Question

  • Hi Friends,

    I want to get the Logical Names of the Databases on Secondary server when the Mirroring is setup?

    Thanks,

    Maddy

    • Changed type Tom Phillips Monday, February 13, 2012 1:37 PM
    • Moved by Tom Phillips Monday, February 13, 2012 1:38 PM Database Mirror question (From:SQL Server Database Engine)
    Monday, February 13, 2012 1:11 PM

Answers

  • Try with:

     
    SELECT db_name(dm.database_id) as database_name,
    		mf.name as file_logical_name, 
    		mf.physical_name  
    FROM sys.database_mirroring dm
    INNER JOIN sys.master_files mf
    	ON mf.database_id = dm.database_id
    WHERE dm.mirroring_role = 2
    


    Ana Mihalj

    • Marked as answer by maddy28 Monday, February 13, 2012 2:26 PM
    Monday, February 13, 2012 2:13 PM

All replies