Showing posts with label database synchronize. Show all posts
Showing posts with label database synchronize. Show all posts

Sunday, May 22, 2011

0

To increase Kernal Memory run the following command in Terminal. How to increase Kernel Memory

  • Sunday, May 22, 2011
  • ikraninc

  • To increase Kernal Memory run the following command in Terminal:

    > su
    > "Type root password"
    > echo 2147483648 > /proc/sys/kernel/shmmax
    > sysctl -w kernel.shmmax=2147483648
    > echo "kernel.shmmax=2147483648" >> /etc/sysctl.conf

    If problem occur (service stop) in approval application when user approve a transaction. Then follow below two steps to correct that problem.

    First step:

    > sed -i 's/XINERAMA/FAKEEXTN/g' /usr/java/j2sdk1.4.2_18/jre/lib/i386/libawt.so 
    > sed -i 's/XINERAMA/FAKEEXTN/g' /usr/java/j2sdk1.4.2_18/jre/lib/i386/libjawt.so
    Note : In above tow comamnds I have given jre path for java 1.4.2 if you have higher version then path may differ.

    Second step:   Add the following line in "/etc/init.d/Streamline_Approval" file as 1st line

    export LIBXCB_ALLOW_SLOPPY_LOCK=1
    Read more...
    0

    Replication Implementation pg-pool Installation for PostgreSQL Replication.

  • ikraninc

  • After Download the pgpool file copy the tar file to home location then  we need to extract that as following.
                                
    tar ­xvf pgpool­II pgpool­II­2.3.3.tar.gz

       * After extracting the source tar ball, execute the configure script.
    Configure
                                  >su
                                  > “type the root password”
                                  >cd pgpool­II­2.2.3
                                  >./configure
                                  >make
                                  >make install
          will install pgpool­II...




    After Installation copy the pgpool.conf and pcp.conf files to
    following location

                      /usr/local/etc/
         


    Then create the new database like “replicatedb” in both Master and Slave servers:

    #/usr/local/pgsql/bin/createdb ­p 9999 ­Ustreamline  replicatedb
    Restore the database backup to the replicatedb:

    #/usr/local/pgsql/bin/pg_restore ­p 9999 ­Ustreamline  ­v ­Fc ­d
    replicatedb  /home/erpsupport/demo.Backup
                  

    Note: Database's names and their passwords should same in both master and
    slave servers.



    Read more...
    0

    Important Instructions For Replication using postgres (PGsql), java in fedora machine.

  • ikraninc

  • Here we are testing replication using streamline ERP system (One largest ERP system for Garments), Postgrea 8.2, Java , PGPool and Fedora 9. 

    1.  Restarting  Streamline Services:

    When you need to restart Streamline Services you should restart pgpool also.

    Follow below setup to restart steamline services and pgpool

    Step-1: Stop the Streamline Services
    Step-2: Stop the pgpool
    -->pgpool -m fast stop

    Step-3: Start the pgpool
    -->pgpool -n &
    Step-4: Start the Streamline Services


    2.  Restarting  pgpool:

    When you need to restart the pgpool you should follow the same procedure.

    Step-1: Stop the Streamline Services
    Step-2: Stop the pgpool
    -->pgpool -m fast stop
    Step-3: Start the pgpool
    -->pgpool -n &
    Step-4: Start the Streamline Services



    3.  Restarting Master Server:

    If you need to Restart the Master server then do the following procedures
    Step-1: Stop the Streamline Services
    Step-2: Stop the pgpool
    -->pgpool -m fast stop
    Step-3: Stop the postgres service in Master server

    --> su
    -->
    --> su postgres
    --> /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data/ -m fast stop

    Step-4: Then Restart the Master Server Machine
    Step-5: Then start pgostgres services in master and check slave postgres also running
    Step-6: Start the pgpool
    -->pgpool -n &
    Step-7: And Start the Streamline Services

    4.  Restarting Slave Server:
    If you want to Restart the Slave server means do the following procedures
    Step-1: Stop the Streamline Services
    Step-2: Stop the pgpool in mainserver
    -->pgpool -m fast stop
    Step-3: Stop the postgres service in Slave server
    --> su
    -->
    --> su postgres
    --> /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data/ -m fast stop
    Step-4: Then Restart the Slave Server Machine
    Step-5: Then start postgres services in slave and check master postgres also running
    Step-6: Start the pgpool in mainserver
    -->pgpool -n &
    Step-7: And Start the Streamline Services

    5.  If Slave server connection faild due to Network problem or Slave Machine Crashed.
    *  Restart Streamline and Pgpool services in Mainserver.  So that reports will get data from Mainserver.
    *  Once Slave Server ready follow below steps to enable replication.
    Step-1: Stop the Streamline Services
    Step-2: Stop the pgpool
    -->pgpool -m fast stop
    Step-3: Stop the postgres service in Slave server
    --> su
    -->
    --> su postgres
    --> /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data/ -m fast stop

    Step-4: Stop the postgres service in Master server
    --> su
    -->
    --> su postgres
    --> /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data/ -m fast stop

    Step-5: Delete the “data”  folder in slave server
    --> su
    -->
    --> rm -rf  /usr/local/pgsql/data
    Step-6: Then create the “data” folder in slave server
    --> su
    -->
    --> mkdir  /usr/local/pgsql/data
    --> chown postgres /usr/local/pgsql/data

    Step-7: Copy the “data” folder from Master server to Slave server “data” folder through rsync.
    --> su
    -->
    -->  rsync -r -v -d -p -o -g -l root@192.168.0.41:/usr/local/pgsql/data/ /usr/local/pgsql/data/

            “While using rsync to each and every time we need to enter the root    
    password of Main server. “

    Step-8: After Complete the “data” folder copy. Delete the folders from table-spacing drives in Slave server.
    --> su
    -->
    --> rm -rf /d_op_doc/
    --> rm -rf /d_planning/
    --> rm -rf /d_edi_stores/

    Step-9: Then Copy the each table-spacing folders from Master to Slave Machines
    --> su
    -->
    -->rsync -r -v -d -p -o -g -l root@192.168.0.41:/d_op_doc// /d_op_doc
    -->rsync -r -v -d -p -o -g -l root@192.168.0.41:/d_planning// /d_op_doc
    -->rsync -r -v -d -p -o -g -l root@192.168.0.41:/d_edi_stores// /d_op_doc
    Step-10: Start the postgres service in  Master server
    Step-11: Start the postgres service in  slave server
    Step-12: Start the pgpool
    -->pgpool -n &
    Step-13: Start the streamline Services.


    Read more...