Showing posts with label replication. Show all posts
Showing posts with label replication. Show all posts

Wednesday, March 21, 2012

Encrypting data across replication

We are looking at setting up peer-to-peer transactional replication between two databases. We have a customer requirement to encrypt the SSN in this database. I have configured replication successfully. I have also successfully encrypted the SSN using a symmetric key (with encryption by certificate). What I haven't done yet is set up encryption to work across a replication topology.

What steps would I have to follow in order to be able to encrypt the SSN on one server, replicate it to the subscriber, and then decrypt the SSN on the subscriber? For this scenario, is there a better way to handle encryption other than a symmetric key encrypted by a certificate?

The most important thing is to set up your encryption key so that you can manually recreate it on the subscriber. The setup must be manual, because replication will only work for the content of the tables, not for the keys used to encrypt that content. Have a look at this post for additional information: http://blogs.msdn.com/lcris/archive/2006/07/06/658364.aspx.

Thanks
Laurentiu

|||As a followup question, I have one field -- SSN -- that appears in several tables. I also have another field that needs to be encrypted. Is there any "rule of thumb" to use when deciding whether to create separate certificates/symmetric keys for each of these fields?

Encrypting data across replication

We are looking at setting up peer-to-peer transactional replication between two databases. We have a customer requirement to encrypt the SSN in this database. I have configured replication successfully. I have also successfully encrypted the SSN using a symmetric key (with encryption by certificate). What I haven't done yet is set up encryption to work across a replication topology.

What steps would I have to follow in order to be able to encrypt the SSN on one server, replicate it to the subscriber, and then decrypt the SSN on the subscriber? For this scenario, is there a better way to handle encryption other than a symmetric key encrypted by a certificate?

The most important thing is to set up your encryption key so that you can manually recreate it on the subscriber. The setup must be manual, because replication will only work for the content of the tables, not for the keys used to encrypt that content. Have a look at this post for additional information: http://blogs.msdn.com/lcris/archive/2006/07/06/658364.aspx.

Thanks
Laurentiu

|||As a followup question, I have one field -- SSN -- that appears in several tables. I also have another field that needs to be encrypted. Is there any "rule of thumb" to use when deciding whether to create separate certificates/symmetric keys for each of these fields?

Wednesday, March 7, 2012

Enabling Replication Question

Can I enable replication from a different server that has Enterprise
Manager install than the one that hosts the SQL database without any
problems or side effects?
I cannot enable replication from my server (Server A) hosting SQL
Server because the registration name is (local) instead of the server
name. Yes I know I can delete the registration and re-register it
with the server name BUT my ERP software vendor warns me by doing I
will break some of their core processing functionality because it
relies on the SQL Server registration name.
So to avoid this problem my though would be to enable replication from
(Server B) that has SQL Server Enterprise Manager installed and points
to Server A. My question is this - Can I successfully enable
replication through this process or will I encounter other problems or
create other issues?
I'm running SQL Server 2000.
Thanks for any information, comments or generally better ideas!Hi,
You can register server A in the Enterprise Manager on ANY machine
that has Enterprise Manager (and network access) -- including server B
-- and set up replication, or any other SQL administration tasks, on
server A.
Ken
On Feb 21, 5:31 pm, "dfrazell" <dfraz...@.estoneworks.com> wrote:
> Can I enable replication from a different server that has Enterprise
> Manager install than the one that hosts the SQL database without any
> problems or side effects?
> I cannot enable replication from my server (Server A) hosting SQL
> Server because the registration name is (local) instead of the server
> name. Yes I know I can delete the registration and re-register it
> with the server name BUT my ERP software vendor warns me by doing I
> will break some of their core processing functionality because it
> relies on the SQL Server registration name.
> So to avoid this problem my though would be to enable replication from
> (Server B) that has SQL Server Enterprise Manager installed and points
> to Server A. My question is this - Can I successfully enable
> replication through this process or will I encounter other problems or
> create other issues?
> I'm running SQL Server 2000.
> Thanks for any information, comments or generally better ideas!|||On Feb 21, 9:36 pm, "KenJ" <kenjohn...@.hotmail.com> wrote:[vbcol=seagreen]
> Hi,
> You can register server A in the Enterprise Manager on ANY machine
> that has Enterprise Manager (and network access) -- including server B
> -- and set up replication, or any other SQL administration tasks, on
> server A.
> Ken
> On Feb 21, 5:31 pm, "dfrazell" <dfraz...@.estoneworks.com> wrote:
>
>
>
>
>
So to clarify - I can enable replication on Server A from Server B
regardless of the SQL registration name of Server A without any side
effects?
Thanks - Dave|||As the server name of Server A will be the correct one when looking from
Server B's enterprise manager, I see no problems here provided you have a
sysadmin user. Some of the settings are local to the ServerA though (eg the
distribution working folder) so you might want to use a remote desktop as
well to set up the necessary share.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com

