<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    2008年4月3日

    Install Oracle 11g R2 on Ubuntu

    Ubuntu is not an official supported linux version from Oracle, so I still get some errors during the install process even with required configuration, anyway, it can work and what i'm doing here is try to setup an experiment environment, it's enough to me, any one who want to deploy Oracle in product mode should have supported linux platform like RedHat, OK, following is the steps i have to install it:

    1. If you were in multihomed enviroment, set the ORACLE_HOSTNAME variable:
        export ORACLE_HOSTNAME=machine_name.domain_name

    2. Create create OSDBA (dba) group, Oracle Inventory group (oinstall)  and a user "oracle" which has "dba" as its login group and oinstall as its 2nd group.

    3. Modify /etc/sysctl.conf, set kernel parameter:

    kernel.shmall = 2097152
    kernel
    .shmmax = 2147483648
    kernel
    .shmmni = 4096
    kernel
    .sem = 250 32000 100 128
    fs
    .file-max = 65536
    net
    .ipv4.ip_local_port_range = 1024 65000
    net
    .core.rmem_default = 1048576
    net
    .core.rmem_max = 1048576
    net
    .core.wmem_default = 262144
    net
    .core.wmem_max = 262144

    4. Modify /etc/security/limits.conf to improve the "number of process" and "number of open file"  performance for oracle:
    oracle              soft    nproc   2047
    oracle              hard    nproc   
    16384
    oracle              soft    nofile  
    1024
    oracle              hard    nofile  
    65536

    5. Modify /etc/pam.d/login, add:
    session    required     /lib/security/pam_limits.so
    session    required     pam_limits
    .so

    6. Modify /etc/profile:
    if [ $USER = "oracle" ]; then
            
    if [ $SHELL = "/bin/ksh" ]; then
                  ulimit 
    -16384
                  ulimit 
    -65536
            
    else
                  ulimit 
    -16384 -65536
            fi
    fi

    7. Change user to oracle if you haven't done it yet

    8. Create base directory, for me it's "/app/oracle"

    9. Export ORACLE_BASE, ORACLE_SID
    export ORACLE_BASE=/app/oracle
    export ORACLE_SID
    =orcl

    10.  If you're trying to install oracle with a X window:
    DISPLAY=your.ip.address:0.0 ; export DISPLAY

    11. run installer:
    ./runInstaller

    12. Oracle should start, if the installer GUI cannot be start, check the error messages, most time it's because a wrong X window configuration, if you are running X window with Xming, just like me, please do make sure to check the "No Access Control" check box in the launch, otherwise, Xming will reject the connection.

    13. Now the GUI shoudl open, like what you did in the Windows system, fullfill required value and click next, ingore all errors if there is any condition that is not match, click finish in the last step, it should start install process.

    14. After install oracle, the installer GUI will ask you to run two .sh files, run it with a root role.

    15. You can try to visit https://you.ip.address:1158/em to see is that OK for you.

    16. How to start oracle:
    export ORACLE_BASE=/app/oracle
    export ORACLE_HOME
    =/app/oracle/product/11.2.0/dbhome_1
    export ORACLE_OWNR
    =oracle
    export ORACLE_SID
    =orcl
    export PATH
    =$PATH:$ORACLE_HOME/bin


    lsnrctl start

    sqlplus 
    /nolog
    connect /as sysdba
    startup
    quit

    emctl start dbconsole


    Reference
    http://download.oracle.com/docs/cd/B19306_01/install.102/b15660/pre_install.htm#BABDFJAE

    posted @ 2010-03-16 15:57 Find it, try it, experience it 閱讀(595) | 評論 (0)編輯 收藏

    How to connect Reliance Modem AC2726 on Linux Ubuntu 9.10

    1. Type command: lsusb
    Bus 002 Device 003: ID 19d2:fff5 ONDA Communication S.p.A.
    2. Install "usb-modeswitch", then re-plugin modem again and input command "lsusb" again, you should get the following output
    Bus 002 Device 003: ID 19d2:fff1 ONDA Communication S.p.A.
    3. Notice in step #2, the product code has been changed from "fff5" to "fff1".
    4. Install package "wvdial" which is used to dail up
    5. Type command: "sudo modprobe usbserial vendor=0x19d2 product=0xfff1", don't forget the "sudo"
    6. Type command: "sudo wvdialconf", again don't forget the "sudo", this will detect your modem
    7. Modify file "/etc/wvdial.conf", following is what I have:

    [Dialer Defaults]
    Init1 
    = ATZ
    Init2 
    = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
    Modem Type 
    = Analog Modem
    ISDN 
    = 0
    New PPPD 
    = 1
    Phone 
    = #777
    Modem = /dev/ttyUSB0
    Username 
    = yourName
    Password 
    = yourPassword
    Baud 
    = 921600
    Stupid Mode 
    = 1
    Tonline 
    = 0

    8. Repeat step #5 again and then if you with not bad luck type in command "sudo wvdial", you should connect in.
    9. If bad luck with you, click right-upper corner, there is a connection configuration menu, you can create "Mobile Broadband" connection yourself here, don't forget input the phone number "#777" (for China Telcom) and your username password, after that click connect, this works for me.
    10. Good luck with you.
    11. BTW, if it still cannot work, try to re-plug in the modem.

    posted @ 2010-03-12 18:03 Find it, try it, experience it 閱讀(398) | 評論 (0)編輯 收藏

    Oracle Tips Part Two

    1. It will not get data from DB when just open the cursor, data will be loaded as an ongoing basis.

    2. SCN: System Change Number/System Commit Number

    3. FLASH BACK AS OF SCN;

    4. You can also flash back table: FLASHBACK TABLE SOME_TABLE TO SCN :SCN_NUM;

    5. But before you do a flash back operation on a table, do make sure you have already enbale ROW MOVEMENT on that table.

    posted @ 2010-03-07 18:03 Find it, try it, experience it 閱讀(180) | 評論 (0)編輯 收藏

    Oracle Tips One

    1. Do use oracle "Bind variable", it can increase the speed by 90 percent in 10g release1.

    2. Understand how to use "lock", read never block write,  vice verse.

    3. There is a side effect from oracle regarding to the "lock", if you do want to control the access to one row at a specify time (like doing an if 'this row belong to some search condition' then 'modify this row' action), you have to write some logic yourself, for example use the "for update" statement, like: "select * from x where x.id = 1 for update", so that you can lock the row only with id equals to '1' and then modify this row, so that some orther concurrence requests should execute the same sql first, yes, with the same 'for update' statement, and because you already have locked this row(id = 1), orther requests cannot get the access to it, and you get the access control to this row.

    4. Regardint to item 3, it will not decrease the concurrence level, because first you only lock the item with id equals to 1 and there maybe thousands of items in your table, second, it will not block the read request.

    posted @ 2010-03-06 21:25 Find it, try it, experience it 閱讀(229) | 評論 (0)編輯 收藏

    算法求解!如何判斷一個(gè)單向鏈表是否有環(huán)路?

    這該死的問題讓我竟然沒有想到解決方案...腦子生銹了?呵呵,算了...

    該問題最經(jīng)典的解答,簡直是一句話驚醒夢中人啊

    “用兩個(gè)指針,一個(gè)的步長為 1,另外一個(gè)的為 2,從表頭開始一起往前走,如果相遇,表明有環(huán)路,否則就是沒有了。”

    下來,不用說什么了吧,用JAVA實(shí)現(xiàn)的話,聲明兩個(gè)Iterator A 和 B,A 每次調(diào)用兩個(gè)NEXT,B只調(diào)用一次,如果他們能夠相遇,就是有環(huán)...我操

    posted @ 2009-03-02 14:15 Find it, try it, experience it 閱讀(629) | 評論 (0)編輯 收藏

    Something you may ingore when to use Hibernate and JPA.

    The first is about identity generator, this is something I ingored and find really interesting later when I read back the document.

        When you choose "native" (for plain hibernate) or "AUTO" (for JPA which use hibernate as provider) as identity generator, it (actually they are the same identity generator but with different name in different scope) will pick other identity generators like identity, sequence, or hilo, depending on the capabilities of the underlying database. Use this generator to keep your mapping metadata portable to different database management systems.
        If your underlying DB is oracle, it will automatically create a sequence for you which means choose the sequence as identity generator, that's really interesting, at least for me for the first time when it comes to me.

    The second is about the flush and close session operations when to use hibernate with JTA transaction.

        You should manually flush your operation by call flush method and close your session by calling close method when you try to use JTA transaction instead of hibernate Transaction API, these is because hibernate Transaction API does thoes operations automatically for you. But, with following configuration, it can also be done automatically for you by hibernate, though you are still with JTA transaction.

        hibernate.transaction.flush_before_completion=true
        hibernate.transaction.auto_close_session=true

    The third is about an interesting code snatch listed as follow:
       
    1     Session session = sessionFactory.openSession();
    2     session.beginTransaction();
    3     session.save(new Item());
    4     session.close();

        What happen if you don't commit the transaction? It's depends on the underlying DB, for oracle it will commit any uncommited transactions, but for many other DB vendors, they will roll back any pending transactions.
       

    posted @ 2008-04-03 16:32 Find it, try it, experience it 閱讀(917) | 評論 (0)編輯 收藏

    <2008年4月>
    303112345
    6789101112
    13141516171819
    20212223242526
    27282930123
    45678910

    導(dǎo)航

    統(tǒng)計(jì)

    公告

    If there is any question you have, please don't hesitate, let me know ASAP, you can find me at kenees@gmail.com or QQ: 9808873, hope to make friends with you ;)

    常用鏈接

    留言簿(1)

    隨筆檔案

    文章檔案

    搜索

    積分與排名

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 亚洲一级免费毛片| 18禁成人网站免费观看| 亚洲成人激情小说| 亚洲国产精品国自产拍AV| 国产成人啪精品视频免费网| 57pao国产成永久免费视频| 九九九精品视频免费| 亚洲日韩一区精品射精| 亚洲永久中文字幕在线| 亚洲成色WWW久久网站| 亚洲片国产一区一级在线观看| 成年女人看片免费视频播放器| 131美女爱做免费毛片| 在线观看免费无码专区| 一区二区三区免费视频播放器 | 一级毛片免费观看不卡的| 一级毛片免费在线观看网站| 色五月五月丁香亚洲综合网| 亚洲激情视频图片| 亚洲人成网站在线观看播放青青| 久久亚洲精品中文字幕无码| 久久久久久久亚洲精品| 亚洲国产a级视频| 免费萌白酱国产一区二区| 特级淫片国产免费高清视频| 成全视频在线观看免费高清动漫视频下载 | 色婷婷六月亚洲综合香蕉| 亚洲综合国产成人丁香五月激情| 亚洲人成免费电影| 国产色在线|亚洲| 亚洲熟女www一区二区三区| 亚洲天堂男人影院| 天堂亚洲国产中文在线| 亚洲自偷自偷在线成人网站传媒| 国产成人精品日本亚洲11| 亚洲日韩精品无码AV海量| 亚洲AV无码精品国产成人| 国产精品亚洲综合| 又黄又大的激情视频在线观看免费视频社区在线 | 亚洲精品无码永久在线观看| 亚洲AV网站在线观看|