Showing posts with label servers. Show all posts
Showing posts with label servers. Show all posts

Thursday, March 29, 2012

Database name

Is it indeed a requirement that database mirrors have the same name on a server? The reason I ask is that I have several servers with the same database name, and I'd like to mirror all of them to a single (disaster) server and, by necessity, have each mirror to a distinct db name.

Thanks

The database MUST have the same name on both the Principal and the Mirror. Mirroring will not work in your scenario unless you provide distinct names for the databases.

Tuesday, March 27, 2012

Database Mirroring with SQLEXPRESS as witness

I am trying to setup SQLServer 2005 to use Database Mirroring.
The principal and mirror servers are running on Windows2003 64bit edition.
The witness server is running Windows2003 32bit.
I have configured endpoints for both the principal and mirror but when I try
to setup SQLEXPRESS as the witness using...
create endpoint MirroringEndPoint
state=started
as tcp (listener_port=10111)
for database_mirroring (role=all)
I get..
Msg 7878, Level 16, State 4, Line 4
This "ROLE=PARTNER/ALL ENDPOINT" statement is not supported on this edition
of SQL Server.
SQLEXPRESS is SP2. I have tried the initial SQLEXPRESS release but then it
complains about mirroring not being supported in a production environment
which is why I have upgraded to SP2.
Best regards
MarkSorry, I misread. Specify role=witness, which is the only role supported for
Express Edition.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Mark Baldwin" <sWozzi3@.community.nospam> wrote in message
news:uBslxtVmHHA.3736@.TK2MSFTNGP03.phx.gbl...
>I am trying to setup SQLServer 2005 to use Database Mirroring.
> The principal and mirror servers are running on Windows2003 64bit edition.
The witness server is
> running Windows2003 32bit.
> I have configured endpoints for both the principal and mirror but when I t
ry to setup SQLEXPRESS
> as the witness using...
> create endpoint MirroringEndPoint
> state=started
> as tcp (listener_port=10111)
> for database_mirroring (role=all)
> I get..
> Msg 7878, Level 16, State 4, Line 4
> This "ROLE=PARTNER/ALL ENDPOINT" statement is not supported on this editio
n of SQL Server.
> SQLEXPRESS is SP2. I have tried the initial SQLEXPRESS release but then it
complains about
> mirroring not being supported in a production environment which is why I h
ave upgraded to SP2.
> --
> Best regards
> Mark
>|||You need standard or enterprise edition for mirroring. By the name of your i
nstance to judge, it is
express edition.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Mark Baldwin" <sWozzi3@.community.nospam> wrote in message
news:uBslxtVmHHA.3736@.TK2MSFTNGP03.phx.gbl...
>I am trying to setup SQLServer 2005 to use Database Mirroring.
> The principal and mirror servers are running on Windows2003 64bit edition.
The witness server is
> running Windows2003 32bit.
> I have configured endpoints for both the principal and mirror but when I t
ry to setup SQLEXPRESS
> as the witness using...
> create endpoint MirroringEndPoint
> state=started
> as tcp (listener_port=10111)
> for database_mirroring (role=all)
> I get..
> Msg 7878, Level 16, State 4, Line 4
> This "ROLE=PARTNER/ALL ENDPOINT" statement is not supported on this editio
n of SQL Server.
> SQLEXPRESS is SP2. I have tried the initial SQLEXPRESS release but then it
complains about
> mirroring not being supported in a production environment which is why I h
ave upgraded to SP2.
> --
> Best regards
> Mark
>|||Thanks, that seems to have sorted the problem out but I have another issue
with security now - still I shall leave that to another thread
Best regards
Mark
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OzTxF%23VmHHA.4768@.TK2MSFTNGP05.phx.gbl...
> Sorry, I misread. Specify role=witness, which is the only role supported
> for Express Edition.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Mark Baldwin" <sWozzi3@.community.nospam> wrote in message
> news:uBslxtVmHHA.3736@.TK2MSFTNGP03.phx.gbl...
>

Database Mirroring with SQLEXPRESS as witness

I am trying to setup SQLServer 2005 to use Database Mirroring.
The principal and mirror servers are running on Windows2003 64bit edition.
The witness server is running Windows2003 32bit.
I have configured endpoints for both the principal and mirror but when I try
to setup SQLEXPRESS as the witness using...
create endpoint MirroringEndPoint
state=started
as tcp (listener_port=10111)
for database_mirroring (role=all)
I get..
Msg 7878, Level 16, State 4, Line 4
This "ROLE=PARTNER/ALL ENDPOINT" statement is not supported on this edition
of SQL Server.
SQLEXPRESS is SP2. I have tried the initial SQLEXPRESS release but then it
complains about mirroring not being supported in a production environment
which is why I have upgraded to SP2.
--
Best regards
MarkSorry, I misread. Specify role=witness, which is the only role supported for Express Edition.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Mark Baldwin" <sWozzi3@.community.nospam> wrote in message
news:uBslxtVmHHA.3736@.TK2MSFTNGP03.phx.gbl...
>I am trying to setup SQLServer 2005 to use Database Mirroring.
> The principal and mirror servers are running on Windows2003 64bit edition. The witness server is
> running Windows2003 32bit.
> I have configured endpoints for both the principal and mirror but when I try to setup SQLEXPRESS
> as the witness using...
> create endpoint MirroringEndPoint
> state=started
> as tcp (listener_port=10111)
> for database_mirroring (role=all)
> I get..
> Msg 7878, Level 16, State 4, Line 4
> This "ROLE=PARTNER/ALL ENDPOINT" statement is not supported on this edition of SQL Server.
> SQLEXPRESS is SP2. I have tried the initial SQLEXPRESS release but then it complains about
> mirroring not being supported in a production environment which is why I have upgraded to SP2.
> --
> Best regards
> Mark
>|||You need standard or enterprise edition for mirroring. By the name of your instance to judge, it is
express edition.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Mark Baldwin" <sWozzi3@.community.nospam> wrote in message
news:uBslxtVmHHA.3736@.TK2MSFTNGP03.phx.gbl...
>I am trying to setup SQLServer 2005 to use Database Mirroring.
> The principal and mirror servers are running on Windows2003 64bit edition. The witness server is
> running Windows2003 32bit.
> I have configured endpoints for both the principal and mirror but when I try to setup SQLEXPRESS
> as the witness using...
> create endpoint MirroringEndPoint
> state=started
> as tcp (listener_port=10111)
> for database_mirroring (role=all)
> I get..
> Msg 7878, Level 16, State 4, Line 4
> This "ROLE=PARTNER/ALL ENDPOINT" statement is not supported on this edition of SQL Server.
> SQLEXPRESS is SP2. I have tried the initial SQLEXPRESS release but then it complains about
> mirroring not being supported in a production environment which is why I have upgraded to SP2.
> --
> Best regards
> Mark
>|||Thanks, that seems to have sorted the problem out but I have another issue
with security now - still I shall leave that to another thread
--
Best regards
Mark
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OzTxF%23VmHHA.4768@.TK2MSFTNGP05.phx.gbl...
> Sorry, I misread. Specify role=witness, which is the only role supported
> for Express Edition.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Mark Baldwin" <sWozzi3@.community.nospam> wrote in message
> news:uBslxtVmHHA.3736@.TK2MSFTNGP03.phx.gbl...
>>I am trying to setup SQLServer 2005 to use Database Mirroring.
>> The principal and mirror servers are running on Windows2003 64bit
>> edition. The witness server is running Windows2003 32bit.
>> I have configured endpoints for both the principal and mirror but when I
>> try to setup SQLEXPRESS as the witness using...
>> create endpoint MirroringEndPoint
>> state=started
>> as tcp (listener_port=10111)
>> for database_mirroring (role=all)
>> I get..
>> Msg 7878, Level 16, State 4, Line 4
>> This "ROLE=PARTNER/ALL ENDPOINT" statement is not supported on this
>> edition of SQL Server.
>> SQLEXPRESS is SP2. I have tried the initial SQLEXPRESS release but then
>> it complains about mirroring not being supported in a production
>> environment which is why I have upgraded to SP2.
>> --
>> Best regards
>> Mark
>

