pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

    1. <tfoot id='A9otD'></tfoot>
          <bdo id='A9otD'></bdo><ul id='A9otD'></ul>
        <legend id='A9otD'><style id='A9otD'><dir id='A9otD'><q id='A9otD'></q></dir></style></legend>
        <i id='A9otD'><tr id='A9otD'><dt id='A9otD'><q id='A9otD'><span id='A9otD'><b id='A9otD'><form id='A9otD'><ins id='A9otD'></ins><ul id='A9otD'></ul><sub id='A9otD'></sub></form><legend id='A9otD'></legend><bdo id='A9otD'><pre id='A9otD'><center id='A9otD'></center></pre></bdo></b><th id='A9otD'></th></span></q></dt></tr></i><div class="a73fdwx" id='A9otD'><tfoot id='A9otD'></tfoot><dl id='A9otD'><fieldset id='A9otD'></fieldset></dl></div>

        <small id='A9otD'></small><noframes id='A9otD'>

        通過 JDBC 連接到 DB2 時(shí)的用戶名和密碼

        User and Password when Connecting to DB2 via JDBC(通過 JDBC 連接到 DB2 時(shí)的用戶名和密碼)
      1. <legend id='O0rfW'><style id='O0rfW'><dir id='O0rfW'><q id='O0rfW'></q></dir></style></legend>
                <tbody id='O0rfW'></tbody>

              1. <small id='O0rfW'></small><noframes id='O0rfW'>

                  <bdo id='O0rfW'></bdo><ul id='O0rfW'></ul>

                • <tfoot id='O0rfW'></tfoot>
                  <i id='O0rfW'><tr id='O0rfW'><dt id='O0rfW'><q id='O0rfW'><span id='O0rfW'><b id='O0rfW'><form id='O0rfW'><ins id='O0rfW'></ins><ul id='O0rfW'></ul><sub id='O0rfW'></sub></form><legend id='O0rfW'></legend><bdo id='O0rfW'><pre id='O0rfW'><center id='O0rfW'></center></pre></bdo></b><th id='O0rfW'></th></span></q></dt></tr></i><div class="r0a0j0w" id='O0rfW'><tfoot id='O0rfW'></tfoot><dl id='O0rfW'><fieldset id='O0rfW'></fieldset></dl></div>
                  本文介紹了通過 JDBC 連接到 DB2 時(shí)的用戶名和密碼的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  我正在嘗試連接到本地 DB2 10.5 Express-C 服務(wù)器.這是一個(gè)測(cè)試環(huán)境,所以我不關(guān)心安全性.

                  I am trying to connect to a local DB2 10.5 Express-C server. This is a testing environment so I don't care about security.

                  我能夠連接到命令行處理器(在 Windows 上運(yùn)行),并且我更改了 AUTHENTICATION=CLIENTTRUST_ALLCLNTS=YES 的配置設(shè)置.那時(shí)我希望能夠在不進(jìn)行身份驗(yàn)證的情況下進(jìn)行連接(我重新啟動(dòng)了 DB2 服務(wù)),但仍然出現(xiàn)錯(cuò)誤.

                  I am able to connect to the Command Line Processor (running on Windows), and I changed the configuration settings for AUTHENTICATION=CLIENT and TRUST_ALLCLNTS=YES. I expected to be able to connect without authentication at that point (I restarted the DB2 service), but I still get an error.

                  當(dāng)我嘗試在沒有用戶名/密碼的情況下進(jìn)行連接時(shí)

                  When I try to connect without username/password

                  jdbc:db2://localhost:50000/test
                  

                  我收到錯(cuò)誤:com.ibm.db2.jcc.am.SqlSyntaxErrorException: [jcc][t4][10205][11234][4.14.146] Null userid is not supported.ERRORCODE=-4461,SQLSTATE=42815

                  I get the error: com.ibm.db2.jcc.am.SqlSyntaxErrorException: [jcc][t4][10205][11234][4.14.146] Null userid is not supported. ERRORCODE=-4461, SQLSTATE=42815

                  當(dāng)我嘗試添加虛假"用戶/密碼時(shí)(因?yàn)槲也恢廊绾卧O(shè)置或重置憑據(jù)),例如

                  And when I try to add "bogus" user/password (because I can't figure out how to set or reset credentials), e.g.

                  jdbc:db2://localhost:50000/test:user=userid;password=password;
                  

                  我收到錯(cuò)誤:com.ibm.db2.jcc.am.SqlInvalidAuthorizationSpecException: [jcc][t4][201][11237][4.14.146] 發(fā)生連接授權(quán)失敗.原因:不支持安全機(jī)制.ERRORCODE=-4214,SQLSTATE=28000

                  I get the error: com.ibm.db2.jcc.am.SqlInvalidAuthorizationSpecException: [jcc][t4][201][11237][4.14.146] Connection authorization failure occurred. Reason: Security mechanism not supported. ERRORCODE=-4214, SQLSTATE=28000

                  如何使用 JDBC 進(jìn)行連接?

                  How can I connect using JDBC?

                  DB2 配置如下:

                  db2 get dbm cfg
                  
                  
                            Database Manager Configuration     Node type = Database Server with local and remote clients Database manager configuration release level            = 0x1000 CPU speed (millisec/instruction)             (CPUSPEED) = 1.023413e-007 Max number of concurrently active databases     (NUMDB) = 32
                   Federated Database System Support           (FEDERATED) = NO
                   Transaction processor monitor name        (TP_MON_NAME) = 
                   Default charge-back account           (DFT_ACCOUNT_STR) = 
                   Java Development Kit installation path       (JDK_PATH) = C:PROGRA~1IBMSQLLIBjavajdk Diagnostic error capture level              (DIAGLEVEL) = 3
                   Notify Level                              (NOTIFYLEVEL) = 3
                   Diagnostic data directory path               (DIAGPATH) = E:DataDB2\IBMDB2DB2COPY1DB2
                   Current member resolved DIAGPATH                        = E:DataDB2\IBMDB2DB2COPY1DB2
                   Alternate diagnostic data directory path (ALT_DIAGPATH) = 
                   Current member resolved ALT_DIAGPATH                    = 
                   Size of rotating db2diag & notify logs (MB)  (DIAGSIZE) = 0 Default database monitor switches
                     Buffer pool                         (DFT_MON_BUFPOOL) = OFF
                     Lock                                   (DFT_MON_LOCK) = OFF
                     Sort                                   (DFT_MON_SORT) = OFF
                     Statement                              (DFT_MON_STMT) = OFF
                     Table                                 (DFT_MON_TABLE) = OFF
                     Timestamp                         (DFT_MON_TIMESTAMP) = ON
                     Unit of work                            (DFT_MON_UOW) = OFF
                   Monitor health of instance and databases   (HEALTH_MON) = OFF SYSADM group name                        (SYSADM_GROUP) = 
                   SYSCTRL group name                      (SYSCTRL_GROUP) = 
                   SYSMAINT group name                    (SYSMAINT_GROUP) = 
                   SYSMON group name                        (SYSMON_GROUP) = 
                   Client Userid-Password Plugin          (CLNT_PW_PLUGIN) = 
                   Client Kerberos Plugin                (CLNT_KRB_PLUGIN) = IBMkrb5
                   Group Plugin                             (GROUP_PLUGIN) = 
                   GSS Plugin for Local Authorization    (LOCAL_GSSPLUGIN) = 
                   Server Plugin Mode                    (SRV_PLUGIN_MODE) = UNFENCED
                   Server List of GSS Plugins      (SRVCON_GSSPLUGIN_LIST) = 
                   Server Userid-Password Plugin        (SRVCON_PW_PLUGIN) = 
                   Server Connection Authentication          (SRVCON_AUTH) = NOT_SPECIFIED
                   Cluster manager                                         = 
                   Database manager authentication        (AUTHENTICATION) = CLIENT
                   Alternate authentication           (ALTERNATE_AUTH_ENC) = NOT_SPECIFIED
                   Cataloging allowed without authority   (CATALOG_NOAUTH) = YES
                   Trust all clients                      (TRUST_ALLCLNTS) = YES
                   Trusted client authentication          (TRUST_CLNTAUTH) = CLIENT
                   Bypass federated authentication            (FED_NOAUTH) = YES Default database path                       (DFTDBPATH) = C: Database monitor heap size (4KB)          (MON_HEAP_SZ) = AUTOMATIC(66)
                   Java Virtual Machine heap size (4KB)     (JAVA_HEAP_SZ) = 2048
                   Audit buffer size (4KB)                  (AUDIT_BUF_SZ) = 0
                   Global instance memory (4KB)          (INSTANCE_MEMORY) = AUTOMATIC(3592673)
                   Member instance memory (4KB)                            = GLOBAL
                   Agent stack size                       (AGENT_STACK_SZ) = 16
                   Sort heap threshold (4KB)                  (SHEAPTHRES) = 0 Directory cache support                     (DIR_CACHE) = YES Application support layer heap size (4KB)   (ASLHEAPSZ) = 15
                   Max requester I/O block size (bytes)         (RQRIOBLK) = 65535
                   Workload impact by throttled utilities(UTIL_IMPACT_LIM) = 10 Priority of agents                           (AGENTPRI) = SYSTEM
                   Agent pool size                        (NUM_POOLAGENTS) = AUTOMATIC(100)
                   Initial number of agents in pool       (NUM_INITAGENTS) = 0
                   Max number of coordinating agents     (MAX_COORDAGENTS) = AUTOMATIC(200)
                   Max number of client connections      (MAX_CONNECTIONS) = AUTOMATIC(MAX_COORDAGENTS) Keep fenced process                        (KEEPFENCED) = YES
                   Number of pooled fenced processes         (FENCED_POOL) = AUTOMATIC(MAX_COORDAGENTS)
                   Initial number of fenced processes     (NUM_INITFENCED) = 0 Index re-creation time and redo index build  (INDEXREC) = RESTART Transaction manager database name         (TM_DATABASE) = 1ST_CONN
                   Transaction resync interval (sec)     (RESYNC_INTERVAL) = 180 SPM name                                     (SPM_NAME) = WORKS12
                   SPM log size                          (SPM_LOG_FILE_SZ) = 256
                   SPM resync agent limit                 (SPM_MAX_RESYNC) = 20
                   SPM log path                             (SPM_LOG_PATH) = 
                   TCP/IP Service name                          (SVCENAME) = db2c_DB2
                   Discovery mode                               (DISCOVER) = SEARCH
                   Discover server instance                (DISCOVER_INST) = ENABLE SSL server keydb file                   (SSL_SVR_KEYDB) = 
                   SSL server stash file                   (SSL_SVR_STASH) = 
                   SSL server certificate label            (SSL_SVR_LABEL) = 
                   SSL service name                         (SSL_SVCENAME) = 
                   SSL cipher specs                      (SSL_CIPHERSPECS) = 
                   SSL versions                             (SSL_VERSIONS) = 
                   SSL client keydb file                  (SSL_CLNT_KEYDB) = 
                   SSL client stash file                  (SSL_CLNT_STASH) = 
                   Maximum query degree of parallelism   (MAX_QUERYDEGREE) = ANY
                   Enable intra-partition parallelism     (INTRA_PARALLEL) = NO No. of int. communication buffers(4KB)(FCM_NUM_BUFFERS) = AUTOMATIC(1024)
                   No. of int. communication channels   (FCM_NUM_CHANNELS) = AUTOMATIC(512)
                   db2start/db2stop timeout (min)        (START_STOP_TIME) = 10 WLM dispatcher enabled                 (WLM_DISPATCHER) = NO WLM dispatcher concurrency            (WLM_DISP_CONCUR) = COMPUTED WLM dispatcher CPU shares enabled (WLM_DISP_CPU_SHARES) = NO WLM dispatcher min. utilization (%) (WLM_DISP_MIN_UTIL) = 5 Communication buffer exit library list (COMM_EXIT_LIST) = 
                   Current effective arch level         (CUR_EFF_ARCH_LVL) = V:10 R:5 M:0 F:5 I:0 SB:0
                   Current effective code level         (CUR_EFF_CODE_LVL) = V:10 R:5 M:0 F:5 I:0 SB:0 Keystore type                           (KEYSTORE_TYPE) = NONE
                   Keystore location                   (KEYSTORE_LOCATION) = 
                  

                  推薦答案

                  您需要使用 JDBC Type 2 URL (jdbc:db2:test) 而不是您正在使用的 Type 4 URL.您可以使用空的用戶名/密碼.

                  You need to use a JDBC Type 2 URL (jdbc:db2:test) Instead of the Type 4 URL you are using. You can use an empty username/password.

                  由于您的應(yīng)用程序與數(shù)據(jù)庫(kù)服務(wù)器在同一臺(tái)機(jī)器上運(yùn)行,您甚至不需要設(shè)置 AUTHENTICATION = CLIENTTRUST_ALLCLNTS = YES.

                  Since your application is running on the same machine as the database server, you don't even need to set AUTHENTICATION = CLIENT or TRUST_ALLCLNTS = YES.

                  這篇關(guān)于通過 JDBC 連接到 DB2 時(shí)的用戶名和密碼的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  How can I detect integer overflow on 32 bits int?(如何檢測(cè) 32 位 int 上的整數(shù)溢出?)
                  Local variables before return statements, does it matter?(return 語(yǔ)句之前的局部變量,這有關(guān)系嗎?)
                  How to convert Integer to int?(如何將整數(shù)轉(zhuǎn)換為整數(shù)?)
                  How do I create an int array with randomly shuffled numbers in a given range(如何在給定范圍內(nèi)創(chuàng)建一個(gè)隨機(jī)打亂數(shù)字的 int 數(shù)組)
                  Inconsistent behavior on java#39;s ==(java的行為不一致==)
                  Why is Java able to store 0xff000000 as an int?(為什么 Java 能夠?qū)?0xff000000 存儲(chǔ)為 int?)

                        <small id='c398N'></small><noframes id='c398N'>

                          <bdo id='c398N'></bdo><ul id='c398N'></ul>
                            <tbody id='c398N'></tbody>
                        • <legend id='c398N'><style id='c398N'><dir id='c398N'><q id='c398N'></q></dir></style></legend>

                          <tfoot id='c398N'></tfoot>
                        • <i id='c398N'><tr id='c398N'><dt id='c398N'><q id='c398N'><span id='c398N'><b id='c398N'><form id='c398N'><ins id='c398N'></ins><ul id='c398N'></ul><sub id='c398N'></sub></form><legend id='c398N'></legend><bdo id='c398N'><pre id='c398N'><center id='c398N'></center></pre></bdo></b><th id='c398N'></th></span></q></dt></tr></i><div class="83p3fyo" id='c398N'><tfoot id='c398N'></tfoot><dl id='c398N'><fieldset id='c398N'></fieldset></dl></div>

                          • 主站蜘蛛池模板: 早报网| 许昌奥仕达自动化设备有限公司 | 开云(中国)Kaiyun·官方网站-登录入口 | 游泳池设计|设备|配件|药品|吸污机-东莞市太平洋康体设施有限公司 | 干洗加盟网-洗衣店品牌排行-干洗设备价格-干洗连锁加盟指南 | 冷镦机-多工位冷镦机-高速冷镦机厂家-温州金诺机械设备制造有限公司 | 土壤墒情监测站_土壤墒情监测仪_土壤墒情监测系统_管式土壤墒情站-山东风途物联网 | 作文导航网_作文之家_满分作文_优秀作文_作文大全_作文素材_最新作文分享发布平台 | 机床主轴维修|刀塔维修|C轴维修-常州翔高精密机械有限公司 | 煤矿支护网片_矿用勾花菱形网_缝管式_管缝式锚杆-邯郸市永年区志涛工矿配件有限公司 | 砍排机-锯骨机-冻肉切丁机-熟肉切片机-预制菜生产线一站式服务厂商 - 广州市祥九瑞盈机械设备有限公司 | 安徽免检低氮锅炉_合肥燃油锅炉_安徽蒸汽发生器_合肥燃气锅炉-合肥扬诺锅炉有限公司 | 液压油缸生产厂家-山东液压站-济南捷兴液压机电设备有限公司 | 桑茶-七彩贝壳桑叶茶 长寿茶| 金刚网,金刚网窗纱,不锈钢网,金刚网厂家- 河北萨邦丝网制品有限公司 | 结晶点测定仪-润滑脂滴点测定仪-大连煜烁 | 耐火浇注料-喷涂料-浇注料生产厂家_郑州市元领耐火材料有限公司 耐力板-PC阳光板-PC板-PC耐力板 - 嘉兴赢创实业有限公司 | 缠绕机|缠绕膜包装机|缠绕包装机-上海晏陵智能设备有限公司 | 影像测量仪_三坐标测量机_一键式二次元_全自动影像测量仪-广东妙机精密科技股份有限公司 | 提升海外网站流量,增加国外网站访客UV,定制海外IP-访客王 | 艺术涂料|木纹漆施工|稻草漆厂家|马来漆|石桦奴|水泥漆|选加河南天工涂料 | SDG吸附剂,SDG酸气吸附剂,干式酸性气体吸收剂生产厂家,超过20年生产使用经验。 - 富莱尔环保设备公司(原名天津市武清县环保设备厂) | 北京翻译公司_同传翻译_字幕翻译_合同翻译_英语陪同翻译_影视翻译_翻译盖章-译铭信息 | ICP备案查询_APP备案查询_小程序备案查询 - 备案巴巴 | 企业VI设计_LOGO设计公司_品牌商标设计_【北京美研】 | 短信营销平台_短信群发平台_106短信发送平台-河南路尚 | PSI渗透压仪,TPS酸度计,美国CHAI PCR仪,渗透压仪厂家_价格,微生物快速检测仪-华泰和合(北京)商贸有限公司 | 干粉砂浆设备_干混砂浆生产线_腻子粉加工设备_石膏抹灰砂浆生产成套设备厂家_干粉混合设备_砂子烘干机--郑州铭将机械设备有限公司 | 股指期货-期货开户-交易手续费佣金加1分-保证金低-期货公司排名靠前-万利信息开户 | 精密线材测试仪-电线电缆检测仪-苏州欣硕电子科技有限公司 | 真空搅拌机-行星搅拌机-双行星动力混合机-广州市番禺区源创化工设备厂 | 定制异形重型钢格栅板/钢格板_定做踏步板/排水沟盖板_钢格栅板批发厂家-河北圣墨金属制品有限公司 | 气体热式流量计-定量控制流量计(空气流量计厂家)-湖北南控仪表科技有限公司 | 化工ERP软件_化工新材料ERP系统_化工新材料MES软件_MES系统-广东顺景软件科技有限公司 | 东莞工作服_东莞工作服定制_工衣订做_东莞厂服 | 磁棒电感生产厂家-电感器厂家-电感定制-贴片功率电感供应商-棒形电感生产厂家-苏州谷景电子有限公司 | 医院专用门厂家报价-医用病房门尺寸大全-抗菌木门品牌推荐 | ET3000双钳形接地电阻测试仪_ZSR10A直流_SXJS-IV智能_SX-9000全自动油介质损耗测试仪-上海康登 | 螺旋丝杆升降机-SWL蜗轮-滚珠丝杆升降机厂家-山东明泰传动机械有限公司 | 全自动不干胶贴标机_套标机-上海今昂贴标机生产厂家 | 石家庄网站建设|石家庄网站制作|石家庄小程序开发|石家庄微信开发|网站建设公司|网站制作公司|微信小程序开发|手机APP开发|软件开发 |