RSSAmplifier

Blog

Laurent Schneider

Oracle Certified Master

laurentschneider.comRSS feed ↗10 posts

Latest posts

Where to find ojdbc17_g.jar

I haven t done much JDBC tracing yet, but recently for a Kerberos KCM + ANO case I wanted more traces. In the old doc, on google and myoraclesupport, you ll often see about the _g suffix. Like using ojdbc8_g.jar and -Doracle.jdbc.Trace=true and -Doracle.jdbc.diagnostic.enableLogging=true. But chance are, you use a recent jar and find no _g one. [ ]

tnsping and instant client revisited

You enjoyed my old trick with https://laurentschneider.com/wordpress/2012/11/tnsping-and-instant-client.html ? you will love this one ❤️ sqlplus -p db01 Local Net Naming configuration file: /usr/lib/oracle/23/client64/lib/network/admin/tnsnames.ora Attempting to contact:…

no salary should be 25x higher than the lowest salary

This is common sense How to enforce this in a recent Oracle version? create assertion x25 check (not exists(select * from emp e where sal*25 any(select sal from emp))); update emp set sal=100000 where job='PRESIDENT'; ORA-08601: SQL assertion (SCOTT.X25) violated.

Return code before grep part 3 and the pipefail hack

whenever you do mycmd grep mytext the return code of command got lost, $? point to the return code of grep. Back in time I posted https://laurentschneider.com/wordpress/2009/05/return-code-before-grep.html ( ( ( mycmd echo $? 3 ) grep mytext 4 ) 3 1 (read x;exit $x) )4 1 this did work like a charm for decades. But earlier [ ]

To TLS or to NNE? Postquantum hints the former

When encrypting Network traffic to your database server, there are two different approaches. One is to use Oracle Native Encryption by setting SQLNET.ENCRYPTION_SERVER=requested on the server sqlnet.ora and that s about it. Very easy to setup and nothing to do on the client. Also it was a good choice for performance and security. The other option [ ]

Hello World java classless

$ cat HW.java javac HW.java java HW void main() { System.out.println("Hello World"); } Hello World If you know, you know

sqlite3

I just tried sqlite. It is ultra-light and support SQL commands. Just try this $ sqlite3 test.db SQLite version 3.26.0 2018-12-01 12:34:55 Enter ".help" for usage hints. sqlite create table t(x number); sqlite insert into t values(1); sqlite select * from t; 1 sqlite $ du -h test.db 8.0K test.db I just created a database, [ ]

shell [ $x ]

Long long time ago, back in SunOS ages and shell Bourne, I saw this code if [ $x ]; then ... The author told me, I was a junior java developer, it checks if x exists. I didn t like the code. I just found out that 1 = 2 does not exist $ x='1 = [ ]

Changing 10g password in 19c

One user may complain about ORA-28008 when changing its old password in 19c. Many users still use the old non case sensitive passwords. Resetting User Passwords That Use the 10G Password Version is a post-upgrade task of 19c. Let s try with the identified by values (as I wrote long time ago there alter-user-identified-by-values-in-11g ) SQL> [ ]

TIME_BUCKET group by time period

We all know how to sum up by year select to_char(trunc(hiredate,'Y'),'YYYY') year, count(*) from scott.emp group by trunc(hiredate,'Y') order by trunc(hiredate,'Y') YEAR COUNT(*) ---- -------- 1980 1 1981 10 1982 1 1987 2 This is quite easy. Same for day (DD), century (CC), quartal (Q), hour (HH24), month (MM) But how do you group by, [ ]