How to run query in SCREEN Mode on Black Screen
How to run query in SCREEN Mode on Black Screen
--===============================================================
Step-1:- first open putty and login
Step-2:- open screen by using below scrip
screen -S TEST_SCREEN
Step-3:- login in database with user name and passord
sqlplus apps/Crap#88p0c
Step-4:- setting
set heading off;
set lines 10000;
set pages 500;
Step-5:- spooling setting with location
spool /u01/applmgr/pocdb/apps/apps_st/XXX/YYY/ZZZ/XX/Screen_Output/SCREEN_DATA.csv;
Step-6:- put your Query
Ex:-
Step-7:- put your Query
------------------------------------------------------------------------------------------------------------
FULL script
------------------------------------------------------------------------------------------------------------
--===============================================================
Step-1:- first open putty and login
Putty User name:- applxyz
Putty User Password:- welcome1
Step-2:- open screen by using below scrip
screen -S TEST_SCREEN
Step-3:- login in database with user name and passord
sqlplus apps/Crap#88p0c
Step-4:- setting
set heading off;
set lines 10000;
set pages 500;
Step-5:- spooling setting with location
spool /u01/applmgr/pocdb/apps/apps_st/XXX/YYY/ZZZ/XX/Screen_Output/SCREEN_DATA.csv;
Step-6:- put your Query
Ex:-
select 'Vendor_Code|Processed_Date|Comm_type|Status'
from dual
UNION ALL
select
SUBORDER_CODE||'|'||REMARKS||'|'||ATTRIBUTE1||'|'||ATTRIBUTE2
from
xxsd_suborder_hdr_tl
where
ATTRIBUTE_CATEGORY = 'COMMISSION'
and
Remarks = '30-NOV-2018' ;
spool off;
exit;
------------------------------------------------------------------------------------------------------------
FULL script
------------------------------------------------------------------------------------------------------------
screen
-S TEST_SCREEN
sqlplus
apps/Crap#88p0c
set
heading off;
set
lines 10000
set
pages 500
spool
/u01/applmgr/pocdb/apps/apps_st/comn/java/classes/xxsd/oracle/apps/Screen_Output/SCREEN_DATA.csv;
select
'Seller_Code|Processed_Date|Comm_type|Status'
from
dual
UNION
ALL
select
SUBORDER_CODE||'|'||REMARKS||'|'||ATTRIBUTE1||'|'||ATTRIBUTE2
from
xxsd_suborder_hdr_tl
where
ATTRIBUTE_CATEGORY = 'COMMISSION'
and
Remarks = '30-NOV-2018'
;
spool
off;
exit;
exit;
echo
'Process Completed.'
Comments
Post a Comment