Enabling Replication Question

Can I enable replication from a different server that has Enterprise
Manager install than the one that hosts the SQL database without any
problems or side effects?
I cannot enable replication from my server (Server A) hosting SQL
Server because the registration name is (local) instead of the server
name. Yes I know I can delete the registration and re-register it
with the server name BUT my ERP software vendor warns me by doing I
will break some of their core processing functionality because it
relies on the SQL Server registration name.
So to avoid this problem my though would be to enable replication from
(Server B) that has SQL Server Enterprise Manager installed and points
to Server A. My question is this - Can I successfully enable
replication through this process or will I encounter other problems or
create other issues?
I'm running SQL Server 2000.
Thanks for any information, comments or generally better ideas!Hi,
You can register server A in the Enterprise Manager on ANY machine
that has Enterprise Manager (and network access) -- including server B
-- and set up replication, or any other SQL administration tasks, on
server A.
Ken
On Feb 21, 5:31 pm, "dfrazell" <dfraz...@.estoneworks.com> wrote:
> Can I enable replication from a different server that has Enterprise
> Manager install than the one that hosts the SQL database without any
> problems or side effects?
> I cannot enable replication from my server (Server A) hosting SQL
> Server because the registration name is (local) instead of the server
> name. Yes I know I can delete the registration and re-register it
> with the server name BUT my ERP software vendor warns me by doing I
> will break some of their core processing functionality because it
> relies on the SQL Server registration name.
> So to avoid this problem my though would be to enable replication from
> (Server B) that has SQL Server Enterprise Manager installed and points
> to Server A. My question is this - Can I successfully enable
> replication through this process or will I encounter other problems or
> create other issues?
> I'm running SQL Server 2000.
> Thanks for any information, comments or generally better ideas!|||On Feb 21, 9:36 pm, "KenJ" <kenjohn...@.hotmail.com> wrote:
> Hi,
> You can register server A in the Enterprise Manager on ANY machine
> that has Enterprise Manager (and network access) -- including server B
> -- and set up replication, or any other SQL administration tasks, on
> server A.
> Ken
> On Feb 21, 5:31 pm, "dfrazell" <dfraz...@.estoneworks.com> wrote:
> > Can I enable replication from a different server that has Enterprise
> > Manager install than the one that hosts the SQL database without any
> > problems or side effects?
> > I cannot enable replication from my server (Server A) hosting SQL
> > Server because the registration name is (local) instead of the server
> > name. Yes I know I can delete the registration and re-register it
> > with the server name BUT my ERP software vendor warns me by doing I
> > will break some of their core processing functionality because it
> > relies on the SQL Server registration name.
> > So to avoid this problem my though would be to enable replication from
> > (Server B) that has SQL Server Enterprise Manager installed and points
> > to Server A. My question is this - Can I successfully enable
> > replication through this process or will I encounter other problems or
> > create other issues?
> > I'm running SQL Server 2000.
> > Thanks for any information, comments or generally better ideas!
So to clarify - I can enable replication on Server A from Server B
regardless of the SQL registration name of Server A without any side
effects?
Thanks - Dave|||As the server name of Server A will be the correct one when looking from
Server B's enterprise manager, I see no problems here provided you have a
sysadmin user. Some of the settings are local to the ServerA though (eg the
distribution working folder) so you might want to use a remote desktop as
well to set up the necessary share.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com

Sunday, February 26, 2012

