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
Required to login help
I'm trying to set up my site so users have to be logged into the forum to access the site.I've been
$_POST variable un-useable
I'm trying to use a $_POST variable in a mysql update statement but i can't use it for some unknown
distinct rows
Hi
version 10.2.0.3
I have a query output something like the following
ID
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
PHP url branch??
Functionally, using PHP, I'm doing a test of login input submitted by a user via an html form in a f
AUTONUMBER PROBLEM
Hello Everyone,
My name is Jones and i am new to this forum and to oracle. I am using ora
Impact of movement type 412 E on MAP
Hi
Usage of movement type 412 E is causing huge change in MAP .
Is there any r
Customizing message/behavior
Hi,I'm using the ASP.NET membership/authorization controls in my application. Some parts of my appli
PL/SQL: ORA-00947: not enough values error message
Hi all i am getting Error(25,63): PL/SQL: ORA-00947: not enough values error message when executing
include
Hi I have this way of licensing my PHP application, and I want to know if you guys can answer some q