replication design
-
Dienstag, 12. Februar 2013 18:43we are planning to replicate database for reporting purpose and we need to restrict data based on companyID
we are not supposed to replicate any data that is greater than companyID five.(campanyid >5)
we have total of 50 tables and out of which companyID exists on 30 tables and I can easily apply row filter to filter the data by companyID on these tables but the other 20 tables doesnt have companyid but those tables have information of all companies.
What is the best way to replicate other 20 tables data without sending restrcited data? I do have a way to get data of companies <5 but I need to apply multiple joins depending on tables.
As I cant apply joins with other tables at row filter level ,what are my possible options?
I thought of following options but not sure if they are possible
1) alter the default I/D/U procedures by joining them with other tables to only replicate required data.
I am not sure if above option works but wondering how I can generate intial snaphot with this solution.
2)
Planning to create functions and use at row filter level but not sure if I can use functions at row filter level in replication. Yet to test this solution
3) replciate all data to reporting system and create views in top of tables to restrict data.
I dont think its a ideal solution
Please advice if you think of any better solution...
any advice is really appreicated...
Alle Antworten
-
Dienstag, 12. Februar 2013 19:01Moderator
You shoudl be able to create indexes views of these tables where you restrict data based on join conditions to the tables which have the companyid column.
Then replicated the indexed views to base tables on the subscriber.
looking for a book on SQL Server 2008 Administration? http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search? http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941
-
Dienstag, 12. Februar 2013 20:01
Thanks Cotter.
we are planning to use following model.
publisher ----trans repl ----->subscriber/publisher(reporting environment- 1) ----trans repl---->subscriber(reporting environment -2)
will be there any performance impact on creating indexed views on subcriber and in our case which also acts as a publisher to another server
-
Dienstag, 12. Februar 2013 21:28ModeratorWhy can't you replicate from Publisher to Subscriber 1 and Subscriber 2?
looking for a book on SQL Server 2008 Administration? http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search? http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941
-
Mittwoch, 13. Februar 2013 14:26
First of all, I really appreciate your timely response.
I dont need to filter data for subscriber -1 and need to filter data for subscriber-2, To avoid load on core oltp publisher I am planning to use subscriber-1 as a publisher to subscriber -2.
-
Mittwoch, 13. Februar 2013 15:57Moderator
Can you possibly show us what such a filter would look like?
Would the upstream filter be the same as the downstream filter?looking for a book on SQL Server 2008 Administration? http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search? http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941

