Skip to main content

Posts

Showing posts from March, 2012

How to Activate Apex on Oracle 11 g R1

To configure the embedded PL/SQL gateway: 1. Go to the  $ORACLE_HOME/apex  directory. 2. Use SQL/Plus to connect as SYS to 11g database where APEX is installed. SYS AS SYSDBA@db11r1> @apxconf PORT ----------8080 Enter values below for the XDB HTTP listener port and the password for the Application Express ADMIN user. Default values are in brackets [ ]. Press Enter to accept the default value. Enter a password for the ADMIN user [] admin_password Enter a port for the XDB HTTP listener [ 8080] ...changing HTTP Port PL/SQL procedure successfully completed. PL/SQL procedure successfully completed. Session altered. ...changing password for ADMIN PL/SQL procedure successfully completed. Commit complete. 3. Unlock the ANONYMOUS account. SYS AS SYSDBA@db11r1> ALTER USER ANONYMOUS ACCOUNT UNLOCK; User altered. 4. Enable Oracle XML DB HTTP server SYS AS SYSDBA@db11r1> EXEC DBMS_XDB.SETHTTPPORT(8080); PL/SQL procedure successfully comple...

Inserting values into a table with '&'

I often say "I learn something new about Oracle every day".  It really is true - there is so much to know about it, it is hard to keep up sometimes. It is a  little sqlplus quirk that I probably knew at one point but totally forgot.  People run into problems with &'s in sqlplus all of the time as sqlplus tries to substitute in for an &variable.  So, if they try to select '&hello world' from dual - they'll get: SQL> select '&hello world' from dual; Enter value for hello:  old   1: select '&hello world' from dual new   1: select ' world' from dual 'WORLD ------  world As the result. One solution is to "set define off" to disable the substitution (or set define to some other character).  Another oft quoted solution is to use  chr(38) -  SQL> select chr(38)||'hello world' from dual;   I never liked that one personally.  lol :)   What i suggest is this  SQL> select ...