Skip to Main Content

SQLcl: MCP Server & SQL Prompt

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!

Line breaks in output of ords_export.export_module

Stephan VisserOct 25 2018 — edited Oct 25 2018

I am using sqlcl in a bespoke ci/cd setup and one of my scripts uses ords_export.export_module to get the module source code out of the database.

When this scripts saves the output (spool) of the command it leaves me with incorrect line breaks on longer lines so my automated process no longer works.

This is my export script:

set termout off

set heading off

set pagesize 0

set linesize 0

set long 100000

set longchunksize 100000

set trimout on

set trimspool on

set feedback off

set echo off

set sqlformat default

spool &1..sql;

select 'set define off;' from dual;

select ords_export.export_module('&2') from dual;

select '/' from dual;

select 'exit;' from dual;

spool off;

exit;

Is this a bug or am I doing something wrong?

Comments

I would definitely go with option #3. It is the easiest and the one with the least down time. I would suggest that you use AutoUpgrade to do the upgrade instead of the manual upgrade. It is easier and it does support having source Oracle Home and target Oracle Home on two different servers. Take a look at the Database Upgrade Quick Start Guide which shows how to get started with the tool. In your case you would execute "analyze" and "fixups" mode on the source system and wait for the changes to be applied on the standby. Then you break the connection and you can eventually do the upgrade using the "upgrade" mode. In your configuration file instead of specifying a "target_home" you should specify "target_version" instead.

Regards,

Daniel 

1 - 1

Post Details

Added on Oct 25 2018
1 comment
226 views