Sunday, March 25, 2012

Database Mirroring Monitor Job Error

We have recently set up two SQL Server 2005 Standard Edition servers with database mirroring. The mirrors function and fail over without a problem, but the Database Mirroring Monitor Job fails every time with the following error message:

Incorrect syntax near '.'. [SQLSTATE 42000] (Error 102) Incorrect syntax near the keyword 'with'. If this statement is a common table expression or an xmlnamespaces clause, the previous statement must be terminated with a semicolon. [SQLSTATE 42000] (Error 319). The step failed.

Both SQL Servers are running SP2 with the latest patches.

Can you please let me know what we have to do to resolve this issue?

Thank you!

Bosko

Is this been like this since the invocation of Database mirroring on these instances?

If not see what has been changed since the last successful occurence.

|||The problems started upon implementation of the database mirroring|||

I'm also facing the same issue.

Did anyone find a solution or workaround?

|||

I posted this in a couple different forums/newsgroups and never got an answer. We are still having this problem.

Bosko

Database Mirroring Monitor Job Error

We have recently set up two SQL Server 2005 Standard Edition servers with database mirroring. The mirrors function and fail over without a problem, but the Database Mirroring Monitor Job fails every time with the following error message:

Incorrect syntax near '.'. [SQLSTATE 42000] (Error 102) Incorrect syntax near the keyword 'with'. If this statement is a common table expression or an xmlnamespaces clause, the previous statement must be terminated with a semicolon. [SQLSTATE 42000] (Error 319). The step failed.

Both SQL Servers are running SP2 with the latest patches.

Can you please let me know what we have to do to resolve this issue?

Thank you!

Bosko

Is this been like this since the invocation of Database mirroring on these instances?

If not see what has been changed since the last successful occurence.

|||The problems started upon implementation of the database mirroringsql

Database Mirroring Error

When I configured database mirroring between two servers in separate DMZ regions, I get the following error on the principle server when I execute the ALTER DATABASE xxxxxxxx SET PARTNER = '****':

The server network address %%% can not be reached or does not exist. Check the network address name and reissue the command. (Microsoft SQL Server, Error: 1418)

Ports have been opened on both machines and I can TELNET both without any problems. I have included the steps that I used.

DATABASE MIRRORING TEST CONFIGURATION

SQL Server 2005 STD

Principal: AA-AAA-AA01
Mirror: BB-BBB-BB07


A. Create certificates for outbound connection on principal server. Refer to
http://msdn2.microsoft.com/en-us/library/ms186384.aspx.

1. In the master database, create a database Master Key.

M:\DBADM\MIRRORING\CREATE_MAST_KEY_ENCRY
USE master;
CREATE MASTER KEY ENCRYPTION BY PASSWORD = '<1_Strong_Password!>';
GO


2. In the master database, create an encrypted certificate on the server instance.

M:\DBADM\MIRRORING\CREATE_AA01_MIRRORING_CERT
USE master;
CREATE CERTIFICATE AA_AAA_AA01_MIRRORING_CERT
WITH SUBJECT = 'AA-AAA-AA01 certificate for database mirroring';
GO
SELECT * FROM SYS.CERTIFICATES
GO


3. Create an endpoint for the server instance using its certificate.

M:\DBADM\MIRRORING\CREATE_AA01_ENDPOINT
CREATE ENDPOINT Endpoint_Mirroring
STATE = STARTED
AS TCP (
LISTENER_PORT=5999
, LISTENER_IP = ALL
)
FOR DATABASE_MIRRORING (
AUTHENTICATION = CERTIFICATE AA_AAA_AA01_MIRRORING_CERT
, ENCRYPTION = REQUIRED ALGORITHM AES
, ROLE = ALL
);
GO


4. Back up the certificate to a file and securely copy it to the other system or systems.

M:\DBADM\MIRRORING\CREATE_AA01_CERT_BKUP
BACKUP CERTIFICATE AA_AAA_AA01_MIRRORING_CERT
TO FILE = 'M:\DBADM\MIRRORING\AA_AAA_AA01_MIRRORING_CERT_BKUP.cer';
GO


B. Create certificates for outbound connection on mirror server. Refer to
http://msdn2.microsoft.com/en-us/library/ms186384.aspx.

1. In the master database, create a database Master Key.

M:\DBADM\MIRRORING\CREATE_MAST_KEY_ENCRY
USE master;
CREATE MASTER KEY ENCRYPTION BY PASSWORD = '<1_Strong_Password!>';
GO


2. In the master database, create an encrypted certificate on the server instance.

M:\DBADM\MIRRORING\CREATE_BB07_MIRRORING_CERT
USE master;
CREATE CERTIFICATE BB_BBB_BB07_MIRRORING_CERT
WITH SUBJECT = 'BB-BBB-BB07 certificate for database mirroring';
GO
SELECT * FROM SYS.CERTIFICATES
GO


3. Create an endpoint for the server instance using its certificate.

M:\DBADM\MIRRORING\CREATE_BB07_ENDPOINT
CREATE ENDPOINT Endpoint_Mirroring
STATE = STARTED
AS TCP (
LISTENER_PORT=5999
, LISTENER_IP = PARNTER
)
FOR DATABASE_MIRRORING (
AUTHENTICATION = CERTIFICATE BB_BBB_BB07_MIRRORING_CERT
, ENCRYPTION = REQUIRED ALGORITHM AES
, ROLE = ALL
);
GO


4. Back up the certificate to a file and securely copy it to the other system or systems.

M:\DBADM\MIRRORING\CREATE_BB07_CERT_BKUP
BACKUP CERTIFICATE BB_BBB_BB07_MIRRORING_CERT
TO FILE = 'M:\DBADM\MIRRORING\BB_BBB_BB07_MIRRORING_CERT_BKUP.cer';
GO


C. Configure server instances inbound mirroring connections on principal server. Refer to
http://msdn2.microsoft.com/en-us/library/ms187671.aspx.


1. Create a login for other system.

M:\DBADM\MIRRORING\CREATE_BB07_LOGIN
USE master;
CREATE LOGIN BB07_MIRROR_ADMIN
WITH PASSWORD = '1Sample_Strong_Password!@.#';
GO

2. Create a user for that login.

M:\DBADM\MIRRORING\CREATE_BB07_USER
USE master;
CREATE USER BB07_MIRROR_ADMIN FOR LOGIN BB07_MIRROR_ADMIN;
GO

3. Obtain the certificate for the mirroring endpoint of the other server instance.

4. Associate the certificate with the user created in step 2.

M:\DBADM\MIRRORING\CREATE_BB07_USER_CERT_LINK
USE master;
CREATE CERTIFICATE BB_BBB_BB07_MIRRORING_CERT
AUTHORIZATION BB07_MIRROR_ADMIN
FROM FILE = 'M:\DBADM\MIRRORING\BB_BBB_BB07_MIRRORING_CERT_BKUP.cer'
GO


5. Grant CONNECT permission on the login for that mirroring endpoint.

M:\DBADM\MIRRORING\GRANT_BB07_LOG_ACCESS
USE master;
GRANT CONNECT ON ENDPOINT::Endpoint_Mirroring TO BB07_MIRROR_ADMIN;
GO


D. Configure server instances inbound mirroring connections on master server. Refer to
http://msdn2.microsoft.com/en-us/library/ms187671.aspx.


1. Create a login for other system.

M:\DBADM\MIRRORING\CREATE_AA01_LOGIN
USE master;
CREATE LOGIN AA01_MIRROR_ADMIN
WITH PASSWORD = '1Sample_Strong_Password!@.#';
GO

2. Create a user for that login.

M:\DBADM\MIRRORING\CREATE_AA01_USER
USE master;
CREATE USER AA01_MIRROR_ADMIN FOR LOGIN AA01_MIRROR_ADMIN;
GO

3. Obtain the certificate for the mirroring endpoint of the other server instance.

4. Associate the certificate with the user created in step 2.

M:\DBADM\MIRRORING\CREATE_AA01_USER_CERT_LINK
USE master;
CREATE CERTIFICATE AA_AAA_AA01_MIRRORING_CERT
AUTHORIZATION AA01_MIRROR_ADMIN
FROM FILE = 'M:\DBADM\MIRRORING\AA_AAA_AA01_MIRRORING_CERT_BKUP.cer'
GO


