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

Security Exception on pages using AJAX
I am getting the exception: attempted to perform an operation not allowed by the security policy on

Querying info from one table based on info in another
Hi, I am currently trying to make a part for my user driven website where one user can subscribe to

need help about
i store the value of my select statement result to an array and stored it to a variable named $fname

strtotime issue
Hey all,

I'm playing around with some code, and basically the idea is:

Person changes

Am I setting up my sites oldschool?
Ok,

When I create a site I open a basic template that I have created that consists of a css f

Server side $_SESSION
how does one keep the session completely server side. no cookies to the browser at all. i need this

Best way to cross matching large datasets
Hi,

Im running a script where am I cross matching about 200 000 data sets with each other. Ea

How to separate records and ORDER BY
Let say i have 100 records and displayed in one page, then i want to get the records from 50-100 and

smart reading from a text file
Hello there fellow coders, i was wondering if one of you wouldnt mind helping me with this problem i

Remote Database Access
Hey guys!!

OK, i'm used to only working with databases from the CPANEL, accessing phpMyAdmin

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