-
Website
http://awads.net/wp/ -
Original page
http://awads.net/wp/2005/08/04/oracle-sqlplus/ -
Subscribe
All Comments -
Community
-
Top Commenters
-
jgarry
3 comments · 1 points
-
Andy C
22 comments · 47 points
-
dahowlett
1 comment · 2 points
-
Don Seiler
9 comments · 1 points
-
davidhaimes
4 comments · 3 points
-
-
Popular Threads
I put mine in glogin.sql.
Related links:
Jonathan Lewis' and his FAQ:
http://www.jlcomp.demon.co.uk/faq/sqlplus_promp...
Oracle SQL*Plus FAQ:
http://www.orafaq.com/faqplus.htm
Also, "Setting Up" (Chapter 0) from Tom Kyte's "Expert One-on-One Oracle" and, naturally, the SQL*Plus User's Guide and Reference, available from here:
http://www.oracle.com/technology/documentation/...
set sqlprompt `'_user@_connect_identifier > '`
SQL*Plus Command Reference
Hi
I am tring to insert bulk sql statements from syslog-ng into oracle and I find there are more thn 50% lose.
syslog daemon writes "insert statements" to a FIFO pipe, from this pipe another daemon attempts to push insert statements to sqlplus CLI.
syslog-ng daemon config
writes to FIFO pipe /var/run/ora.pipe
destination d_oracle {
pipe("/var/run/ora.pipe"
template("ALTER SESSION SET SQL_TRACE = true;\nINSERT INTO syslogentry (hostname, facility, SEVERITY, MSG_SENT_TIME,p
rogram, message,MSG_RCV_TIME) VALUES ( '$HOST','$FACILITY', '$PRIORITY', to_date('$MONTH $DAY$ $YEAR $HOUR:$MIN:$SEC', 'mm dd
yyyy hh24:mi:ss'), '$PROGRAM', '$MSGONLY',SYSTIMESTAMP);\ncommit;\n") template-escape(yes));
};
we have tried to compare number of event (insert statements) coming on this pipe by writing another script that writes to file.
pipe to db script
!/bin/sh
nohup sqlplus user/pass < /var/run/ora.pipe >> /home/oracle/log.err
pipe to file script
!/bin/sh
nohup cat /var/run/ora.pipe > /logs/debug.log
number of events in files are almost 10 times more than going in db within a given time slot.
can any one help me ?
Regards
Sumit
Is it possible to add color to the prompt?
I want different color's for different environments that I use sqlplus on to distinguish them a bit and also add a bit of color to the whole black and white shell.
I tried using control characters that work on the OS I'm using but they get simply printed as is.
Anyone know a wrapper that I can use?
Pradeep, this is the first time I've ever heard that you can even have a colorful SQLPlus prompt! I do question the need for color though. That won't work well with color blind people.
Pradeep, yes I got colors in sqlplus. It's done via vi's Ctrl-v to write the escape sequences to the login.sql, and also, the escape sequence is supported by xterm, which is what I use putty to connect to a Linux box(I guess on Windows it would be a different way to do it or just can't be done). My sqlprompt variable looks like this:
^[[32;47m&_user@&_connect_identifier^[[30m>^[[0;49m
Copy & paste won't work, you should use vi or other editor which is capable of inputing escape sequences instead to get the '^['s to the file.
thank you
-fariza-
But also I needed the host name to be in my prompt. Any help is greatly appreciated.
thanks
Partha