troubleshooting Question

try to check the instance's status

Avatar of bibi92
bibi92Flag for France asked on
Oracle Database
17 Comments1 Solution407 ViewsLast Modified:
Hello,

I try to check the instance status before executing the package dbms_utility bu it doesn't work :
set feedback off
set trimspool on
set tab off
variable v_key varchar2(2000)
declare
v_ins varchar2(200);
v_db varchar2(200);
v_status varchar2(200);
begin
select instance_name into v_ins from v`$instance;
select name into v_db from v`$database;
:v_key:=lower(v_ins||'.'||v_db||'.${_HOST}');
select status into v_status from v`$instance;
if v_status!='MOUNTED' then
sys.dbms_utility.is_cluster_database;
:v_key:=lower(v_db||'.'||v_db||'.'||v_db);
end if;

end;
/
How can I modify this?

Thanks

bibi
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 17 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 17 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros