Maximum length of command line argument that can be passed to SQL*Plus?

Try with: xargs –show-limits </dev/null Your environment variables take up 2446 bytes POSIX upper limit on argument length (this system): 2092658 POSIX smallest allowable upper limit on argument length (all systems): 4096 Maximum length of command we could actually use: 2090212 Size of command buffer we are actually using: 131072 There is no limit per … Read more

When or Why to use a “SET DEFINE OFF” in Oracle Database

By default, SQL Plus treats ‘&’ as a special character that begins a substitution string. This can cause problems when running scripts that happen to include ‘&’ for other reasons: SQL> insert into customers (customer_name) values (‘Marks & Spencers Ltd’); Enter value for spencers: old 1: insert into customers (customer_name) values (‘Marks & Spencers Ltd’) … Read more

ORA-12514 TNS:listener does not currently know of service requested in connect descriptor

I had this issue and the fix was to make sure in tnsnames.ora the SERVICE_NAME is a valid service name in your database. To find out valid service names, you can use the following query in oracle: select value from v$parameter where name=”service_names” Once I updated tnsnames.ora to: TEST = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS … Read more

Escaping ampersand character in SQL string

Instead of node_name=”Geometric Vectors \& Matrices” use node_name=”Geometric Vectors ” || chr(38) || ‘ Matrices’ 38 is the ascii code for ampersand, and in this form it will be interpreted as a string, nothing else. I tried it and it worked. Another way could be using LIKE and an underline instead the ‘&’ character: node_name … Read more