Mirroring... a SQL Function to HATE.... Need help.

  • OK Basics:

    Two servers same domain.

    Service account is domain with local admin rights.

    Local admins have SA permissions. So basically, not a security problem for mirroring anyway.

    Script that is run (proper parts on proper machines. No Witness Server. So remarked out.

    -- 1. Configuring Endpoints

    ---------------------------------------------------------

    -- PRINCIPLE: Set Recovery Model Full

    ---------------------------------------------------------

    selectrecovery_model_desc, *

    fromsys.databases

    wherename = 'DB1'

    --USE master;

    --GO

    --ALTER DATABASE DB1

    --SET RECOVERY FULL;

    --GO

    ---------------------------------------------------------

    -- PRINCIPLE: Create EndPoint

    ---------------------------------------------------------

    CREATE ENDPOINT MirroringEndPoint_DB1

    STATE=STARTED

    AS TCP (LISTENER_PORT=7024)

    FOR DATABASE_MIRRORING (ROLE=ALL) -- Enabled as Partner only

    GO

    ---------------------------------------------------------

    -- MIRROR: Create EndPoint

    ---------------------------------------------------------

    CREATE ENDPOINT MirroringEndPoint_DB2

    STATE=STARTED

    AS TCP (LISTENER_PORT=7024)

    FOR DATABASE_MIRRORING (ROLE=ALL) -- Enabled as Partner only

    GO

    ---------------------------------------------------------

    -- ALL: inspect Endpoints

    ---------------------------------------------------------

    SELECT *

    FROM sys.database_mirroring_endpoints;

    -- 2. Move the Mirrored DB from the Principle to the Mirror

    Backed up and restored with NO Recovery.

    -- 3. Setup Mirroring Partnerships

    ---------------------------------------------------------

    -- MIRROR: Partner MIRROR with PRINCIPLE

    ---------------------------------------------------------

    ALTER DATABASE [DB1]

    SET PARTNER =

    'TCP://SERVERDB2.APPLICATION.Local:7024'

    GO

    -- Up to this point no errors.

    ---------------------------------------------------------

    -- PRINCIPLE: Partner PRINCIPLE with MIRROR

    ---------------------------------------------------------

    ALTER DATABASE [DB1]

    SET PARTNER = 'TCP://SERVERDB1.APPLICATION.Local:7024'

    GO

    NOW we get the error.

    Msg 1418, Level 16, State 1, Line 1

    The server network address "TCP://SERVERDB1.APPLICATION.Local:7024" can not be reached or does not exist. Check the network address name and that the ports for the local and remote endpoints are operational.

    Ping works

    Telnet SERVERDB1 7024 works.

    Tear it all apart and use wizard ... fails

    Tear it all apart and type by hand ... fails

    Notice DB was restored to mirror with no recovery.

    Accounts used are domain admin accounts

    I RDP to the machine to run the scripts ... Fails

    I SSMS to the machines and run the scripts ... fails

    I can not go to the machines as they are in Europe.

    I have also tried with certificates, local accounts only and SA (yes SQL authentication is enabled).

    Last thing,

    The icon for Database Mirroring endpoint is PINK. :w00t:

    Raymond Laubert
    Exceptional DBA of 2009 Finalist
    MCT, MCDBA, MCITP:SQL 2005 Admin,
    MCSE, OCP:10g

  • Looking at SQL Logs I found this:

    2010-04-07 23:45:12.29 spid29s Database mirroring connection error 4 'An error occurred while receiving data: '64(The specified network name is no longer available.)'.' for 'TCP://SERVERDB1.APPLICATION.Local:7024'.

    And if I run the Start Mirroring from the

    Database Properties I get:

    2010-04-07 23:56:36.94 spid29s Database mirroring connection error 4 'An error occurred while receiving data: '10054(An existing connection was forcibly closed by the remote host.)'.' for 'TCP://SERVERDB1.APPLICATION.local:7024'.

    Raymond Laubert
    Exceptional DBA of 2009 Finalist
    MCT, MCDBA, MCITP:SQL 2005 Admin,
    MCSE, OCP:10g

  • OK, just to be clear, the Service Acct for SQL Server on both servers is the SAME account, correct? I know it's in the same domain, but I wanted to verify that it's the same account on each server.

  • Yes it is the same account with Domain Admin and SQL Admin rights.

    Also, it is now working as it should be. Don't know what changed but the next morning everything worked the first time.

    Raymond Laubert
    Exceptional DBA of 2009 Finalist
    MCT, MCDBA, MCITP:SQL 2005 Admin,
    MCSE, OCP:10g

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply