Thursday 7 April 2011

Linux : Faster file transfer via ssh and tar compression

time scp  ARCHIVE_01.dbf oracle@remote.server.com:/b04/volbackupnew/oradata/NEWDEV5/dataguard/test
real    41m5.699s

time tar cvfz - ARCHIVE_01.dbf | ssh oracle@remote.server.com "tar zxvf - --directory /b04/volbackupnew/oradata/NEWDEV5/dataguard/test "
real    0m57.987s

Saturday 2 April 2011

Jira : Dragging issues direct from the (Oracle) db

col c1 format a900
set lines 2000 pages 0 head off long 2000 longchunksize 2000 wrap on trimspool on trim on


with base_data as (
select
i.id iid,
-1 aid,
to_char('######### '||i.pkey ||' - '||i.assignee ||' - '||i.summary || ' #########') c1
from jira_dbo.jiraissue i
where 1=1
and i.assignee like 'data%'
union all
select
i.id iid,
0 aid,
to_char(substr(i.DESCRIPTION,0,1000)) c1
from jira_dbo.jiraissue i
where 1=1
and i.assignee like 'data%'
union all
select
i.id,
a.id,
to_char(substr(a.ACTIONBODY,0,1000)) c1
from  jira_dbo.JIRAISSUE i,
jira_dbo.jiraaction a
where 1=1
and a.issueid = i.id
and i.assignee like 'data%'
)
select c1 from base_data  order by iid,aid