Refreshing Materialized View [message #686659] |
Sun, 13 November 2022 21:21  |
chat2raj.s
Messages: 161 Registered: October 2010 Location: Chennai, India
|
Senior Member |
|
|
Dear Sir,
I have created a materialized view with COMPLETE refresh on DEMAND and trying to refresh it and the status is showing as RUNNING without any end or termination to the refreshing. The view on which the MV is created has reference to tables from remote database.
I tried to create a table with the same query and the table got created without any errors which the MV is just in RUNNING status for ever.
How should i debug the issue further.
Thank you
|
|
|
Re: Refreshing Materialized View [message #686662 is a reply to message #686659] |
Tue, 15 November 2022 01:11   |
John Watson
Messages: 8881 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
You could start by seeing if the refresh is actually running or hanging. THis will list all sessions that are hanging, and why:select username,event,seconds_in_wait from v$session where wait_class <> 'Idle';
|
|
|
|
|
Re: Refreshing Materialized View [message #687485 is a reply to message #687484] |
Thu, 16 March 2023 01:45   |
chat2raj.s
Messages: 161 Registered: October 2010 Location: Chennai, India
|
Senior Member |
|
|
I am using a DBMS scheduler job to refresh all my MV's and the status of this job is now RUNNING nearly 24 hrs while i tried to create a table with the same query and it is created in 45 min.
username event seconds_in_wait
CTCOFF SQL*Net message to client 0
CTCOFF db file scattered read 0
|
|
|
Re: Refreshing Materialized View [message #687486 is a reply to message #687485] |
Thu, 16 March 2023 02:04   |
chat2raj.s
Messages: 161 Registered: October 2010 Location: Chennai, India
|
Senior Member |
|
|
I found now in USER_SCHEDULER_JOB_RUN_DETAILS the job is already stopped within 35 min with error message as REASON="Job slave process was terminated" while the USER_SCHEDULER_JOBS was still showing RUNNING until now. Further I need to check the alert log to get more information on why did the job terminate.
|
|
|
|
|
|
|
|
Re: Refreshing Materialized View [message #687498 is a reply to message #687497] |
Tue, 21 March 2023 07:58  |
chat2raj.s
Messages: 161 Registered: October 2010 Location: Chennai, India
|
Senior Member |
|
|
When i executed the same query to create a table, it is done in 45 min while i try to refresh the MV it just remains RUNNING. I found a way to avoid using database links by replicating those transactions in this same schema and by this way the MV is refreshing quickly in 5 min.
|
|
|