zoukankan      html  css  js  c++  java
  • 删除DB2实例下的数据库

    db2ilist 查看所有实例 
    db2 get instance 查看当前连接的实例
    db2 list db directory 查看当前实例下连接的数据库
    ========================================
    C:UsersAdministrator>db2 list database directory --查看当前实例下连接的数据库
     System Database Directory
     Number of entries in the directory = 2
    Database 1 entry:
     Database alias                       = TEST123
     Database name                        = TEST123
     Local database directory             = C:
     Database release level               = d.00
     Comment                              =
     Directory entry type                 = Indirect
     Catalog database partition number    = 0
     Alternate server hostname            =
     Alternate server port number         =  
    Database 2 entry:
     Database alias                       = SAMPLE
     Database name                        = SAMPLE
     Local database directory             = C:
     Database release level               = d.00
     Comment                              =
     Directory entry type                 = Indirect
     Catalog database partition number    = 0
     Alternate server hostname            =
     Alternate server port number         =

    C:UsersAdministrator>db2 connect to test123 --连接到需要删除的数据库
       Database Connection Information
     Database server        = DB2/NT64 9.7.11
     SQL authorization ID   = DB2ADMIN
     Local database alias   = TEST123

    C:UsersAdministrator>db2 list applications  --查看当前数据库的连接情况
    Auth Id  Application    Appl.      Application Id
                      DB       # of
             Name           Handle
                      Name    Agents
    -------- -------------- ---------- --------------------------------------
    ----------------- -------- -----
    DB2ADMIN javaw.exe      19233      *LOCAL.DB2.191023053134
                      SAMPLE   1
    DB2ADMIN javaw.exe      19245      *LOCAL.DB2.191023053146
                      SAMPLE   1
    DB2ADMIN db2bp.exe      19250      *LOCAL.DB2.191023053151
                      TEST123  1

    C:UsersAdministrator>
     
    C:UsersAdministrator>db2 connect reset  --断开所有连接
    DB20000I  The SQL command completed successfully.
    C:UsersAdministrator>db2 drop database test123  --删除数据库
    DB20000I  The DROP DATABASE command completed successfully.
    C:UsersAdministrator>
  • 相关阅读:
    javascript的this
    javascript里的prototype
    【每天进步一点点 Python 】Python 字典(Dictionary) items()方法 用法
    【每天进步一点点--Python】字典dic类型 转换成 str 类型 json.dumps()
    【每天进步一点点
    【每天get 一点新知识】Python print 打印结果(字符串类型)前面添加 说明
    【每天get 到一点小知识】python 取response data 里面的数据
    【python web 开发】第三方登录开发模式及Oauth2.0 简介
    每天一个小程序:读取txt文件存储到excel 表中(2)
    每天一个小程序:读取txt文件存储到excel 表中
  • 原文地址:https://www.cnblogs.com/rusking/p/11725868.html
Copyright © 2011-2022 走看看