Saturday, February 25, 2012

Certificate creation problem

Hello to all

I have two SQL 2005 server and I want to start mirroring a database.
Since there's no windows domain I'm trying to use certificates to grant connection between servers.

At this point I find some difficulties...

I've read on MSDN that 'active FOR begin_dialog = ON' option must be specified; look at the code below, when I execute I get following error:

Msg 156, Level 15, State 1, Line 8

Incorrect syntax near the keyword 'FOR'.


CREATE CERTIFICATE Polx

WITH SUBJECT = 'Mirror certificate',

START_DATE = '10/31/2001',

EXPIRY_DATE = '10/31/2009',

active FOR begin_dialog = ON;

GO

CREATE SYMMETRIC KEY Key1

WITH ALGORITHM = RC4

ENCRYPTION BY CERTIFICATE Polx

GO

Any suggestion will be really appreciated!!!

By the way, do I have to create same certificate on the mirror server after creating it on the master?

Thanks, Carlo

You should try removing the comma before the ACTIVE keyword. From my experience with database mirroring, however, I don't remember this clause being required. The certificate used for mirroring needs to exist on both the principal and the mirror.

Thanks
Laurentiu|||

Here's some additional information about setting up database mirroring. I hope this will help:

http://blogs.msdn.com/lcris/archive/2005/09/14/466268.aspx

Thanks
Laurentiu

No comments:

Post a Comment