In the production environment, we have set a HADR solution for the whole database. Now, we would like to exclude some tables from this solution (HADR) and not sync with the secondary database.
my version is db2 luw 10.1.
What are some possible steps to exclude some tables from the HADR?
-
Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.Community– Community Bot2023年03月27日 08:22:17 +00:00Commented Mar 27, 2023 at 8:22
-
@Community i guess now it's better!Vasileios G– Vasileios G2023年03月27日 08:42:35 +00:00Commented Mar 27, 2023 at 8:42
-
1I don't think you can since it ships all tx logs over to the HADR server and replays them there. What problem are you trying to solve?Lennart - Slava Ukraini– Lennart - Slava Ukraini2023年03月27日 12:09:14 +00:00Commented Mar 27, 2023 at 12:09
-
@Lennart-SlavaUkraini i have a stored procedure that before setting up the HADR run for 1 hours and eventually over the months, raied its time to 27 hours. in test environment, after rebinding the procedure, it went back to one hour as it was but in production this didn't happen. all the indexes are OK plans are OK. this is one of the things that i want to test. if this HADR affects this proc.Vasileios G– Vasileios G2023年03月27日 12:27:09 +00:00Commented Mar 27, 2023 at 12:27
-
1You can "invalidate" some tables on HADR Standby by running, say, non-recoverable "load insert" (from /dev/null) on them. You must place these tables to some distinct set of tablespaces to not affect other tables. You must recreate these tables on Standby when it becomes Primary, since these tables will be in the "drop pending" state there. Please, test this approach carefully before running it in production.Mark Barinstein– Mark Barinstein2023年03月27日 13:39:26 +00:00Commented Mar 27, 2023 at 13:39
1 Answer 1
What are some possible steps to exclude some tables from the HADR?
Move those tables to a separate database and don't configure HADR for that database.
-
this is not good for my case, as these tables are getting some data from time to time. they are not main tables i wanted to state.Vasileios G– Vasileios G2023年03月27日 12:28:58 +00:00Commented Mar 27, 2023 at 12:28
-
1The answer is technically correct. All logged transactions get replayed on the standby, there is no ability to selectively choose which tables are highly available, except by arranging that those tables are not in your Db2 database. Your peformance problems with a stored procedure are caused most likely by either or both poor coding or poor access-plans and sub-optimal configs.mao– mao2023年03月27日 12:55:24 +00:00Commented Mar 27, 2023 at 12:55
-
this is now more clear @mao.Vasileios G– Vasileios G2023年03月27日 13:07:08 +00:00Commented Mar 27, 2023 at 13:07