Topic
7 replies Latest Post - ‏2014-06-18T13:13:11Z by nivanov
manohargunturu
manohargunturu
1 Post
ACCEPTED ANSWER

Pinned topic usage of db2 express-c

‏2013-08-01T11:18:14Z |

we developed a web-app using database(DB2 express-c) .

is their any cautions or any precautions while we using web-app in real scenario.

Somebody told to me it requires daily backup is it true.  

  • Sreeharsha_Naik
    Sreeharsha_Naik
    34 Posts
    ACCEPTED ANSWER

    Re: usage of db2 express-c

    ‏2014-06-12T06:19:54Z  in response to manohargunturu

    If you use DB2 EXP-C ( free version ) for your web app, you will be able to back the databases, but EXP C does not support recovery so technically its not a good idea to go with the free version for business/critical apps. You can purchase ESE by contacting IBM if you want a better support and upgraded version with more features.

    DB2 EXP-C is for getting a feel of how DB2 looks on the LUW side,

    Hope this helpded.

    Thanks
    Harsha

    • nivanov
      nivanov
      10 Posts
      ACCEPTED ANSWER

      Re: usage of db2 express-c

      ‏2014-06-17T18:21:45Z  in response to Sreeharsha_Naik

      Can you please explain what you mean by saying that "DB2 Express-C does not support recovery"?

      • Sreeharsha_Naik
        Sreeharsha_Naik
        34 Posts
        ACCEPTED ANSWER

        Re: usage of db2 express-c

        ‏2014-06-17T18:52:36Z  in response to nivanov

        Hey Nivanov, Try taking a backup of the table, that works fine.. try recovering it... you will not be able to do so if its the " free " version, technically no HADR

        • nivanov
          nivanov
          10 Posts
          ACCEPTED ANSWER

          Re: usage of db2 express-c

          ‏2014-06-17T19:04:49Z  in response to Sreeharsha_Naik

          I'm not asking what I can try, I was curious about the "recovery" thing. Firstly, you cannot backup a table in DB2, regardless of the version. Secondly, HADR does not have much to do with the database recovery.

          Are you saying that one cannot issue the recover database command if using DB2 Express-C?

        • nivanov
          nivanov
          10 Posts
          ACCEPTED ANSWER

          Re: usage of db2 express-c

          ‏2014-06-17T19:06:00Z  in response to Sreeharsha_Naik

          And by the way, I did try:

          [db2inst1@localhost ~]$ db2 update db cfg for openkm using logarchmeth1 "disk:/home/db2inst1/archlogs"
          DB20000I  The UPDATE DATABASE CONFIGURATION command completed successfully.
          [db2inst1@localhost ~]$ db2 backup db openkm
          
          Backup successful. The timestamp for this backup image is : 20140617190300
          
          [db2inst1@localhost ~]$ db2 recover db openkm
          
                                           Rollforward Status
          
           Input database alias                   = openkm
           Number of members have returned status = 1
          
           Member ID                              = 0
           Rollforward status                     = not pending
           Next log file to be read               =
           Log files processed                    =  -
           Last committed transaction             = 2014-06-17-19.03.06.000000 Local
          
          DB20000I  The RECOVER DATABASE command completed successfully.
          [db2inst1@localhost ~]$ db2licm -l
          Product name:                     "DB2 Express-C"
          License type:                     "Unwarranted"
          Expiry date:                      "Permanent"
          Product identifier:               "db2expc"
          Version information:              "10.5"
          Max number of CPUs:               "2"
          Max amount of memory (GB):        "16"
          Enforcement policy:               "Soft Stop"
          
          
          • Sreeharsha_Naik
            Sreeharsha_Naik
            34 Posts
            ACCEPTED ANSWER

            Re: usage of db2 express-c

            ‏2014-06-18T12:29:50Z  in response to nivanov

            I should have been more precise then, I should have mentioned recovery is not possible on the windows side of DB2 EXP C. May be you can help me out with my recovery problems if you have worked on the windows side, sorry to go on an assumption that it does not work on the linux/unix env as well :

            and about HADR, yes that's a whole new story which has nothing to do with recovery, but the question asked by Manohar pointed out to a requirement of HADR ..

            I create a db using a simple command on " windows " platform using create db sample !

            It backs up fine : backup db sample

            when I try to recover, it says -

            db2 => recover db sample
            SQL1260N  Database "SAMPLE" is not configured for roll-forward recovery on
            node(s) "0".

            Here is the CREATE DB syntax on the windows platform, Can you suggest me how to create a configured roll-forward recoverable database ? I don't see any option that would enable recovery. Many Thanks.

            CREATE DATABASE database-name
            [AT DBPARTITIONNUM | [AUTOMATIC STORAGE {NO | YES}]
            [ON drive[{,drive}...][DBPATH ON drive]]
            [ALIAS database-alias] [USING CODESET codeset TERRITORY territory]
            [COLLATE USING {SYSTEM | IDENTITY | IDENTITY_16BIT | COMPATIBILITY | NLSCHAR | UCA400_NO | UCA400_LSK | UCA400_LTH | language-aware-collation | locale-sensitive-collation}]
            [PAGESIZE integer [K]]
            [NUMSEGS numsegs] [DFT_EXTENT_SZ dft_extentsize] [RESTRICTIVE]
            [CATALOG TABLESPACE tblspace-defn] [USER TABLESPACE tblspace-defn]
            [TEMPORARY TABLESPACE tblspace-defn] [WITH "comment-string"]]
            [AUTOCONFIGURE [USING config-keyword value [{,config-keyword value}...]]
            [APPLY {DB ONLY | DB AND DBM | NONE}]]

            language-aware-collation, locale-sensitive-collation:
            For a complete list of options, see the topic called "CREATE DATABASE command" in the Information Center.

            tblspace-defn:
              MANAGED BY { SYSTEM USING ('string' [ {,'string'} ... ] ) |
              DATABASE USING ({FILE | DEVICE} 'string' number-of-pages
              [ {,{FILE | DEVICE} 'string' number-of-pages} ... ]) | AUTOMATIC STORAGE}
              [EXTENTSIZE number-of-pages] [PREFETCHSIZE number-of-pages]
              [OVERHEAD number-of-milliseconds] [TRANSFERRATE number-of-milliseconds]
              [NO FILE SYSTEM CACHING | FILE SYSTEM CACHING]
              [AUTORESIZE {NO | YES}] [INITIALSIZE integer {K |M |G}]
              [INCREASESIZE integer {PERCENT |K |M |G}] [MAXSIZE {NONE | integer {K |M |G}}]

            config-keyword:
              MEM_PERCENT, WORKLOAD_TYPE, NUM_STMTS, TPM, ADMIN_PRIORITY
              NUM_LOCAL_APPS, NUM_REMOTE_APPS, ISOLATION, BP_RESIZEABLE.

            Updated on 2014-06-18T12:34:06Z at 2014-06-18T12:34:06Z by Sreeharsha_Naik
            • nivanov
              nivanov
              10 Posts
              ACCEPTED ANSWER

              Re: usage of db2 express-c

              ‏2014-06-18T13:13:11Z  in response to Sreeharsha_Naik

              Well, as the message says, your database is not enabled for rollforward recovery. It has nothing to do with the server operating system. Enable log archiving by setting, for example, the database configuration parameter LOGARCHMETH1 to "disk:/c:/whatever/directory/you/want" then take an offline backup. Once the rollforward recovery is enabled, you can issue the RECOVER command.