DB2 for common commands

sponsored links
Create an instance of
DB2DIR/instance/db2icrt -a SERVER -u db2fenc1 db2inst1


1. Start an instance (db2inst1):
db2start 


View examples of port
db2 get dbm cfg |grep SVCENAME


Then go to / etc / services to find the above command to find services and corresponding port number.

View all examples.

db2ilist

List all databases

db2 list database directory


. Create the database:

db2 create db test


. This database configuration parameter information

db2 get db cfg for test|more 


. Delete the database:

db2 drop db test


Connect to the database
db2 create database TEXT


The system a user test_1

db2 on how to give a new user license

Specific operation is as follows:
1、db2 connect to test
2、db2 grant connect on database to user test1
3、db2 disconnect test
4、db2 connect to dssdb user test_1 using test_1
  • del.icio.us
  • StumbleUpon
  • Digg
  • TwitThis
  • Mixx
  • Technorati
  • Facebook
  • NewsVine
  • Reddit
  • Google
  • LinkedIn
  • YahooMyWeb

Related Posts of DB2 for common commands

  • Using ActiveRecord from Rails

    ActiveRecord is by far the best I have seen the ORM library, apart from DB2, supports all the mainstream databases. If you want to know how to use a separate Activerecord, please follow me. Introduce my system environment: OS: windows2003 DataBase: O ...

  • About rails install mysql driver error problem

    My local wamp server using one of the key package, only used mysql functions, today in the use of rake db: migrate when First reported a month can not be implemented, the next inquiry and found no mysql installed a gem, to install gem install mysql i ...

  • Do not believe mongrel_rails cluster:: start!

    Update code after Action (No action responded to xxx) error. Check the code, has been updated. Change the action name, change the path is always error. Baffled. In the system under ps ax | grep mongrel, found that Mongrel can not find the process! Bu ...

  • Properties with 6 supplementary hibernate.cfg.xml configuration

    In some special circumstances, we may be saved in the database connection information config.properties document, for example, make a install.jsp to modify config.properties documents, implementation of online information on the database configuration. At

  • Hibernate configuration parameter table

    # # Auto schema export # hibernate.hbm2ddl.auto create-drop # hibernate.hbm2ddl.auto create # hibernate.hbm2ddl.auto update # hibernate.hbm2ddl.auto validate The first is to create a table in the delete the original data, we can insert data, delete p ...

  • RoR explained

    ROR is Ruby on Rails. Ruby is a well-known has been very good dynamic language It's dynamic language. Simple and easy. Dynamic languages are interpreted, but the performance may make a discount, but not absolute, because the application is complex, th

  • spring + hibernate + oracle9i to read and write CLOB

    Database-driven update classes12-9i.jar Hibernate modify the configuration of the following code <bean/> <bean Lazy-init="true"> <property name="nativeJdbcExtractor"> <ref local="nativejdbcExtractor"/>

  • Nan-Jing 5: When IBatis.Hibernate mixed affairs, pay attention to your SQL

    [Problem] Now, in the development of the so-called multi-storey JavaEE applications, data persistence layer is always essential, and "Automatic" of ORM - Hibernate, and "all-manual-type" of SqlMap - IBatis, equivalent data are Per ...

  • The EJB3 Persistence

    EJB3 persistence with Hibernate is very similar to the mechanism: Environment: Server: JBOSS5.0 Database: MySQL5.0 1. Set up a data source First of all, in jboss-5.0.0.GA \ server \ default \ deploy, the establishment of a database used to connect the dat

  • hibernate to use the principle of

    The use of hibernate, implementation of data persistence. Has the following several processes. One configuration database connection information. Hibernate.config 2 configuration mapping. 3 use: the use of the process are the following steps: 3.1: Ge ...

blog comments powered by Disqus
Recent
Recent Entries
Tag Cloud
Random Entries