5. Grant CONNECT permission on the login for that mirroring endpoint.

M:\DBADM\MIRRORING\GRANT_AA01_LOG_ACCESS
USE master;
GRANT CONNECT ON ENDPOINT::Endpoint_Mirroring TO AA01_MIRROR_ADMIN;
GO


E. Back up the Principal Database and copy backup files to mirror server.


F. Restore the Principal Database on the standby database server (use NORECOVERY).


G. Configure the mirroring partners. Refer to http://msdn2.microsoft.com/en-us/library/ms191140.aspx.


1. On the mirror server instance on BB-BBB-BB07, set the server instance on AA-AAA-AA01 as the partner (making it the initial principal server instance).

M:\DBADM\MIRRORING\ACTIVATE_MIRROR_FOR_AA01
--At BB-BBB-BB07, set server instance on AA-AAA-AA01 as partner (principal server):
ALTER DATABASE BESmgmt
SET PARTNER = 'TCP://AA-AAA-AA01.mycompany.com:5999';
GO

2. On the principal server instance on AA-AAA-AA01, set the server instance on BB-BBB-BB07 as the partner (making it the initial mirror server instance).

M:\DBADM\MIRRORING\ACTIVATE_MIRROR_FOR_BB07

--At AA-AAA-AA01, set server instance on BB-BBB-BB07 as partner (mirror server).
ALTER DATABASE BESmgmt
SET PARTNER = 'TCP://BB-BBB-BB07.mycompany.com:5999';
GO

3. Execute the following SELECT on both servers to review mirroring information.

SELECT * FROM SYS.DATABASE_MIRRORING

Can ping both IP addresses and DNS names in both servers? If no, please try to add record in both networks DNS servers or add both SQL servers IP addresses in local hosts files (e.g. C:\Windows\System32\Drivers\Etc\hosts). Moreover, is it opened all SQL required ports in firewall? Detail information please refer to "How to: Configure a Firewall for SQL Server Access http://msdn2.microsoft.com/en-us/library/ms175043.aspx". Active Directory ports are required too.|||

Thanks for the info. During the meanwhile, I set up transactional replication.

|||

By the way, the servers have been added to the HOST files on each server. The ports appeared to be opened. I did a netstats -adn in the command prompt. I may stick with replication since I am on a tight deadline. I was hoping to get database mirroring to work in a short time since it appears to be easier in switching back and forth for failover scenerios.

Thanks again.

|||

Cause and Resolution of Database Engine Errors

http://msdn2.microsoft.com/en-us/library/aa337361.aspx

http://msdn2.microsoft.com/en-us/library/ms365262.aspx|||

Did you try to install two SQL servers in same network before?

|||

I wanted to first try going from server to server within the network but I could not find two server with similar configurations. So, I ended up testing database mirroring for the first time between two servers in their own DMZ space.

Thanks.

|||

I suggest you setup two testing servers in Virtual Environment, such as MS Virtual and VMware Server. It's free download and use. It easy to learn and test Database Mirroring.

Database Mirroring in SQL Server 2005

http://www.microsoft.com/technet/prodtechnol/sql/2005/dbmirror.mspx

Database mirroring setup in SQL Server 2005

http://searchsqlserver.techtarget.com/tip/0,289483,sid87_gci1199004,00.html?bucket=ETA&topic=301326

|||

Thanks. I will review the posted website.

|||

I finally got pass the 1418 error message. The problem was with the way the server name was configured and the HOSTS file on the C drive.

sql

Database Mirroring Error

When I configured database mirroring between two servers in separate DMZ regions, I get the following error on the principle server when I execute the ALTER DATABASE xxxxxxxx SET PARTNER = '****':

The server network address %%% can not be reached or does not exist. Check the network address name and reissue the command. (Microsoft SQL Server, Error: 1418)

Ports have been opened on both machines and I can TELNET both without any problems. I have included the steps that I used.

DATABASE MIRRORING TEST CONFIGURATION

SQL Server 2005 STD

Principal: AA-AAA-AA01
Mirror: BB-BBB-BB07


A. Create certificates for outbound connection on principal server. Refer to
http://msdn2.microsoft.com/en-us/library/ms186384.aspx.

1. In the master database, create a database Master Key.

M:\DBADM\MIRRORING\CREATE_MAST_KEY_ENCRY
USE master;
CREATE MASTER KEY ENCRYPTION BY PASSWORD = '<1_Strong_Password!>';
GO


2. In the master database, create an encrypted certificate on the server instance.

M:\DBADM\MIRRORING\CREATE_AA01_MIRRORING_CERT
USE master;
CREATE CERTIFICATE AA_AAA_AA01_MIRRORING_CERT
WITH SUBJECT = 'AA-AAA-AA01 certificate for database mirroring';
GO
SELECT * FROM SYS.CERTIFICATES
GO


3. Create an endpoint for the server instance using its certificate.

M:\DBADM\MIRRORING\CREATE_AA01_ENDPOINT
CREATE ENDPOINT Endpoint_Mirroring
STATE = STARTED
AS TCP (
LISTENER_PORT=5999
, LISTENER_IP = ALL
)
FOR DATABASE_MIRRORING (
AUTHENTICATION = CERTIFICATE AA_AAA_AA01_MIRRORING_CERT
, ENCRYPTION = REQUIRED ALGORITHM AES
, ROLE = ALL
);
GO


4. Back up the certificate to a file and securely copy it to the other system or systems.

M:\DBADM\MIRRORING\CREATE_AA01_CERT_BKUP
BACKUP CERTIFICATE AA_AAA_AA01_MIRRORING_CERT
TO FILE = 'M:\DBADM\MIRRORING\AA_AAA_AA01_MIRRORING_CERT_BKUP.cer';
GO


B. Create certificates for outbound connection on mirror server. Refer to
http://msdn2.microsoft.com/en-us/library/ms186384.aspx.

1. In the master database, create a database Master Key.

M:\DBADM\MIRRORING\CREATE_MAST_KEY_ENCRY
USE master;
CREATE MASTER KEY ENCRYPTION BY PASSWORD = '<1_Strong_Password!>';
GO


2. In the master database, create an encrypted certificate on the server instance.

M:\DBADM\MIRRORING\CREATE_BB07_MIRRORING_CERT
USE master;
CREATE CERTIFICATE BB_BBB_BB07_MIRRORING_CERT
WITH SUBJECT = 'BB-BBB-BB07 certificate for database mirroring';
GO
SELECT * FROM SYS.CERTIFICATES
GO


3. Create an endpoint for the server instance using its certificate.

M:\DBADM\MIRRORING\CREATE_BB07_ENDPOINT
CREATE ENDPOINT Endpoint_Mirroring
STATE = STARTED
AS TCP (
LISTENER_PORT=5999
, LISTENER_IP = PARNTER
)
FOR DATABASE_MIRRORING (
AUTHENTICATION = CERTIFICATE BB_BBB_BB07_MIRRORING_CERT
, ENCRYPTION = REQUIRED ALGORITHM AES
, ROLE = ALL
);
GO


4. Back up the certificate to a file and securely copy it to the other system or systems.

M:\DBADM\MIRRORING\CREATE_BB07_CERT_BKUP
BACKUP CERTIFICATE BB_BBB_BB07_MIRRORING_CERT
TO FILE = 'M:\DBADM\MIRRORING\BB_BBB_BB07_MIRRORING_CERT_BKUP.cer';
GO


C. Configure server instances inbound mirroring connections on principal server. Refer to
http://msdn2.microsoft.com/en-us/library/ms187671.aspx.


1. Create a login for other system.

M:\DBADM\MIRRORING\CREATE_BB07_LOGIN
USE master;
CREATE LOGIN BB07_MIRROR_ADMIN
WITH PASSWORD = '1Sample_Strong_Password!@.#';
GO

2. Create a user for that login.

M:\DBADM\MIRRORING\CREATE_BB07_USER
USE master;
CREATE USER BB07_MIRROR_ADMIN FOR LOGIN BB07_MIRROR_ADMIN;
GO

