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.

Did you know?Explore Trending and Topic pages for more stories like this.
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

FTP Programs
Here is a list of commonly suggested FTP Programs to use:

FileZilla
SmartFTP
CuteFTP

Receive Rosettanet Message to SAP 4.6c
Dear all ,

My customer will send the PO details by rosettanet message , Is it

* Gridview and Detailsview in UpdatePanel, insert mode problem
I have a GridView and DetailsView working together. When a record from Gridview is selected, Detail

quick basic question, hopefully not dumb
I don't know how to search for this, so forgive me if it's been covered...

I often see an exa

search function
HI guys,

if anyone could point us in the right direction of how to do this, or provide some t

import table with dependency
Hi

What is the best way to import table back which has dependency?

SQL> cre

losing session vars when arriving from an email link
Hi,

I've got a confirmation script made that sends an email with a link for a user to confirm

Allegro crashes when running load_bitmap. Why?
I can not get Allegro to load any BMP images. Here is a section of test code. The picture is in the

Thread in PHP
Thread in PHP
Some basic use and basic code for thread in php
This is my question?

modifying query string with no page refresh
Hi everybody,
I've tried to get info about my problem all over the internet but i didn't find out

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