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

Does deleting the spmlog directory critical?
Hi Everyone,

Please, hope you could help me. We're having problems with the SAP backup. I

Typedef struct vs just struct
Anyone know the rationale for using typedef for structs when a struct is itself a typedef? I have s

Find only certain URLs from page ... regex (semi-complete script)
Hi guys,

What I need to do is take a page & extract all the URLs from the page &a

Display last record first.
I need some help how put the last record first and first record last.

Thanks

Code: &am

Streaming local file from PHP while it’s been written to by a CURL process
I am creating a simple Proxy server for my website. Why I am not using mod_proxy and mod_cache is a

How do I give a developer access to a specific directory and nothing else?
I want to give a develop access to a specific directory and nothing else

I can give them an F

returning data from an ssh2_exec()
here's what i got.


$conn = ssh2_connect($this->_host);
ssh2_auth_password($c

PHP MySQL and DATE
Hi everyone

I have a databse and in one of the columns I have date values such as 2009-March-

onClick='location.href=index.htm'> not working
Below is my code:

echo "<input type='button' value='redirect' onClick='location.h

IIS & NW MII on the same server
Hi,

We're weighing the possibility to run both IIS and MII (NetWeaver) on the same server

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