3. Obtain the certificate for the mirroring endpoint of the other server instance.

4. Associate the certificate with the user created in step 2.

M:\DBADM\MIRRORING\CREATE_BB07_USER_CERT_LINK
USE master;
CREATE CERTIFICATE BB_BBB_BB07_MIRRORING_CERT
AUTHORIZATION BB07_MIRROR_ADMIN
FROM FILE = 'M:\DBADM\MIRRORING\BB_BBB_BB07_MIRRORING_CERT_BKUP.cer'
GO


5. Grant CONNECT permission on the login for that mirroring endpoint.

M:\DBADM\MIRRORING\GRANT_BB07_LOG_ACCESS
USE master;
GRANT CONNECT ON ENDPOINT::Endpoint_Mirroring TO BB07_MIRROR_ADMIN;
GO


D. Configure server instances inbound mirroring connections on master server. Refer to
http://msdn2.microsoft.com/en-us/library/ms187671.aspx.


1. Create a login for other system.

M:\DBADM\MIRRORING\CREATE_AA01_LOGIN
USE master;
CREATE LOGIN AA01_MIRROR_ADMIN
WITH PASSWORD = '1Sample_Strong_Password!@.#';
GO

2. Create a user for that login.

M:\DBADM\MIRRORING\CREATE_AA01_USER
USE master;
CREATE USER AA01_MIRROR_ADMIN FOR LOGIN AA01_MIRROR_ADMIN;
GO

3. Obtain the certificate for the mirroring endpoint of the other server instance.

4. Associate the certificate with the user created in step 2.

M:\DBADM\MIRRORING\CREATE_AA01_USER_CERT_LINK
USE master;
CREATE CERTIFICATE AA_AAA_AA01_MIRRORING_CERT
AUTHORIZATION AA01_MIRROR_ADMIN
FROM FILE = 'M:\DBADM\MIRRORING\AA_AAA_AA01_MIRRORING_CERT_BKUP.cer'
GO


5. Grant CONNECT permission on the login for that mirroring endpoint.

M:\DBADM\MIRRORING\GRANT_AA01_LOG_ACCESS
USE master;
GRANT CONNECT ON ENDPOINT::Endpoint_Mirroring TO AA01_MIRROR_ADMIN;
GO


E. Back up the Principal Database and copy backup files to mirror server.


F. Restore the Principal Database on the standby database server (use NORECOVERY).


G. Configure the mirroring partners. Refer to http://msdn2.microsoft.com/en-us/library/ms191140.aspx.


1. On the mirror server instance on BB-BBB-BB07, set the server instance on AA-AAA-AA01 as the partner (making it the initial principal server instance).

M:\DBADM\MIRRORING\ACTIVATE_MIRROR_FOR_AA01
--At BB-BBB-BB07, set server instance on AA-AAA-AA01 as partner (principal server):
ALTER DATABASE BESmgmt
SET PARTNER = 'TCP://AA-AAA-AA01.mycompany.com:5999';
GO

2. On the principal server instance on AA-AAA-AA01, set the server instance on BB-BBB-BB07 as the partner (making it the initial mirror server instance).

M:\DBADM\MIRRORING\ACTIVATE_MIRROR_FOR_BB07

--At AA-AAA-AA01, set server instance on BB-BBB-BB07 as partner (mirror server).
ALTER DATABASE BESmgmt
SET PARTNER = 'TCP://BB-BBB-BB07.mycompany.com:5999';
GO

3. Execute the following SELECT on both servers to review mirroring information.

SELECT * FROM SYS.DATABASE_MIRRORING

Can ping both IP addresses and DNS names in both servers? If no, please try to add record in both networks DNS servers or add both SQL servers IP addresses in local hosts files (e.g. C:\Windows\System32\Drivers\Etc\hosts). Moreover, is it opened all SQL required ports in firewall? Detail information please refer to "How to: Configure a Firewall for SQL Server Access http://msdn2.microsoft.com/en-us/library/ms175043.aspx". Active Directory ports are required too.|||

Thanks for the info. During the meanwhile, I set up transactional replication.

|||

By the way, the servers have been added to the HOST files on each server. The ports appeared to be opened. I did a netstats -adn in the command prompt. I may stick with replication since I am on a tight deadline. I was hoping to get database mirroring to work in a short time since it appears to be easier in switching back and forth for failover scenerios.

Thanks again.

|||

Cause and Resolution of Database Engine Errors

http://msdn2.microsoft.com/en-us/library/aa337361.aspx

http://msdn2.microsoft.com/en-us/library/ms365262.aspx|||

Did you try to install two SQL servers in same network before?

|||

I wanted to first try going from server to server within the network but I could not find two server with similar configurations. So, I ended up testing database mirroring for the first time between two servers in their own DMZ space.

Thanks.

|||

I suggest you setup two testing servers in Virtual Environment, such as MS Virtual and VMware Server. It's free download and use. It easy to learn and test Database Mirroring.

Database Mirroring in SQL Server 2005

http://www.microsoft.com/technet/prodtechnol/sql/2005/dbmirror.mspx

Database mirroring setup in SQL Server 2005

http://searchsqlserver.techtarget.com/tip/0,289483,sid87_gci1199004,00.html?bucket=ETA&topic=301326

|||

Thanks. I will review the posted website.

|||

I finally got pass the 1418 error message. The problem was with the way the server name was configured and the HOSTS file on the C drive.

Database mirroring and raw partitions

I have several servers that I am setting up using raw disk partitions for th
e
data and log storage, and at the same time I am very interested in the new
database mirroring technology in SQL 2005. My question and problem is this,
I can get mirroring to work if I have the logs on a ntfs partition, but if I
place them on a raw partition the mirror goes into a suspended state and the
error logs have the following errors:
----
--
While acting as a mirroring partner for database 'RealTime', server instance
'DATA2' encountered error 5123, status 1, severity 16. Database mirroring
will be suspended. Try to resolve the error and resume mirroring.
Error: 1454, Severity: 16, State: 1.
CREATE FILE encountered operating system error 32(The process cannot access
the file because it is being used by another process.) while attempting to
open or create the physical file 'C:\DriveMapping\RealTime_Log_Disk3\'.
----
--
The raw partitions are set up using mapped folders on a ntfs partition, and
the database can execute queries 20-25% faster than an identical server I
have set up with the data and logs on NTFS partitions.Hi
As you can't do normal OS operations on a RAW partition it does not really
surprise me that this is not possible, but I have not found anything to say
that!!!
What was the sector size on the NTFS volume that did not perform?
John
"MDBVV" wrote:

> I have several servers that I am setting up using raw disk partitions for
the
> data and log storage, and at the same time I am very interested in the new
> database mirroring technology in SQL 2005. My question and problem is thi
s,
> I can get mirroring to work if I have the logs on a ntfs partition, but if
I
> place them on a raw partition the mirror goes into a suspended state and t
he
> error logs have the following errors:
> ----
--
> While acting as a mirroring partner for database 'RealTime', server instan
ce
> 'DATA2' encountered error 5123, status 1, severity 16. Database mirroring
> will be suspended. Try to resolve the error and resume mirroring.
> Error: 1454, Severity: 16, State: 1.
> CREATE FILE encountered operating system error 32(The process cannot acces
s
> the file because it is being used by another process.) while attempting to
> open or create the physical file 'C:\DriveMapping\RealTime_Log_Disk3'.
> ----
--
> The raw partitions are set up using mapped folders on a ntfs partition, an
d
> the database can execute queries 20-25% faster than an identical server I
> have set up with the data and logs on NTFS partitions.
>
>|||Hi
As you can't do normal OS operations on a RAW partition it does not really
surprise me that this is not possible, but I have not found anything to say
that!!!
What was the sector size on the NTFS volume that did not perform?
John
"MDBVV" wrote:

