Materialized view refresh - ORA-02019: connection description for remote database not found.

Please could you help me with an Oracle 9i materialized view issue.

I have materialized views setup on a laptop and a refresh group.
The database link is setup and working (tested via SQLPLUS select sysdate from dual@dblink)

However, the refresh hangs when run. I can see the session on the oracle server and it's displaying an error when running the statement for the first MV: -

ORA-02019: connection description for remote database not found.

Sorry if I haven't posted enough information - I am new to materialized view's!

We have another laptop which is setup the same way (as far as I can see) which refreshes fine!

Any assistance gratefully appreciated.
Who is Participating?
Col_GConnect With a Mentor Author Commented:
Thank you sdstuber for your help, this is now resolved.

In the end I created a test database C05TEST on the laptop and ran a full import from another working database C03 which created all the MV's, DB Links etc.
I then truncated the tables and imported the table data from the old problem database C05 via a db link. Tested the refresh on C05TEST - all OK!
I then dropped the old problem database C05,  recreated it and ran a full import from the Test database.
Tested the refresh which worked OK but when we actually inputted new data via the app and ran another refresh the new data was overwritten, so it was not being passed to the main server before the refresh (we had this option selected on the refresh).
Turned out it didn't have a propagator, so registered MVADMIN as the propagator - EXECUTE DBMS_DEFER_SYS.REGISTER_PROPAGATOR(username => 'MVADMIN')
This enabled me to create the Materialized View group which was also missing.
Re-tested - all OK.

A bit of a ‘round the houses’ approach and would like to have known what was up with the original database but a least it's working and the laptop is back out in the field.

Thanks again for your assistance.

the owner of the materialized view needs to own the database link or the link needs to be public.
Col_GAuthor Commented:
Thank you for your reply, I have checked the link & it's a public link.

All the posts I found seem to point to the link but I have checked & double checked this & appears correct. Is there anything else i can try?
Never miss a deadline with

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

there must be something else that isn't being seen

can you post the exact query you used  and the results of

select * from dba_db_links
Chakravarthi AyyalaDatabase AdministratorCommented:
In the materialized view creation, are you using FORCE or FAST?
Col_GAuthor Commented:
We are using FAST.

The results of SELECT * FROM DBA_DB_LINKS are in the attached file DBLinks.txt.

The MV's and Refresh Group are owned by user CAL.

As there are 3 DB Links will it default to the one owned by CAL or use the Public view?

When I tested the links I logged in as both SYS and MVADMIN and ran: -
Both returned the date

Thank you for your assistance.
FAST vs COMPLETE vs FORCE is irrelevant for the error you are getting

It will use the one owned by CA.  What happens when you test using CAL?

What is the MV query?
Col_GAuthor Commented:
The laptop is temp unavailable so I'll test the CAL link tomorrow but the MV Query is as follows: -


When I ran the refresh and checked the sessions on the Oracle server I could see the session which was trying to execute this statement. It was this sessions that displayed the ORA-02019 error.
The session was showing the following as the current SQL...

Hope this helps
Col_GAuthor Commented:

I have logged into SQLPlus as user CAL and run: -

select sysdate from dual@sdir.gemco.local which returned the SYSDATE OK.

I then removed the public link and re-ran the above which returned ORA-02019: connection description for remote database not found.

I dropped the CAL DB Link and recreated with username & passsword for CAL and the correct service_name. I re-ran the select script which returned the SYSDATE.

I then ran the Refresh group (still logged in as CAL) exec dbms_refresh.refresh('CAL_UPDATE') but it appears to hang and it creates no session on the main oracle server.

Any more ideas?

what is the wait event for the hung session?
Col_GAuthor Commented:
Provided my own work around to the problem.
Root cause of the initials issue was never found.
All Courses

From novice to tech pro — start learning today.