Enabling "not for replication" contraint on a mass level

HI,
sql server 2000,uni directional transaction replication with initial
snapshot . Can not be simpler than this.
My database has around 100 tables and ever time i setup replication, i have
to make sure that none of the referential integrity constraints are copied
over to the subscriber because they are not set for "not for replication".
And if i want to set it up , i might have to go to each and every table and
specify this contraint. My questions are
1. is there any way i can have all the referential integrity contraints on
the subscriber and still not have "not for replication" checked?
2. if the answer is NO , then is there any way , any script i could use to
mass update all the PKs\ FKs with "Not For Replication" constraint?
Thanks
Muzammil
AFAIK - there is no way of doing this - but why do you want to enforce DRI
on the subscriber? Normally the subscriber is read only.
Hilary Cotter
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
"sameer" <sameer@.discussions.microsoft.com> wrote in message
news:34ACBAE1-9F82-46CB-B844-B5B68F2B4798@.microsoft.com...
> HI,
> sql server 2000,uni directional transaction replication with initial
> snapshot . Can not be simpler than this.
> My database has around 100 tables and ever time i setup replication, i
have
> to make sure that none of the referential integrity constraints are copied
> over to the subscriber because they are not set for "not for replication".
> And if i want to set it up , i might have to go to each and every table
and
> specify this contraint. My questions are
> 1. is there any way i can have all the referential integrity contraints on
> the subscriber and still not have "not for replication" checked?
> 2. if the answer is NO , then is there any way , any script i could use to
> mass update all the PKs\ FKs with "Not For Replication" constraint?
> Thanks
> Muzammil
|||Hilary, thanks for you response.
Yes even though the subscriber is read only , but the client just can not
accept that the database does not have any referencial integrity contraints.
I still can not beleive that there is no way i could write down a script to
get every table from Sysobjects , find the referential integrity contraints
and append the "not for replication" contraints on them. Please suggest.
Thanks
Muzammil
"Hilary Cotter" wrote:

> AFAIK - there is no way of doing this - but why do you want to enforce DRI
> on the subscriber? Normally the subscriber is read only.
> --
> Hilary Cotter
> 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
> "sameer" <sameer@.discussions.microsoft.com> wrote in message
> news:34ACBAE1-9F82-46CB-B844-B5B68F2B4798@.microsoft.com...
> have
> and
>
>

Sunday, February 19, 2012

Enable logging for merge agent

Hi,
how can I enable output logging for merge agent if subscriptions type is
anonymous (merge replication between sql server 2000 and sql server ce 2.0)?
Marius,
logging is a bit different with CE. Have a look at the section entitled SQL Server CE Server Agent Logging on this MSDN page:http://msdn.microsoft.com/library/de...bleconnect.asp
HTH,
Paul Ibison

Friday, February 17, 2012

Empty Tables at subscriber without error messages with Transactional Replication

Hi,
I use a transactional replication and sometimes I realize that all or
some tables at subscriber are empty but the agent history don't log any
error message. All the informations at the publisher is ok. This
morning, I looked to the data at 10AM and all was fine but an hour
after some tables was empty. The snapshot doesn't start and no one use
the subscriber's database.
Any ideas?
Patrick Simard
Patrick - do you have access to Log Explorer or similar tools? It might be
worht investigating the subscriber logs. Typically I've fond a developer
process responsible for this type of thing, or a cascade trigger which
shouldn't exist on the subscriber.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .

Wednesday, February 15, 2012

Empty Log files and Data files

Hi!
I'm using replication with two database on SQL 2000,when begin, the log files size is 50mb and the data files size is 150mb. But now the log files size is 2Gb and the data files size is 4Gb. I would like to decrease the log files and the data files ? How do i do this?
(I using Truncate and shrink doesn't change )
Thanks!!!For log file, after replicating, take a full backup of your database, then truncate log.. This must reduce the log file..

I have no other idea about reducing the data file size.

Regards|||Is this on the source, destination or distribution?
Backup the log or change the recovery model to simple then shrink the log.

For data - shrink the data file.

Are you sure that the data is replicating and it's not building up because transactions can't be cleared?
That would end up with a lot of data in the distribution database and log space used.