Shane_Qian
作者Shane_Qian·2016-04-13 21:55
数据库开发工程师·18m

practice db2 purescale with softlayer

字数 10079阅读 1288评论 0赞 1

// softlayer is an IBM cloud platform...


to be honest, it's not an easy work to install/set those all put together as a cluster...

I even had forgot how many issues/errors I had faced... it depends on your env and choose, it may faced many unexpected cases...

// but the general instruction, you can check in the internet everywhere, though it's not for softlayer...

** here, just to prove it can work at softlayer... **

// it means it can run at some cloud env, at least for testing purpose...


let's see the result a bit which maybe it's your main interesting of such cluster.

=---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------=

** we can add memberS and/or cf what we want, /the hostS is scalable also at softlayer/ **

=---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------=

[db2inst1@sq4 ~]$ db2instance -list
ID        TYPE             STATE                HOME_HOST               CURRENT_HOST            ALERT   PARTITION_NUMBER        LOGICAL_PORT    NETNAME
--        ----             -----                ---------               ------------            -----   ----------------        ------------    -------
0       MEMBER           STARTED                sq4                  sq4               NO                  0                   0    sq4.softlayer.com
1       MEMBER           STARTED                sq5                  sq5               NO                  0                   0    sq5.softlayer.com
128     CF               PRIMARY                sq4                  sq4               NO                  -                   0    sq4.softlayer.com

HOSTNAME                   STATE                INSTANCE_STOPPED        ALERT
--------                   -----                ----------------        -----
sq5                 ACTIVE                              NO           NO
sq4                 ACTIVE                              NO           NO
[db2inst1@sq4 ~]$

=---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------=

[db2inst1@sq5 ~]$ db2 "select * from xx"

ID          NAME                 AGE
----------- -------------------- -----------
          1 a                              1
          2 b                              2
          3 c                              3
          4 shane                         16

  4 record(s) selected.

[db2inst1@sq5 ~]$

=---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------=

** now, shutdown or stop instance at sq5 **

=---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------=

[db2inst1@sq4 ~]$ db2 "delete from xx where name='a'"
DB20000I  The SQL command completed successfully.
[db2inst1@sq4 ~]$
[db2inst1@sq4 ~]$ db2 "select * from xx"

ID          NAME                 AGE
----------- -------------------- -----------
          2 b                              2
          3 c                              3
          4 shane                         16

  3 record(s) selected.

[db2inst1@sq4 ~]$

=---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------=

** bring back sq5 **

=---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------=

[db2inst1@sq5 ~]$ db2 "select * from xx"

ID          NAME                 AGE
----------- -------------------- -----------
          2 b                              2
          3 c                              3
          4 shane                         16

  3 record(s) selected.

[db2inst1@sq5 ~]$

=---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------=


Reminder, it's just a testing, high available is not always a #1 priority requirement in all cases/env, in my view.
But scalable maybe an interesting word nowadays..


- Shane.xb.qian
8:56 PM 4/13/2016 - china

如果觉得我的文章对您有用,请点赞。您的支持将鼓励我继续创作!

1

添加新评论0 条评论

Ctrl+Enter 发表

相关文章

相关问题

相关资料

X社区推广