Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

simple SQL output question 2

Status
Not open for further replies.

patrick118

Technical User
Jan 14, 2004
315
NL
We have a few databases here and sometimes there are a lot of updates on them. I wanted to make it easy for myself and created a script that simply logs in to the database run a few scripts and goes on to the nexr.

example

-- Connection with server 1
connect user/password@test
start c:\package1.pck;
start c:\package2.pck;
connect user2/password@test
start c:\package1.pck;
start c:\package2.pck;

and on and on

My question is how do i make some lines in it so i can later see where the script is and what is had done
set echo on is not an option because it also show what the package is. Would like to see someting like this

-- Connection with server 1
connect user/password@test
show outputline connection made to test
start c:\package1.pck;
show outputline connection package 1 done
start c:\package2.pck;
show outputline connection package 2 done

Hope you understand my question. Thanks for the help
 
I think you could do this with dbms_output:
Code:
SET SERVEROUTPUT ON SIZE 1000000
connect user/password@test
EXEC dbms_output.put_line('connection made to test');
start c:\package1.pck;
EXEC dbms_output.put_line('package 1 done on test');
start c:\package2.pck;
EXEC dbms_output.put_line('package 1 done on test');

 

Or, just use "prompt":
Code:
-- Connection with server 1
connect user/password@test
prompt connection made to test
start c:\package1.pck;
prompt connection package 1 done
start c:\package2.pck;
prompt connection package 2 done
[2thumbsup]



----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
both some excellent idea's

Thank you for the help

Patrick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top