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
38
Other forums
Month String to Numeric?
Hi guys,
Given a month as a string, is there a simple way to find the numeric representation
building a function with multiple outputs
I want to build a function that has multiple outputs.
I know but am not to sure how I should
Echoing If Function?
A script I am using has If statements in the comments form to basically tell the form what to do. Cu
line breaks in between fetched file names
Hi,
I have this code:
Code: <?php
if($dir = opendir('files')){
while (($f
Line break?
Hi, I'm new to the forum and new to php. I'm not sure if I'm using the correct terminology so here i
temporary objects
Until now i thought every temporary object in C++ is created as constant. I'm wondering why my compi
PHP Thumbnail Creation
Ok so i use this function to create thumbnails:
Code: function createthumb($name,$filename,$n
ImageCreate()
When I create an image and add text to it I want my text to be replaced with a PNG image, because th
Displaying different page content, depending on the logged in user.
Hi all, I am new to ASP.net (and web development in general), and have a question about how I can di
Embedding flash object in Else statement
This is my first major project in PHP and I'm having some trouble embedding a flash object in an Els