Groups | Blog | Home
all groups > sql server replication > january 2006 >

sql server replication : Replication subscriber views, locks and blocks.



Hilary Cotter
1/12/2006 10:00:16 AM
Yes they can. You might want to consider using indexed views depending on
your version and edition of SQL Server.

--
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

[quoted text, click to view]

Frank N via SQLMonster.com
1/12/2006 2:38:44 PM
Quick question, do views on the subscription server create locking and
blocking issues?

I have 2 servers set-up with transactional replication. We have scheduled
reports running on the subscribing server, most of those reports using views.
The views seem to create performance, locking and blocking issues.

Thank you very much in advance.

--
Paul Ibison
1/12/2006 3:23:02 PM
A (non-dirty) read of data takes out a shared lock and this is not peculiar
to views. If these views are used for reporting purposes, you might want to
have a replica to be used for reporting eg using transactional replication,
or database mirroring with database snapshots.
Alternatively you could allow dirty reads (NOLOCK) on the tables in
question - depends on the business constraints.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

Frank N via SQLMonster.com
1/12/2006 11:43:33 PM
So if we place (nolock) hints on all the tables in all the views that should
eliminate the locking?

[quoted text, click to view]

--
Paul Ibison
1/13/2006 8:56:54 AM
Yes - or more easily set the transaction isolation-level to read
uncommitted.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

AddThis Social Bookmark Button