select
a.sid,
a.serial#,
b.sql_text
from
v$session a,
v$sqlarea b
where
a.sql_address=b.address
and a.username='SCHEMA';
mercredi 28 décembre 2011
mardi 27 décembre 2011
Oracle - Afficher les commentaires de table
SELECT * FROM USER_TAB_COMMENTS where table_name='TABLE_NAME';
lundi 26 décembre 2011
Oracle - Automatic enabling constraints
begin
for i in (select constraint_name, table_name from user_constraints) LOOP
execute immediate 'alter table '||i.table_name||' disable constraint '||i.constraint_name;
end loop;
end;
/
for i in (select constraint_name, table_name from user_constraints) LOOP
execute immediate 'alter table '||i.table_name||' disable constraint '||i.constraint_name;
end loop;
end;
/
Oracle - Automatique Disabling constraints
begin
for i in (select constraint_name, table_name from user_constraints) LOOP
execute immediate 'alter table '||i.table_name||' disable constraint '||i.constraint_name||' cascade';
end loop;
end;
/
for i in (select constraint_name, table_name from user_constraints) LOOP
execute immediate 'alter table '||i.table_name||' disable constraint '||i.constraint_name||' cascade';
end loop;
end;
/
mardi 6 décembre 2011
SYSTEM - Suivi Mémoire AIX -Process Oracle par version
#!/bin/bash
export TotMem=$(bootinfo -r)
ps uax | awk 'BEGIN { totv8=0; totv9=0; total=0; } \
END { PctV9=totv9/ENVIRON["TotMem"]*100; \
PctV8=totv8/ENVIRON["TotMem"]*100; \
print "Total=" total, "Oracle9=" totv9 " (Soit " PctV9 "%) Oracle8=" totv8 " (Soit " PctV8 "%)" } \
/ora92/ { totv9+=$6; } \
/ora81/ { totv8+=$6; } \
{ total+=$6; }'
export TotMem=$(bootinfo -r)
ps uax | awk 'BEGIN { totv8=0; totv9=0; total=0; } \
END { PctV9=totv9/ENVIRON["TotMem"]*100; \
PctV8=totv8/ENVIRON["TotMem"]*100; \
print "Total=" total, "Oracle9=" totv9 " (Soit " PctV9 "%) Oracle8=" totv8 " (Soit " PctV8 "%)" } \
/ora92/ { totv9+=$6; } \
/ora81/ { totv8+=$6; } \
{ total+=$6; }'
Inscription à :
Articles (Atom)