Database Mirror Problem

  • Hi To all,

    I m Facing the problem to mirroring database.Currently i m working on the sql server 2005 developer edition.

    I follow these step .

    On Server side

    1.Add ;-T1400 in Start up Parameter in advance property in sql service.

    2.ALTER DATABASE SET SAFETY FULL;

    3.ALTER DATABASE

    SET RECOVERY FULL;

    GO

    4.CREATE ENDPOINT

    STATE=STARTED

    AS TCP (LISTENER_PORT=7022)

    FOR DATABASE_MIRRORING (ROLE=PARTNER)

    GO

    5.GRANT CONNECT ON ENDPOINT:: TO [loginname];

    GO

    6.ALTER DATABASE

    SET PARTNER = 'TCP://dimatserver:7022'

    GO

    7.USE

    GO

    BACKUP DATABASE

    TO DISK = WITH FORMAT,

    MEDIANAME = 'Z_SQLServerBackups',

    NAME = 'Full Backup of testmirror';

    GO

    8.ALTER ENDPOINT

    FOR DATA_MIRRORING (ROLE = PARTNER, ENCRYPTION = SUPPORTED)

    >>>>>>>>>>>>>> But when i Execute 6. query it does not find the path.

    all other query executed successfully.

    on client side

    1.BACKUP database testmirror TO DISK='D:\database\Backup\TestMirror_FULL.bak'

    2.backup log testmirror to disk='D:\database\Backup\TestMirror_log.bak' with no_truncate

    3.restore database testmirror from disk='D:\database\Backup\TestMirror_FULL.bak'

    with norecovery

    4.RESTORE LOG TestMirror from disk='D:\database\Backup\TestMirror_LOG.bak' with norecovery

    5.CREATE ENDPOINT Endpoint_Mirroring

    STATE=STARTED

    AS TCP (LISTENER_PORT=7022)

    FOR DATABASE_MIRRORING (ROLE=ALL)

    GO

    ----------

    6.GRANT CONNECT ON ENDPOINT::Endpoint_Mirroring TO [loginid];

    GO

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

    7.ALTER DATABASE testmirror

    SET PARTNER =

    'TCP://Pankaj:7022'

    GO

    8.ALTER ENDPOINT endpoint_mirroring

    FOR DATA_MIRRORING (ROLE = PARTNER, ENCRYPTION = SUPPORTED)

    >>>>>>>>>>>>>>>>>>> here all query executed success fully.

    And I have also off the firewall on both side. and also check the port connection by using telnet command.

    but still i m not able to mirror database.

    Please give me suggestion.

    Thanks in advance.

  • It's hard to say without knowing the exact order you are running your steps in.

    What problems/error are you seeing exactly?

    The Redneck DBA

  • Jason Shadonix (8/18/2009)


    It's hard to say without knowing the exact order you are running your steps in.

    What problems/error are you seeing exactly?

    when i execute the query

    ALTER DATABASE

    SET PARTNER = 'TCP://dimatserver:7022'

    GO

    then it generate the error-

    Msg 1418, Level 16, State 1, Line 1

    The server network address "TCP://dimatserver:7022" can not be reached or does not exist. Check the network address name and reissue the command.

    and when i click on start mirroring then it generate the error-

    The server network address "TCP://DIMATSERVER:7022" can not be reached or does not exist. Check the network address name and reissue the command. (.Net SqlClient Data Provider)

  • This may be part of the issue, If you run SQL Server under a non-domain account, you must use certificates

    I'd say start over

    Drop everything, and attempt to configure with this guide http://msdn.microsoft.com/en-us/library/ms191140.aspx

    DROP EVERYTHING

    --Drop Endpoint

    SELECT * from sys.endpoints

    DROP endpoint

    --Drop certificates

    SELECT * from sys.certificates

    DROP certificate

    DROP certificate

    --drop user

    SELECT * from sys.sysusers

    DROP user

    --drop login

    SELECT * from sys.syslogins

    DROP login

    --drop master key

    SELECT * from sys.symmetric_keys

    DROP MASTER KEY

    --ignore these closing tags

  • hi,

    I have follow the step which you have mention, but still i m facing the same problem.

    when i execute the given query

    ALTER DATABASE testmirror

    SET PARTNER = 'TCP://dimatserver:7024';

    GO

    it generated the error:

    The server network address "TCP://Pankaj: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. (.Net SqlClient Data Provider).

    Please Help.

  • do what you can to verify the network connection...maybe try to telnet to that port.

    You can also try to setup that with the IP address vs. the hostname.

    if you ping that hostname does it resolve? Do you have that hostname in the hosts file?

  • Hi,

    I ran into similar problems a year or so back, but I don't recall the exact error messages (yours look very familiar). When I went through the setup, I took notes and compiled a document outlining my steps. I've attached that document to this post. I really hope it will help you.

    Also, if someone has anything to add to it, that would be great too!

    Thanks.

  • Make sure you restore the full from the same bak on both the principle and the mirror then take a trn on the principle xfer it and restore on the mirror.

    That link I posted earlier has always worked for me.

  • Jon.Morisi (8/19/2009)


    do what you can to verify the network connection...maybe try to telnet to that port.

    You can also try to setup that with the IP address vs. the hostname.

    if you ping that hostname does it resolve? Do you have that hostname in the hosts file?

    I Had also tried to check whether the network address is correct or not by using telnet.

    it successfully ping by telnet. connection established display.

    Can you Please Tell me whether i m using the right sequence or not.

  • I'm not sure what you mean by

    ...the right sequence or not.

    The MSDN article I referenced will take you through step by step.

    you may be able to ping the box...but can you connect to the port you've configured? That's why I suggested telnetting to the IP and port.

  • From the error log, it seems the server is trying to contact wrong port

    The server network address "TCP://Pankaj: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. (.Net SqlClient Data Provider).

    Instead of 7024, it should be 7022. You should be able change this port from GUI.

  • Try changing you loggin on the SQL service. Both instances should login with domain user that have rights on the other server and have right to SQL server. Add the account to both servers as system admin and see if that works. If so you know that it is a rights issue on the network.

    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    Do not reinvent the wheel.
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

  • I am following all your steps but I have a new problem with the next step in both servers:

    Create certificate Emanifest_cert

    Authorization Emanifest_user

    From file = 'E:\OptimaBackup\emanifest_cert.cer';

    GO

    Msg 15208, Level 16, State 1, Line 1

    The certificate, asymmetric key, or private key file does not exist or has invalid format.

    The file already exists, so I don't know what to do, any idea?

Viewing 13 posts - 1 through 12 (of 12 total)

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