Guiqiang's profileTry out the worldPhotosBlogListsMore Tools Help

Blog


    January 22

    Oracle XE: Configures more sessions and processes

     

    1. Log on to the database as system administrator (In SQL Plus "connect / as sysdba" will do the job)
    2. Set the number of processes to be 150 (In SQL Plus "alter system set processes=150 scope=spfile")
    3. Unset the number of sessions to remove the 20 session limit (In SQL Plus "alter system reset sessions scope=spfile sid='*'")
    4. Shutdown the database (In SQL Plus "shutdown immediate")
    5. Startup the database (In SQL Plus "startup")
    6. Check the changes have taken effect (in SQL Plus "show parameter sessions" and "show parameter processes") sessions has now been reset to a calculated value.

    Oracle XE:万恶的8080, 我终于可以干掉你了

    Oracle XE (Express Edition)是Oracle给我们程序员的一个好玩具,以前就听说Oracle是数据库老大,但是无缘得见,一窥其貌。

    现在好Oracle XE给我把玩把玩的冲动:)

    既然免单,当然有限制啦

    • Supports up to 4GB of user data

    • May be installed on a server with any amount of memory, but will only use up to 1GB RAM of available memory

    • May be installed on a multiple CPU server, but only executes on one processor in any server

     

    不过 够了。但是有个严重令我不爽的地方,XE包含了一个内部HTTP服务器,尽然用8080端口,那岂不是要我给可爱的Tomcat,JBoss们改端口。

    不爽,及其不爽

    今天我发现,原来可以干掉你,哈哈。

    View The Configuration

    All of the following command should be executed from the SQL command shell (SQLPlus).

    SQL> SELECT dbms_xdb.cfg_get FROM dual;
    

    The command above will fetch the configuration (as an XML document), you can spool it to an XML file and view it in any XML editor (when working with SQLPlus don't forget to set the LONG, LINESIZE and PAGESIZE options before executing the command above).

    Change The Configuration

    To change the HTTP port

    SQL>  call dbms_xdb.cfg_update(
    2      updateXML(dbms_xdb.cfg_get(), 
    3      '/xdbconfig/sysconfig/protocolconfig/httpconfig/http-port/text()', 
    4      3273))
    5      
    

    The command above changes the HTTP port to 3273. What happened here is that we call the cfg_update procedure, which gets a configuration. The configuration is loaded using the cfg_get, but the output of the cfg_get is passed through updateXML before it is handled to the cfg_update procedure.