Supress some serveroutput but not all


Posted on 16th Feb 2014 07:03 pm by admin

Hi,

I have a script I'm working on that uses plsql to create and RMAN script, this uses dbms_output and also accepts user input as variables.

The script is working but there is some serveroutput I need to suppress and some not.

How can I do this?

Script is:

set serveroutput on format wrapped
set feedback off
set linesize 100

spool tom.out

declare

dbname varchar2(9) := upper('&dbname');
fs varchar2(12) := '&fs';

BEGIN
DBMS_OUTPUT.ENABLE(2000);
DBMS_OUTPUT.PUT_LINE(' DUPLICATE TARGET DATABASE TO '|| dbname ||';');
DBMS_OUTPUT.PUT_LINE(' '|| fs ||' ');
end;
/

spool off

set linesize 80
set feedback on
set serveroutput off

When I run the script I get:

SQL> @tom
Enter value for dbname: orcl4
old 3: dbname varchar2(9) := upper('&dbname');
new 3: dbname varchar2(9) := upper('orcl4');
Enter value for fs: /u10/oradata
old 4: fs varchar2(12) := '&fs';
new 4: fs varchar2(12) := '/u10/oradata';
DUPLICATE TARGET DATABASE TO ORCL4;
/u10/oradata

SQL> ! cat tom.out
Enter value for dbname: orcl4
old 3: dbname varchar2(9) := upper('&dbname');
new 3: dbname varchar2(9) := upper('orcl4');
Enter value for fs: /u10/oradata
old 4: fs varchar2(12) := '&fs';
new 4: fs varchar2(12) := '/u10/oradata';
DUPLICATE TARGET DATABASE TO ORCL4;
/u10/oradata

No comments posted yet

Your Answer:

Login to answer
193 Like 38 Dislike
Previous forums Next forums
Other forums

Table trouble
i have been reading the forum for a few weeks and decided to join. i like the format and the advice

Files in current folder. Should be an easy fix.
Never mind. I've asked about this before and just found my answer. Anyway to delete this?

Sort a two dimensional array.
Hi. I've set up a two dimensional array that reads as follows:

Code: $modifiedData = array(

Create multiple (n) arrays
Hi there,

I have the following need:

I have 2 arrays (coming from a databases)

some questions
Hello,

I am looking for the answers for following questions:

1) Does PHP support overl

Collecting AOL Search Terms
I am attempting to collect AOL search terms. I know the code is correct (it works for google, bing,

Simple email form - Newbie
Hello all,

First time poster!

I've been asked to create a simple HTML form that submit

Multiple upload and Resize
I would like some help on my script I have the for my index.php

////

<html&

What makes a script your own?
If someone finds a login script online, and changes some variable names around and some other minor

Hits this week counter
I have a counter on my site that tracks hits, IP's, etc. into a mySQL database. It also includes the

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash