|
There is a backup database B, which will not be open to us until the backup is complete, but sometimes it will not open for that day.
I have a database A, and a DBLINK to database B is built on A.
Run an application on A, and use the data of B, such as:
select * from all_tables @ B
How can I tell if database B is already available, I tried using an exception, as follows:
declare
aa number (10);
begin
select count (*) into aa from all_tables @ B where rownum <2;
exception
when others then
dbms_output.put_line ('Database is not ready');
end;
But it failed to catch, and the error reported was ORA-00942: The table or view does not exist.
I wonder if there is any other way? consult. |
|