Sunday, February 7, 2010

inserting string containing '&' in table.

How can a string like ':&nbnc' be inserted in a table.
This string is using as is bind variable but not actually it is so.

To insert this or similar string into a table, use

SET DEFINE OFF

Then use insert statement. For example,

SQL> desc t2;
Name Null? Type
----------------------------------------- -------- -------------

C1 VARCHAR2(10)

SQL> insert into t2 values(':&nbnc');
Enter value for nbnc: rr
old 1: insert into t2 values(':&nbnc')
new 1: insert into t2 values(':rr')

1 row created.

SQL> SET DEFINE OFF
SQL> insert into t2 values(':&nbnc');

1 row created.

SQL>

Monday, February 1, 2010

isqlplus port number

How can I know Which port to use to start isqlplus from browser.
Solution. Use following file path to get port number of isqlplus(in oracle 10g).

$ORACLE_HOME/install/portlist.ini
Then use following url to start isqlplus

http://host:port/isqlplus