%D0%92%D0%B5%D1%80%D0%BE%D0%BD%D0%B8%D0%BA%D0%B0 %D0%A2%D1%8E%D1%80%D0%B8%D0%BD%D0%B0, February 06, 2018 - 2:26 pm UTC
Do I need recreate materialized view, if I will recreate synonym with the same(old) name?
February 06, 2018 - 4:19 pm UTC
What do you mean? Run "create or replace synonym..."?
What happens to your MV when you recreate the synonym?
May need to rebuild MV
Pete, February 07, 2018 - 12:48 am UTC
My past experience has been that materialized view and synonym dependencies are based on the object id in the data dictionary, not the object name, so if you rebuild a source table, view, or synonym, you have no choice to rebuild the materialized view as well even if everything has the same names.
February 07, 2018 - 10:39 am UTC
That's likely yes. It depends on what exactly they're doing though...
%D0%92%D0%B5%D1%80%D0%BE%D0%BD%D0%B8%D0%BA%D0%B0 %D0%A2%D1%8E%D1%80%D0%B8%D0%BD%D0%B0, February 07, 2018 - 8:27 am UTC
What do you mean? Run "create or replace synonym..."?
Yes.
For example:
at first I created synonym "MySynonym"
CREATE OR REPLACE SYNONYM "LOCAL_SCHEMA"."MySynonym" FOR "OTHER_SCHEMA"."MyTable";
then I will recreate synonym "MySynonym"
CREATE OR REPLACE SYNONYM "LOCAL_SCHEMA"."MySynonym" FOR "MyTable"@"MyDBLink";
What happens to your MV when you recreate the synonym?
I do not know, what will happen with MV.
February 07, 2018 - 10:38 am UTC
Have you tried running the "create or replace synonym..."? What happened?
%D0%92%D0%B5%D1%80%D0%BE%D0%BD%D0%B8%D0%BA%D0%B0 %D0%A2%D1%8E%D1%80%D0%B8%D0%BD%D0%B0, February 07, 2018 - 11:06 am UTC
MView can not be fast refreshed after that.
February 07, 2018 - 11:21 am UTC
Then you'll have to re-create the MV!