hello world
Please update your feeds to point to
http//laurentschneider.com/feed
Oracle Certified Master
TCP.VALIDNODE_CHECKING = yes
TCP.INVITED_NODES = (dbclient001,chltlxlsc1)
$ sqlplus scott/tiger@lsc02
SQL*Plus: Release 10.1.0.4.2 - Production on Wed Nov 22 09:47:43 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
With the Partitioning option
JServer Release 9.2.0.8.0 - Production
$ sqlplus scott/tiger@lsc02
SQL*Plus: Release 10.1.0.4.2 - Production on Wed Nov 22 09:48:26 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-12547: TNS:lost contact
select person.name,
property.type,
property.value
from person, property
where
person.id=property.person;
NAME TYPE VALUE
---- -------- ------
John gender male
Mary category junior
Mary gender female
select name,
gender.value gender,
category.value category
from person,
property gender,
property category
where
person.id = gender.person(+)
and gender.type(+)='gender'
and person.id = category.person(+)
and category.type(+)='category';
NAME GENDER CATEGO
---- ------ ------
Mary female junior
John male
select name,
max(decode(type,'gender',value)) gender,
max(decode(type,'category',value)) category
from person , property
where person.id = property.person (+)
group by name;
NAME GENDER CATEGO
---- ------ ------
John male
Mary female junior
select deptno,
decode(x,1,'DNAME','LOC') type,
decode(x,1,dname,loc) value
from dept,
(select 1 x from dual union all
select 2 from dual);
DEPTNO TYPE VALUE
---------- ----- --------------
10 DNAME ACCOUNTING
20 DNAME RESEARCH
30 DNAME SALES
40 DNAME OPERATIONS
10 LOC NEW YORK
20 LOC DALLAS
30 LOC CHICAGO
40 LOC BOSTON
select name, type, value
from person , property
pivot (max(value)
for type in (
'gender' as gender,
'category' as category))
where person.id = property.person (+);
select *
from dept
unpivot (value
for type in (
dname as 'DNAME',
loc as 'LOC'));
AH/emctl stop agent
cd AH/sysman/emd
find state upload recv agntstmp.txt lastupld.xml protocol.ini -type f -exec rm {} \;
rm -r state/*
col TARGET_TYPE for a17
col TARGET_NAME for a60
set lin 100 pages 0 emb on newp none head on autop on
select TARGET_TYPE,TARGET_NAME
from MGMT$TARGET
where TARGET_TYPE='oracle_emd'
order by TARGET_NAME;
var target_name varchar2(40)
prompt Enter the target_name to delete
exec :target_name:='&TARGET_NAME';if (:target_name is not null) then mgmt_admin.cleanup_agent(:target_name); end if
vi AG/sysman/emd/targets.xml
### Get the source of the traditional vi
AH/emctl start agent
with t as (select
to_date('2000-02-01','YYYY-MM-DD') d1,
to_date('2000-01-23','YYYY-MM-DD') d2
from dual)
select d1,d2,d2-d1
from t;
D1 D2 D2-D1
---------- ---------- ----------
01.02.2000 23.01.2000 -9
with t as (select
to_date('2000-02-01 11:22:02',
'YYYY-MM-DD HH24:MI:SS') d1,
to_date('2000-01-23 12:00:03',
'YYYY-MM-DD HH24:MI:SS') d2
from dual)
select d1,d2,case
when d1extract(day from ((d2 - d1)
day to second))*24 +
extract(hour from ((d2 - d1)
day to second))||':'||
extract(minute from ((d2 - d1)
day to second))||':'||
extract(second from ((d2 - d1)
day to second))
when d1>d2 then
'-'||
(extract(day from ((d1 - d2)
day to second))*24 +
extract(hour from ((d1 - d2)
day to second)))||':'||
extract(minute from ((d1 - d2)
day to second))||':'||
extract(second from ((d1 - d2)
day to second))
when d1=d2 then
'0:0:0'
end "D2-D1"
from t
/
D1 D2 D2-D1
------------------- ------------------- ----------
01.02.2000 11:22:02 23.01.2000 12:00:03 -215:21:59
ORACLE_SID VERSION %CPU RSZ VSZ START_TIME
LSC01 10.2.0.2.0 0.0 12184 508448 10:09
LSC02 9.2.0.8.0 0.0 8420 303320 10:10
LSC03 9.2.0.8.0
+ LSC01 10.2.0.2.0
+ LSC02 9.2.0.8.0
- LSC03