Tuesday, 9 December 2014

How to backup/restore oracle database


sqlplus>shutdown immediate
sqlplus>startup mount

--backup
rman target /
rman>backup database;
rman>list backup;

---restore
sqlplus>shutdown abort;
rman>startup nomount;
rman>restore controlfile from '';
rman>alter database mount;
rman>restore database;
rman>recover database;
rman>alter database open resetlogs;

--validate db is open
sqlplus> select name from v$database;
sqlplus> select open_mode from v$database;

Wednesday, 22 October 2014

Setup RPT test environment


  1. Plan
    1. Rational License Server -  Windows server1
    2. Rational Performance Tester -  Windows server2
    3. Test Agent -  RedHat  server3
  2. Installation
    1. Install Rational License Server  on server1
    2. Install Rational Performance Tester on server2
    3. Install License Key Administrator on server2
    4. Install Test Agent on server3
      1. Select "Load Generation Agent"
      2. "Agent Controller" is optional
      3. select default offering "IBM@ Rational @ Performance Tester - for use with Virtual Tester Pack floating licenses in IBM Rational Performance Tester"
  3. Configuration
    1. Get license key "IBM RATIONAL PERF TESTER PACK 2500 VIRTUAL TESTERS(FLT)", and save the file on server1.
    2. double click the file name, it will notice to import the key on server1.
    3. Start license key administrator on server2, use "Point to a Rational License Server to get my licenses" option to import float license. Input the server1 host name and port 27000 by default. Now you can use more users than 5 by default in RPT.
    4. Configure agent:
      1. open configuration file in /opt/IBM/SDP/Majormodo/majormodo.config, set the agent ip address. (optional, set "debug" with true, the debug log will be in /tmp/username)
      2. stop agent by running ./MDStop.sh
      3. start agent : MDStart.sh
      4. Check the connection with RPT:  On server2, open RPT, click "agent status" icon in toolbar, it will show the agent is ready.
<MajordomoConfig xmlns="http://www.example.org/MajordomoConfiguration">
        <debug>false</debug>
          <canonicalHostName></canonicalHostName>
            <ipAddress>AGENT IP Adress</ipAddress>
              <pollInterval>10</pollInterval>
                <workbenches>
                      <hostName>RPT host name</hostName>
                        <port>7080</port>
                      </workbenches>
                    </MajordomoConfig>

                    My DNS is no problem, but I still got the issue, finally I added the agent IP in majordomo.config file, it worked.


                    Wednesday, 28 May 2014

                    CPU Stuck

                    My one cluster member's process of weblogic stuck, and one cpu 100% used.

                    • Weblogic 12c
                    • JRockit 1.6
                    • RHL 6.5

                    Tuesday, 22 April 2014

                    Bad response time

                    Bad response time : over second.
                    Bad throughput : 50%

                    Checked the system resource, found the server's CPU is very high ~90%.
                     This application is run on java platform, then check GC log, and found the GC pause is too high as:
                    Why? the heap size is small?

                    Monday, 21 April 2014

                    Does it always mean memory leak?

                    As the chart, the red line is tenured GC, blue line is nursery GC, we can see a up trend of red line, does it mean memory leak?


                    Thursday, 10 April 2014

                    How to use Xming + Putty

                    1. start Xming by default
                    2. open Putty
                      1. session : SSH 
                      2. conection:SSH->X11 , checked below