Db2 learning instruction (1)

Source: Internet
Author: User
Tags db2 connect db2 connect to


1. start instance (db2inst1): db2start 2. stop an instance (db2inst1): db2stop 3. list all instances (db2inst1) www.2cto.com db2ilist 5. list the current instance: db2 get instance 4. view the sample configuration file: db2 get dbm cfg | more 5. update Database Manager parameters: db2 update dbm cfg using <para_name> <para_value> 6. create Database: db2 create db test 7. view Database Configuration Parameter information db2 get db cfg for <database_name> | more 8. update database parameter configuration information db2 update db cfg for <database_name> using <para_name> <para_value> 10. delete Database: Www.2cto.com db2 drop db test 11. connect to the database db2 connect to test 12. list details of all tablespaces. Db2 list tablespaces show detail 13. query data: db2 select * from tb1 14. delete data: db2 delete from tb1 where id = 1 -- delete the entire table alter table db2inst1. DW_VIP_CALLFW_MM activate not logged initially with empty table 15. create an index: db2 create index idx1 on tb1 (id); www.2cto.com 16. create view: db2 create view view1 as select id from tb1 17. query view: db2 select * from view1 18. node cataloguing db2 catalog tcp node node_name remote server_ip server server_port 19. check the port number db2 get dbm cfg | grep SVCENAME 20. attached to the test node db2 attach to node_name author manULinux

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.