Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

wrap in spool file accessing via shell script

KK23Sep 25 2017 — edited Sep 26 2017

Hi All,

I have created the shell script , inside i have called the select statement for generating sql tuning task output. after generation of o/p is in wrapped mode and alignment also not in proper .

shell script

generate_tuning_task ()

{

sqlplus -s <<-EOF

${PBDW_USERID}/${PBDW_PWD}@${PBDW_SID}

DEFINE TASK_ID=$1

SET trimspool ON

SET wrap off

SET heading off

SET linesize 300

SET echo off

SET pages 999

SET long 2000000000

Col object_type format a10000

Col object_name format a10000

Col owner format a10000

SELECT DBMS_SQLTUNE.REPORT_TUNING_TASK('&&TASK_ID') AS RECOMMENDATIONS FROM DUAL;

EOF

}

current O/p:

pastedImage_2.png

Kindly advise , is there any set command to adjust the o/p ?.

This post has been answered by KayK on Sep 25 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 24 2017
Added on Sep 25 2017
11 comments
975 views