> I have several servers that I am setting up using raw disk partitions for
the
> data and log storage, and at the same time I am very interested in the new
> database mirroring technology in SQL 2005. My question and problem is thi
s,
> I can get mirroring to work if I have the logs on a ntfs partition, but if
I
> place them on a raw partition the mirror goes into a suspended state and t
he
> error logs have the following errors:
> ----
--
> While acting as a mirroring partner for database 'RealTime', server instan
ce
> 'DATA2' encountered error 5123, status 1, severity 16. Database mirroring
> will be suspended. Try to resolve the error and resume mirroring.
> Error: 1454, Severity: 16, State: 1.
> CREATE FILE encountered operating system error 32(The process cannot acces
s
> the file because it is being used by another process.) while attempting to
> open or create the physical file 'C:\DriveMapping\RealTime_Log_Disk3'.
> ----
--
> The raw partitions are set up using mapped folders on a ntfs partition, an
d
> the database can execute queries 20-25% faster than an identical server I
> have set up with the data and logs on NTFS partitions.
>
>

Database mirroring and raw partitions

I have several servers that I am setting up using raw disk partitions for the
data and log storage, and at the same time I am very interested in the new
database mirroring technology in SQL 2005. My question and problem is this,
I can get mirroring to work if I have the logs on a ntfs partition, but if I
place them on a raw partition the mirror goes into a suspended state and the
error logs have the following errors
-----
While acting as a mirroring partner for database 'RealTime', server instance
'DATA2' encountered error 5123, status 1, severity 16. Database mirroring
will be suspended. Try to resolve the error and resume mirroring.
Error: 1454, Severity: 16, State: 1.
CREATE FILE encountered operating system error 32(The process cannot access
the file because it is being used by another process.) while attempting to
open or create the physical file 'C:\DriveMapping\RealTime_Log_Disk3\'
-----
The raw partitions are set up using mapped folders on a ntfs partition, and
the database can execute queries 20-25% faster than an identical server I
have set up with the data and logs on NTFS partitions.Hi
As you can't do normal OS operations on a RAW partition it does not really
surprise me that this is not possible, but I have not found anything to say
that!!!
What was the sector size on the NTFS volume that did not perform?
John
"MDBVV" wrote:
> I have several servers that I am setting up using raw disk partitions for the
> data and log storage, and at the same time I am very interested in the new
> database mirroring technology in SQL 2005. My question and problem is this,
> I can get mirroring to work if I have the logs on a ntfs partition, but if I
> place them on a raw partition the mirror goes into a suspended state and the
> error logs have the following errors:
> -----
> While acting as a mirroring partner for database 'RealTime', server instance
> 'DATA2' encountered error 5123, status 1, severity 16. Database mirroring
> will be suspended. Try to resolve the error and resume mirroring.
> Error: 1454, Severity: 16, State: 1.
> CREATE FILE encountered operating system error 32(The process cannot access
> the file because it is being used by another process.) while attempting to
> open or create the physical file 'C:\DriveMapping\RealTime_Log_Disk3\'.
> -----
> The raw partitions are set up using mapped folders on a ntfs partition, and
> the database can execute queries 20-25% faster than an identical server I
> have set up with the data and logs on NTFS partitions.
>
>

Thursday, March 22, 2012

Database Mirroring - unable to mirror 59th database

