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
validating url
im trying to validate url's sent to me by a form
the url's im collecting are for placing banners
Help with translating C code into assembler code
Hi im doing a project that moves a robot around a maze avoiding walls and need some help with conver
my code does not work.
I have a code problem.
Quote"<a href=index.php?gogo=ureticidetay&'?l={$le
How to store checkbox array in a session, and then be able to add to it?
I'm trying to store an array of checkbox values into a session array, sort of like a shopping cart,
C problem struct and string
Hi guys,
This is my first post and I'm hoping the experts here can help me solve my problem.<
ORA-01017: invalid username/password; logon denied
Dear All,
I am facing problem in taken backup from db13 it comes up with the following l
Help with simple query
Hi,
I'm trying to do a Query with a Union where I want to print the number of rows $tc conta
Converting RGB values to HEX
Code: <?PHP
$file_handle = fopen("colors/rgb.csv", "r");
wh
Wordpress IE issue
So I am trying to add the background shadow to my wordpress page. It works fine in Firefox but does
DateObject and Nulls
Hi all,
I have an array mapped to a value object. One of the items in the array is a PHP Date