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

Change Sort Order to Display Newest File First
Hi Guys,

I have a page that sorts the contents (PDFs) of a directory and displays them on the

Curly Bracket Delimeters.
I'd always believed that the starting and ending delimeters in preg_ functions had to be the same ch

Multiple submit forms inside a mysql array page
Hi all,

Im having trouble to get the beneath script to work the thing i can't seem to get wor

Add 5 to a variable when a button is clicked, and re-run a for loop
So I'm making a feedback sort of section on a website with MySQL and PHP, I've gotten the script to

Taylor Series Function
So I am working a a project for my intro C++ class, and I am having some trouble with a function for

Thought I has this figured out especially after all the help i received?
Cags, Salathe, Daniel helped me with this yesterday, but not sure i took it all in.
I am attempti

Async WSAConnect failed on XP with error code = 2 ("File not found")
Hi all,

I have very strange bug, please help me if you can.

It is reproduced o

problem with php server update from mid 2009
Hi,

I have this navigation menu on 2 websites which used to work just fine. After a recent up

To add a field on the screen XK02.
Hi All,

How to add an additional field in the vendor change control screen XK02.
The

Map.php
I am a complete beginner to PHP and am looking for some help with a program I am messing around with

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