As the subject suggests, I am unable to mirror my 59th database.
(2) database servers
HP ML370 G4
Dual Xeon 3.4Ghz, 8GB RAM
Windows 2003 R2 Enterprise
SQL Server 2005 Standard - patched to 2153
(1) watch server
HP DL 360 G4
Xeon 3Ghz, 2GB RAM
Win2k3 Standard
SQL Server Express - patched to 2153
I was able to restore the database and the transaction log to the desired
mirror. Then I indicated what the partner server should be (via T-SQL).
Then I switched to my SSMS query window that was connected to the primary
server and executed the commands to set the partner, mirror, and alter the
partner timeout.
The database was mirrored, but then I noticed a sign of trouble within the
Database Mirroring Monitor. One of the databases that was already being
mirrored switched status to "(Principal, Disconnected)"
I executed the following query to check the status:
select mirroring_state_desc, count(*)
From sys.database_mirroring
group by mirroring_state_desc
Here are the results:
mirroring_state_desc
-- --
NULL 60
DISCONNECTED 1
SYNCHRONIZED 58
I wanted to make sure that the database mirroring monitoring job (called by
SQL Server Agent) was not part of the problem, so I stopped monitoring by
calling this stored procedure: sp_dbmmonitordropmonitoring
and I waited... No change in status.
I decided to stop mirroring on the newly added database. I used the
following command to stop mirroring:
ALTER DATABASE foo SET PARTNER OFF
and the other database (the one that had a status of Principal, Disconnected
synchronized and came back online.
In researching the problem I discovered the following posts:
http://forums.microsoft.com/MSDN/showpost.aspx?postid=441900&siteid=1
http://groups.google.com/group/microsoft.public.sqlserver.server/browse_thread/thread/9211508f9b08072d/1de7d680cfd4d127?lnk=st&q=&rnum=2&hl=en#1de7d680cfd4d127
It seems as though others are having the same issue. How can I mirror more
databases on one server? This particular server has 120 databases and I
would like to get that number to 200 before we even start thinking about a
new server.
--
KeithMicrosoft recommends you limit the number of databases you are mirroring to
10 or so.
Based on the resource (memory and threads) utilization by database
mirroring, it is a best practices recommendation to mirror not more than 10
databases in one instance. The recommended limit of 10 is only approximate
and not an exact number. The limit can vary depending upon your application
and workload.
From -
http://www.microsoft.com/technet/prodtechnol/sql/2005/technologies/dbm_best_pract.mspx
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Keith_MSDN" <Keith_MSDN@.newsgroup.nospam> wrote in message
news:71B7CAFA-EAC2-4A1E-A781-0C8D479218AC@.microsoft.com...
> As the subject suggests, I am unable to mirror my 59th database.
> (2) database servers
> HP ML370 G4
> Dual Xeon 3.4Ghz, 8GB RAM
> Windows 2003 R2 Enterprise
> SQL Server 2005 Standard - patched to 2153
> (1) watch server
> HP DL 360 G4
> Xeon 3Ghz, 2GB RAM
> Win2k3 Standard
> SQL Server Express - patched to 2153
> I was able to restore the database and the transaction log to the desired
> mirror. Then I indicated what the partner server should be (via T-SQL).
> Then I switched to my SSMS query window that was connected to the primary
> server and executed the commands to set the partner, mirror, and alter the
> partner timeout.
> The database was mirrored, but then I noticed a sign of trouble within the
> Database Mirroring Monitor. One of the databases that was already being
> mirrored switched status to "(Principal, Disconnected)"
> I executed the following query to check the status:
> select mirroring_state_desc, count(*)
> From sys.database_mirroring
> group by mirroring_state_desc
> Here are the results:
> mirroring_state_desc
> -- --
> NULL 60
> DISCONNECTED 1
> SYNCHRONIZED 58
>
> I wanted to make sure that the database mirroring monitoring job (called
> by
> SQL Server Agent) was not part of the problem, so I stopped monitoring by
> calling this stored procedure: sp_dbmmonitordropmonitoring
> and I waited... No change in status.
>
> I decided to stop mirroring on the newly added database. I used the
> following command to stop mirroring:
> ALTER DATABASE foo SET PARTNER OFF
> and the other database (the one that had a status of Principal,
> Disconnected
> synchronized and came back online.
>
> In researching the problem I discovered the following posts:
> http://forums.microsoft.com/MSDN/showpost.aspx?postid=441900&siteid=1
> http://groups.google.com/group/microsoft.public.sqlserver.server/browse_thread/thread/9211508f9b08072d/1de7d680cfd4d127?lnk=st&q=&rnum=2&hl=en#1de7d680cfd4d127
> It seems as though others are having the same issue. How can I mirror
> more
> databases on one server? This particular server has 120 databases and I
> would like to get that number to 200 before we even start thinking about a
> new server.
> --
> Keith|||Hello Keith,
I understand that when you tried to configure more than 58 databases to
mirroring, it failed with disconnected status. If I'm off-base, please
let's know.
Based on my research, this issue seems to be related to virutal memory
allocation issue. Database mirroring sessions consume much virutal memroy
per session. You may want to check if you could find "Failed Virtual
Allocate Bytes" in SQL error log. If so, you may want to increase
memtoleave area by setting -g512 as start parameter to see if this could
workarond the issue. Please see the following article for details on
memeorytoleave area.
http://msdn2.microsoft.com/en-us/library/ms190737.aspx
You may also want to consider 64-bit as well, and This would only be an
issue on x86 due to memory limitation of X86 platform.
If this workaround does not meet your requirement, or you have any
concerns, please get SQL Error log, and send it to me at
petery@.microsoft.com, we will look into this problem further. We look
forward to your reply. Thank you!
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Community Support
==================================================Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications
<http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx>.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
<http://msdn.microsoft.com/subscriptions/support/default.aspx>.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Thanks Peter. Yes, I want to mirror more than 58 databases on one server.
Upgrading to 64 Bit version of SQL (and Windows) isn't an option at this
time.
I looked within the SQL Server Log on the primary, mirror, and witness and I
did NOT find the Failed Virtual Allocate Bytes error. I even used
AgentRansack to search all the log file in the directory. I could not find
any hits for failed virtual (or virtual).
When searching the log files on the mirror I noticed that There is one SQL
Dump in the directory. Let me know if you want me to email the information.
The .mdmp file is 10MB.
I will try increasing memtoleave via the -g startup param. I assume that I
will need to modify this value on the primary and the mirror, is that
correct? This solution will require downtime, so I need to get the ball
rolling on scheduling a brief outage.
Keith
"Peter Yang [MSFT]" wrote:
> Hello Keith,
> I understand that when you tried to configure more than 58 databases to
> mirroring, it failed with disconnected status. If I'm off-base, please
> let's know.
> Based on my research, this issue seems to be related to virutal memory
> allocation issue. Database mirroring sessions consume much virutal memroy
> per session. You may want to check if you could find "Failed Virtual
> Allocate Bytes" in SQL error log. If so, you may want to increase
> memtoleave area by setting -g512 as start parameter to see if this could
> workarond the issue. Please see the following article for details on
> memeorytoleave area.
> http://msdn2.microsoft.com/en-us/library/ms190737.aspx
> You may also want to consider 64-bit as well, and This would only be an
> issue on x86 due to memory limitation of X86 platform.
> If this workaround does not meet your requirement, or you have any
> concerns, please get SQL Error log, and send it to me at
> petery@.microsoft.com, we will look into this problem further. We look
> forward to your reply. Thank you!
> Best Regards,
> Peter Yang
> MCSE2000/2003, MCSA, MCDBA
> Microsoft Online Community Support
> ==================================================> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
> ications
> <http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx>.
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
> <http://msdn.microsoft.com/subscriptions/support/default.aspx>.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no rights.
>|||Hello Keith,
Yes. You shall use it on both primary and the mirror. As for dump file,
will you send me an email with the latest sql error log file at
petery@.microsoft.com, and I may provide a ftp workspace via your email
address so that you could upload the dump file. I will check if the issue
is related to database mirroring,
Since dump analysis has to be done by contacting Microsoft Product Support
Services. Therefore, we probably will not be able to resolve the issue
through the newsgroups. If we could solve the issue efficently in
newsgroup, I recommend that you open a Support incident with Microsoft
Product Support Services so that a dedicated Support Professional can
assist with this case. If you need any help in this regard, please let me
know.
For a complete list of Microsoft Product Support Services phone numbers,
please go to the following address on the World Wide Web:
http://support.microsoft.com/directory/overview.asp
If you have any update or questions, please feel free to let's know.
Thanks.
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================|||Peter, I modified the startup parameters on all three servers - primary,
mirror, and witness as you recommended (adding -g512 - separated from the
other params by a semicolon). I am still unable to add any more databases to
the mirroring setup on these boxes.
I just tried configuring a small database (13MB). When I issued the ALTER
DATABASE command on the mirror to specify the partner the command just ran
and ran and ran and ran. In fact, it is still running as I type this
message. It has been running for 38 minutes and counting.
I just tried calling Microsoft Support because I want to open a support case
for the problem that we are experiencing with mirroring. The response that I
received from the Microsoft employee who took my information was "We are only
offering support on database mirroring technologies to TAP customers."
I find this statement unbelievable. Database mirroring should be fully
supported by Microsoft now that SQL Server 2005 SP1 is out and the feature is
fully enabled without trace flags. I asked the support person (the one who
told me about the support for database mirroring) for their name - just in
case you need to do any followup with them.
Do you mind if I contact you at your Microsoft email address that you
provided so that we can get the ball rolling on finding a fix for this issue?
Thanks
--
Keith
"Peter Yang [MSFT]" wrote:
> Hello Keith,
> Yes. You shall use it on both primary and the mirror. As for dump file,
> will you send me an email with the latest sql error log file at
> petery@.microsoft.com, and I may provide a ftp workspace via your email
> address so that you could upload the dump file. I will check if the issue
> is related to database mirroring,
> Since dump analysis has to be done by contacting Microsoft Product Support
> Services. Therefore, we probably will not be able to resolve the issue
> through the newsgroups. If we could solve the issue efficently in
> newsgroup, I recommend that you open a Support incident with Microsoft
> Product Support Services so that a dedicated Support Professional can
> assist with this case. If you need any help in this regard, please let me
> know.
> For a complete list of Microsoft Product Support Services phone numbers,
> please go to the following address on the World Wide Web:
> http://support.microsoft.com/directory/overview.asp
> If you have any update or questions, please feel free to let's know.
> Thanks.
> Best Regards,
> Peter Yang
> MCSE2000/2003, MCSA, MCDBA
> Microsoft Online Partner Support
>
> =====================================================> This posting is provided "AS IS" with no warranties, and confers no rights.
> ======================================================>
>|||Hello Keith,
Thank you for your feedback. Please contact me at petery@.microsoft.com so I
could follow up the issue with you and I also think this shall be supported
by MS PSS. I look forward to your reply.
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================

Database Mirroring - 'NT AUTHORITY\ANONYMOUS LOGON.' failed

Hello,

I have set up 3 servers - Primary, Mirror and Witness. When I run the database mirroring wizard all my endpoints are configured, but when i start the mirroring service i get a 1418 error - in the logs in says -

Database Mirroring login attempt by user 'NT AUTHORITY\ANONYMOUS LOGON.' failed with error: 'Connection handshake failed. The login 'NT AUTHORITY\ANONYMOUS LOGON' does not have CONNECT permission on the endpoint. State 84.'. [CLIENT: 10.20.1.5]

I have looked through the BOL and can't find anything helpful. - I'm pretty new to SQL server, so any help is very much appreciated!

Thanks

Kerpoise

This is not a SQL problem but an authentication issue. The right approach is to follow the guidance of the authentication troubleshooting whitepaper: http://www.microsoft.com/technet/prodtechnol/windowsserver2003/technologies/security/tkerberr.mspx

HTH,
~ Remus

|||But why is my Primary server trying to logon as NT AUTHORITY/ANONYMOUS LOGON? When I have defined my logon through the Mirroring Wizard as a sysadmin account, with enabled Connect privileges on all servers.

I can't find a simple solution in the white paper. Isn't there a simple way to either - authenticate as a sysadmin account, or to allow NT AUTHORITY/ANONYMOUS to have CONNECT privileges to all servers?

It seems like this should be a very quick thing to do, but I really can't figure it out.

Please help!|||

Do not grant connect permission to ANONYMOUS LOGON.

When connecting the two instances what gets authenticated is the 'service account', the Windows account that runs the SQL Server instance. Depending on how you insnstalled the instances, the appropiate action is:
- if installed as 'LOCAL SERVICE': you must change the service account, it will never work. The SQL Management console in mmc has an option to change the service account, selecta different account.
- if installed as 'NETWORK SERVICE' or 'LocalSystem': you have to register the service SPN for Kerberos authentication to succeed. Use a tool like setspn.exe (available at microsoft download center) and register the SPN. Mirroring will use an SPN on the format 'MSSQLSvc/<partnername>:<partnerport>'. Also, make sure the AUTHENTICATION option on the mirroring endpoint is WINDOWS, WINDOWS NEGOTIATE or WINDOWS KERBEROS (in other words NTLM will not work). After registering the two SPNs (both for mirror and principal!), the authentication will resolve to the machine account ('DOMAIN\MachineName$'), you must create a login for this account and grant connect permission to it.
- if installed as a local account ('PrincipalMachine\LocalAccount' and/or 'MirrorMachine\LocalAccount'): it will not work, you must change the service account(s).
- if installed as domain account ('DOMAIN\UserName'), then it should work as long as both the mirror and the principal are in the same domain, or there is a trust relationship between their domains.

An alternative is to use certificate based authentication, then the whole domain/user/SPNs issue vanishes as the authentication will use a diferent protocol (SChannel's TLS).

HTH,
~ Remus

database mirroring - between 2 production servers

we are having 2 prodction servers in our environment.

and we are planning to perform database mirroring between them.i want to mirror server 1 databases to server2 and server 2 databases to server 1.

is this possible?

if possible , can any one give me a link to document where i can find more info on this, or send me the steps what i need to done for this...

thanks

Haven't we discussed this on SSP forums ?

The process of setting up database mirroing is documented in Books online, have you looked there?

|||

hi sathya,

i am really confused with the concept in my scenario.that's why i am posting everywhere...

i can establish the mirroring between the 2 servers with the principal and the mirror script you posted to me. like creating the certificate,master key and dbmirrorendpoint for principal and the mirror server seperately...

now my scenario is different , i alredy mirrored the prodcution databases to server2, and failed over to server 2(which is now acting as principal m server).

now we want to mrror thoese databases to our new 64 bit server, in that server shall i need to run mirror script or principal script....

because server 2 already having mirror script..

please help me out in this situation...

|||

Priya, from your question this is what i understood..........you have mirroring configured from server 1 to server 2 and you have failed over to server 2 so it has become the principal now..........then from server 2 you want to configure mirroring to someother server sql server .......it is possible.......i dunno abt the scripts you are talking abt......

|||

Yes this is possible ; For more information on configuring Database Mirroring refer Books Online.

HTH

Vishal

sql

Database Mirroring

Hello,

I'm having some troubles to set up database mirroring on Itanium II based servers.
I have 3 servers registered in the same domain (windows authentication)
I have created manually the endpoint and there are all 3 started (port 5022)
When I do the alter database set partner on the mirror site it works.
When I do it on the principal instance, I have the following error: Msg 1418 the server instance "TCP:itanium8.sql.net:5022" is not running or does not exist.
If I telnet to the port 5022 I have a reply.
SAme error if I try to set up the mirroring using the GUI (wizard). I am using CTP June.
Any ideas?
Thanks
Jerome

Just to add some additional info regarding my settings:
- SQLServer is started as a service user a domain account (SQL\administrator)
- all my endpoint are started. the role is set to ALL
- I use the fully qualified name for the settings
Jerome|||Jerome,

OK, here we go:
1. Testers have confirmed that they have setup mirroring on Itanium II servers.
2. the fact that the mirror suceeds is normal. all that command does is put the server in a "wait to be contacted" mode.
3. this is different from what Pamb sees in the other thread. there, mirroring was able to log in, but the server name information didn't correctly compare. this is different from what you have. in your case, the server wasn't allowed to log in at all.

so, can you telnet from each server to the other server? you imply that it works one way, but does it work both ways? you should be able to type 16 characters and the connection should close. that tells you that you are able to connect to the port.

your error message implies that you didn't specify the '//' on the input string. it is important that you include the '//' on the server name setup.

what is in the errorlog?

check security again.

thanks,
mark|||Mark,

Ok .. it seems first of all that there is no way to do the setup using the GUI/Wizard. I always get the error described above even if the endpoints are already defined and started. I have discover that for strange reason if I create endpoint using three differents port (I have three independant server so according to the doc I should be able to use the same port) it works but only using command line:
These are the steps I have to go through to have the mirror configured:

1- backup on the principal
2- restore on the mirror with norecovery
3 - create endpoint
principal: state= started port=5022 role=partner
mirror: state=started port=5023 role=partner
witness: state=started port=5024 role=witness
4 - setup the mirror
mirror site: alter db set partner='TCP://itanium8.sql.net:5022'
principal site:
alter db set partner='TCP://itanium9.sql.net:5023'
alter db set partner='TCP://itanium10.sql.net:5024'
But again no way to set it up with the wizard....
Thanks
Jerome

|||so, you should be able to setup and manage mirroring through the GUI/UI. i watch 800 attendees do it today at a conference.

you do have to backup/restore through a different channel.

you have to setup certificates through t-sql.

glad you got it to work.

mark|||Hello Mark,

1 -You do have to backup/restore through a different channel.
What do you mean by that?

2- you have to setup certificates through t-sql.
Event if all the three instances are registered in the same domain? The wizard does not do that for you? In the BOL: "For communication accross non-trusted domain you must use certificate ....." ... in the BOL "If you are setting up database mirroring on a domain, and all SQL Server instances use the same service login and password, you do not need to create logins on the server"

I just want to understand....
Thanks
Jerome

|||1. "by a different channel" means that you have to have backed up and restored the database before you begin the wizard.

2. sorry, what i meant is that if you plan on using certificates, then you must use t-sql. using the domain account in the domain is probably the best way. but if you want to run as a non-domain account or accross non-trusted domains, then you MUST use certificates.

mark

Database Mirroring

Im trying to get mirroring working go my endpoints set using the wizard,
the servers are called server1 and server2 when I trying to start
mirroring I get "specify the FQDN for each server, and click start
mirroring again" the computers see each other as server1 and server2 is
there away round this error ?You should follow the recommandation of the following topic on the Books on
Line:
SQL Server Database Engine -> Administering the Database Engine ->
Configuring High Availability -> Database Mirroring -> Setting Up Database
Mirroring -> Specifying a Server Network Address(Database Mirroring)
Gilberto
"sambino" wrote:

> Im trying to get mirroring working go my endpoints set using the wizard,
> the servers are called server1 and server2 when I trying to start
> mirroring I get "specify the FQDN for each server, and click start
> mirroring again" the computers see each other as server1 and server2 is
> there away round this error ?
>

Database Mirroring

Im trying to get mirroring working go my endpoints set using the wizard,
the servers are called server1 and server2 when I trying to start
mirroring I get "specify the FQDN for each server, and click start
mirroring again" the computers see each other as server1 and server2 is
there away round this error ?You should follow the recommandation of the following topic on the Books on
Line:
SQL Server Database Engine -> Administering the Database Engine ->
Configuring High Availability -> Database Mirroring -> Setting Up Database
Mirroring -> Specifying a Server Network Address(Database Mirroring)
Gilberto
"sambino" wrote:
> Im trying to get mirroring working go my endpoints set using the wizard,
> the servers are called server1 and server2 when I trying to start
> mirroring I get "specify the FQDN for each server, and click start
> mirroring again" the computers see each other as server1 and server2 is
> there away round this error ?
>

Wednesday, March 21, 2012

Database Mirror failover from Principal to Mirror

All,
I have two sql servers setup for Data Mirroring. when I do a failover to the
mirror server. The application can not connect to the database Mirror server
that has become the Principal server. I'm using sql authentication for the
application.
I have to drop the user in the Database and recreate it to allow it to
connnect to the database. Below is the error message:
The server principal "nyccs" is not able to access the database "jztest"
under the current security context.
What security context do I have to setup the data Mirror inorder to
automatically failover without any failures.
Thanks,
Naana.
Message posted via http://www.droptable.comHave you read and followed the info here?
http://msdn2.microsoft.com/en-us/library/ms177412.aspx
In specific, check this section:
http://msdn2.microsoft.com/en-us/library/ms366346.aspx
"Naana via droptable.com" wrote:

> All,
> I have two sql servers setup for Data Mirroring. when I do a failover to t
he
> mirror server. The application can not connect to the database Mirror serv
er
> that has become the Principal server. I'm using sql authentication for the
> application.
> I have to drop the user in the Database and recreate it to allow it to
> connnect to the database. Below is the error message:
> The server principal "nyccs" is not able to access the database "jztest"
> under the current security context.
> What security context do I have to setup the data Mirror inorder to
> automatically failover without any failures.
> Thanks,
> Naana.
> --
> Message posted via http://www.droptable.com
>

Sunday, March 11, 2012

database maintenance plan...

I'm running SQL 2000 on W2K on two servers. The DB maintenance is set to
automatically remove old transaction log backups. A couple of months ago,
the transaction log backups stop getting tossed. I don't think it has
anything to do with whether or not the db is set to do a simple backup.
I've split the dbs between different maintenance plans and have had no luck.
I'm thinking it has something to do with a hotfix because both SQL servers
had issues about the same time.
I didn't make any changes to any of the Dbs or the SQL server that I can
remember.
Do I need to register the SQL server with Active Directory? I upgraded the
network from NT4 to W2003 and AD.
Registering with AD should have no effect... Does the DBMaint Plan log show
any information?
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Chris Geiser" <glg.dell@.worldnet.att.net> wrote in message
news:%23CAcS9JaEHA.2792@.TK2MSFTNGP09.phx.gbl...
> I'm running SQL 2000 on W2K on two servers. The DB maintenance is set to
> automatically remove old transaction log backups. A couple of months ago,
> the transaction log backups stop getting tossed. I don't think it has
> anything to do with whether or not the db is set to do a simple backup.
> I've split the dbs between different maintenance plans and have had no
luck.
> I'm thinking it has something to do with a hotfix because both SQL servers
> had issues about the same time.
> I didn't make any changes to any of the Dbs or the SQL server that I can
> remember.
> Do I need to register the SQL server with Active Directory? I upgraded
the
> network from NT4 to W2003 and AD.
>

database maintenance plan...

I'm running SQL 2000 on W2K on two servers. The DB maintenance is set to
automatically remove old transaction log backups. A couple of months ago,
the transaction log backups stop getting tossed. I don't think it has
anything to do with whether or not the db is set to do a simple backup.
I've split the dbs between different maintenance plans and have had no luck.
I'm thinking it has something to do with a hotfix because both SQL servers
had issues about the same time.
I didn't make any changes to any of the Dbs or the SQL server that I can
remember.
Do I need to register the SQL server with Active Directory? I upgraded the
network from NT4 to W2003 and AD.Registering with AD should have no effect... Does the DBMaint Plan log show
any information?
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Chris Geiser" <glg.dell@.worldnet.att.net> wrote in message
news:%23CAcS9JaEHA.2792@.TK2MSFTNGP09.phx.gbl...
> I'm running SQL 2000 on W2K on two servers. The DB maintenance is set to
> automatically remove old transaction log backups. A couple of months ago,
> the transaction log backups stop getting tossed. I don't think it has
> anything to do with whether or not the db is set to do a simple backup.
> I've split the dbs between different maintenance plans and have had no
luck.
> I'm thinking it has something to do with a hotfix because both SQL servers
> had issues about the same time.
> I didn't make any changes to any of the Dbs or the SQL server that I can
> remember.
> Do I need to register the SQL server with Active Directory? I upgraded
the
> network from NT4 to W2003 and AD.
>

database maintenance plan...

I'm running SQL 2000 on W2K on two servers. The DB maintenance is set to
automatically remove old transaction log backups. A couple of months ago,
the transaction log backups stop getting tossed. I don't think it has
anything to do with whether or not the db is set to do a simple backup.
I've split the dbs between different maintenance plans and have had no luck.
I'm thinking it has something to do with a hotfix because both SQL servers
had issues about the same time.
I didn't make any changes to any of the Dbs or the SQL server that I can
remember.
Do I need to register the SQL server with Active Directory? I upgraded the
network from NT4 to W2003 and AD.Registering with AD should have no effect... Does the DBMaint Plan log show
any information?
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Chris Geiser" <glg.dell@.worldnet.att.net> wrote in message
news:%23CAcS9JaEHA.2792@.TK2MSFTNGP09.phx.gbl...
> I'm running SQL 2000 on W2K on two servers. The DB maintenance is set to
> automatically remove old transaction log backups. A couple of months ago,
> the transaction log backups stop getting tossed. I don't think it has
> anything to do with whether or not the db is set to do a simple backup.
> I've split the dbs between different maintenance plans and have had no
luck.
> I'm thinking it has something to do with a hotfix because both SQL servers
> had issues about the same time.
> I didn't make any changes to any of the Dbs or the SQL server that I can
> remember.
> Do I need to register the SQL server with Active Directory? I upgraded
the
> network from NT4 to W2003 and AD.
>

Thursday, March 8, 2012

Database Maintenance Plan Bug

We have an environment where we utilize master-target topology. When we
create a maintenance plan, we are able to add as many servers as we want.
After the plan is created, we are unable to add additional servers on the
master server, and when we open a plan, all the servers are unchecked. Does
anyone know if this is a bug, and if there is a patch to it? Does anyone know
how to add additional servers after the plan is created?
There are several issues with the MP in that it is not quite capable of
doing everything you would expect. This is a one I haven't heard before but
it is somewhat consistent with other bugs that I have seen. The MP wizard
gets it's information from several sources when you open the wizard. One is
the MP system tables and another is that it parses the command strings in
the jobs it creates. It is very likely it has troubles parsing master -
target type jobs. It should be pretty easy to create your own to do the
same thing though.
Andrew J. Kelly SQL MVP
"MikeS" <MikeS@.discussions.microsoft.com> wrote in message
news:DA16B809-ED8C-412C-83BE-A328637CFA25@.microsoft.com...
> We have an environment where we utilize master-target topology. When we
> create a maintenance plan, we are able to add as many servers as we want.
> After the plan is created, we are unable to add additional servers on the
> master server, and when we open a plan, all the servers are unchecked.
> Does
> anyone know if this is a bug, and if there is a patch to it? Does anyone
> know
> how to add additional servers after the plan is created?
|||We have a very large sql shop, and I would like to have an automated way to
know on which servers I have the maintenance plan rolled out. Could you
please provide an example, of what you mean "easy to create your own " I can
create a string which will build a plan, but it means I will have to "rerun
it" every time I need to add a new server. Is there a sufficient way of
creating this?
thank you
"Andrew J. Kelly" wrote:

> There are several issues with the MP in that it is not quite capable of
> doing everything you would expect. This is a one I haven't heard before but
> it is somewhat consistent with other bugs that I have seen. The MP wizard
> gets it's information from several sources when you open the wizard. One is
> the MP system tables and another is that it parses the command strings in
> the jobs it creates. It is very likely it has troubles parsing master -
> target type jobs. It should be pretty easy to create your own to do the
> same thing though.
> --
> Andrew J. Kelly SQL MVP
>
> "MikeS" <MikeS@.discussions.microsoft.com> wrote in message
> news:DA16B809-ED8C-412C-83BE-A328637CFA25@.microsoft.com...
>
>
|||Mike,
What I meant was that it is fairly easy to create custom jobs to do things
such as Backup, Reindex etc. Once you have the scripts it is again pretty
easy to deploy them to any server. You can use DMO or even oSql to issue
the commands to any server you connect to. You can also use DMO or oSql to
check for the existence of any job by simply running the proper query or
sp_helpJob etc. If you have that many servers where it becomes hard to
manage I have two suggestions. One is that you might want to consider
consolidating several servers into a single larger one. This can save costs
on licenses and hardware over many smaller servers. They are also easier to
maintain. But I highly recommend you look at a 3rd party product from
http://www.sqlsentry.net/ that can help you to manage your jobs at a much
more efficient way.
Andrew J. Kelly SQL MVP
"MikeS" <MikeS@.discussions.microsoft.com> wrote in message
news:B46E86CA-F89E-4E79-A796-32BF781A601C@.microsoft.com...[vbcol=seagreen]
> We have a very large sql shop, and I would like to have an automated way
> to
> know on which servers I have the maintenance plan rolled out. Could you
> please provide an example, of what you mean "easy to create your own " I
> can
> create a string which will build a plan, but it means I will have to
> "rerun
> it" every time I need to add a new server. Is there a sufficient way of
> creating this?
> thank you
> "Andrew J. Kelly" wrote: