Showing posts with label case. Show all posts
Showing posts with label case. Show all posts

Monday, March 26, 2012

Replication does not work properly

Hi,
I have a problem with rows deleted at subscriber could not get deleted at
publisher in particular case where article published say table1 has row
filter like
"SELECT <published_columns> FROM [dbo].[TABLE1]
WHERE ([FILED1]='XYZ ' OR [FIELD4]= 'XYZ ') and FIELD3 in(select
[FIELD3] from [TABLE2] A where A.[FIELD1]=[FIELD1] and A.[FIELD2]=[FIELD2] )"
Rest of the Articles published with simpler row filter works perfectly.
Please Reply,
Thanking You
fatiya
are both Table1 and Table2 published? are there any constraints between teh
two tables? Are you enforcing these constraints for replication? Cascading
Updates/Deletes?
Have you used the conflict viewer to see if there are any conflicts?
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
"Fatiya" <Fatiya@.discussions.microsoft.com> wrote in message
news:6A20CE4B-7D05-4202-BCEE-79AC26E28326@.microsoft.com...
> Hi,
> I have a problem with rows deleted at subscriber could not get deleted
at
> publisher in particular case where article published say table1 has row
> filter like
> "SELECT <published_columns> FROM [dbo].[TABLE1]
> WHERE ([FILED1]='XYZ ' OR [FIELD4]= 'XYZ ') and FIELD3 in(select
> [FIELD3] from [TABLE2] A where A.[FIELD1]=[FIELD1] and
A.[FIELD2]=[FIELD2] )"
> Rest of the Articles published with simpler row filter works perfectly.
> Please Reply,
> Thanking You
> fatiya
>
>
|||Dear Hilary
Thanks for reply
Yes both table 1 and table2 are published No there are no contrainst between
them
we have not used any cascading
We are getting replicaion conflicts that the row was inserted at subscriber
but
at publisher we are getting primary key constrains.
Please advice
Fatiya
"Hilary Cotter" wrote:

> are both Table1 and Table2 published? are there any constraints between teh
> two tables? Are you enforcing these constraints for replication? Cascading
> Updates/Deletes?
> Have you used the conflict viewer to see if there are any conflicts?
> --
> 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
> "Fatiya" <Fatiya@.discussions.microsoft.com> wrote in message
> news:6A20CE4B-7D05-4202-BCEE-79AC26E28326@.microsoft.com...
> at
> A.[FIELD2]=[FIELD2] )"
>
>
sql

Wednesday, March 21, 2012

Replication as backup

Hello All

We intend to replicate a database in order to have it as a near immediate
standby in case of the failure of the main server.

Is this the best solution for disaster recovery?

We are currently testing our replication plan. When we set up the
subscriber, a snapshot of the publisher is created and this takes hours. Is
there a better way?

My understanding is that a RAID array would help in the case of the failure
of a single disc in the server.

What about log shipping. How does log shipping work with identity columns?

Does anyone have any experience of this? Can you offer advice and guidance?

Regards

Ian"Ian Wyld" <ianwyld@.tiscali.co.uk> wrote in message
news:41507254_1@.mk-nntp-2.news.uk.tiscali.com...
> Hello All
> We intend to replicate a database in order to have it as a near immediate
> standby in case of the failure of the main server.
> Is this the best solution for disaster recovery?
> We are currently testing our replication plan. When we set up the
> subscriber, a snapshot of the publisher is created and this takes hours.
> Is
> there a better way?
> My understanding is that a RAID array would help in the case of the
> failure
> of a single disc in the server.
> What about log shipping. How does log shipping work with identity columns?
> Does anyone have any experience of this? Can you offer advice and
> guidance?
>
> Regards
> Ian

I don't really know from your description what you mean by "disaster
recovery" - this page covers some of the high-availability options you have
with MSSQL:

http://www.microsoft.com/sql/techin...vailability.asp

One issue with a replicated database as a standby is that if the primary
fails, then your applications need to be reconfigured with the new server
and database name; if you need failover which is transparent to your
clients, then clustering is the usual solution.

For information on optimizing the replication initial snapshot, see here:

http://www.microsoft.com/technet/pr...n/tranrepl.mspx

RAID will protect you against losing one or more disks, depending on the
configuration, as will a NAS or SAN, although MSSQL is only supported on
NAS/SAN solutions certified for it:

http://support.microsoft.com/defaul...1&Product=sql2k

Log shipping copies every transaction from one database to another by
copying transaction log backups and then restoring them. The secondary
database is always offline so the logs can be restored as they arrive from
the primary server - that means no changes can be made (it can't even be
read), so identity values aren't an issue. Log shipping also has the same
application reconfiguration issue as replication, of course.

Log shipping is a simple solution, but the secondary database is offline and
you would lose (at best) minutes of data if the primary goes down.
Replication is more complex, but the secondary database can be online, and
you can limit data loss to seconds rather than minutes. Clustering is
probably the most expensive solution, but you can lose a whole server and
still carry on with no interruption.

Simon|||Consider log shipping instead of replication if all you need it DR.

"Ian Wyld" <ianwyld@.tiscali.co.uk> wrote in message
news:41507254_1@.mk-nntp-2.news.uk.tiscali.com...
> Hello All
> We intend to replicate a database in order to have it as a near immediate
> standby in case of the failure of the main server.
> Is this the best solution for disaster recovery?
> We are currently testing our replication plan. When we set up the
> subscriber, a snapshot of the publisher is created and this takes hours.
> Is
> there a better way?
> My understanding is that a RAID array would help in the case of the
> failure
> of a single disc in the server.
> What about log shipping. How does log shipping work with identity columns?
> Does anyone have any experience of this? Can you offer advice and
> guidance?
>
> Regards
> Ian