DB2 connect to database連線資料包錯
今天應用報錯,嘗試重啟db2服務,報錯了:
[db2inst1@localhost db2dump]$ db2stop
03/16/2012 14:13:04 0 0 SQL1025N The database manager was not stopped because databases are still active.
SQL1025N The database manager was not stopped because databases are still active.
之後執行強制關閉:
[db2inst1@localhost db2dump]$ db2stop force
03/16/2012 14:14:52 0 0 SQL1064N DB2STOP processing was successful.
SQL1064N DB2STOP processing was successful.
關閉成功了
再次啟動資料庫:
[db2inst1@localhost db2dump]$ db2start
03/16/2012 14:15:00 0 0 SQL1063N DB2START processing was successful.
SQL1063N DB2START processing was successful.
然後連線資料庫報錯了:
[db2inst1@localhost db2dump]$ db2
(c) Copyright IBM Corporation 1993,2007
Command Line Processor for DB2 Client 9.7.5
You can issue database manager commands and SQL statements from the command
prompt. For example:
db2 => connect to sample
db2 => bind sample.bnd
For general help, type: ?.
For command help, type: ? command, where command can be
the first few keywords of a database manager command. For example:
? CATALOG DATABASE for help on the CATALOG DATABASE command
? CATALOG for help on all of the CATALOG commands.
To exit db2 interactive mode, type QUIT at the command prompt. Outside
interactive mode, all commands must be prefixed with 'db2'.
To list the current command option settings, type LIST COMMAND OPTIONS.
For more detailed help, refer to the Online Reference Manual.
db2 => connect to newhis
SQL0752N Connecting to a database is not permitted within a logical unit of
work when the CONNECT type 1 setting is in use. SQLSTATE=0A001
類連線設定時,在邏輯工作單元內不允許連線資料庫。
解釋:
發出 COMMIT 或 ROLLBACK
語句之前,嘗試連線另一個資料庫或同一個資料庫。在 CONNECT 1
類環境內不能處理該請求。
發出 COMMIT 或 ROLLBACK
語句之前,嘗試連線另一個資料庫或同一個資料庫。在 CONNECT 1
類環境內不能處理該請求。
退出執行reset
重新執行就可以了,
[db2inst1@localhost ~]$ db2 connect reset
[db2inst1@localhost db2dump]$ db2 connect to newhis
Database Connection Information
Database server = DB2/LINUX 9.7.5
SQL authorization ID = DB2INST1
Local database alias = NEWHIS
一切正常了
[db2inst1@localhost db2dump]$ db2
(c) Copyright IBM Corporation 1993,2007
Command Line Processor for DB2 Client 9.7.5
You can issue database manager commands and SQL statements from the command
prompt. For example:
db2 => connect to sample
db2 => bind sample.bnd
For general help, type: ?.
For command help, type: ? command, where command can be
the first few keywords of a database manager command. For example:
? CATALOG DATABASE for help on the CATALOG DATABASE command
? CATALOG for help on all of the CATALOG commands.
To exit db2 interactive mode, type QUIT at the command prompt. Outside
interactive mode, all commands must be prefixed with 'db2'.
To list the current command option settings, type LIST COMMAND OPTIONS.
For more detailed help, refer to the Online Reference Manual.
db2 => connect to newhis
Database Connection Information
Database server = DB2/LINUX 9.7.5
SQL authorization ID = DB2INST1
Local database alias = NEWHIS
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22418990/viewspace-718747/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- db2 連線報錯connect。 ERRORCODE=-4499, SQLSTATE=08001DB2ErrorSQL
- 連線資料庫出錯???資料庫
- DB2資料庫連線失敗問題DB2資料庫
- 連線DB2時出錯:encoding not supported??DB2Encoding
- 使用RMySQL包來連線MySQL資料庫MySql資料庫
- Oracle連線Db2OracleDB2
- 第 67 期 Go database/sql 資料庫連線池分析GoDatabaseSQL資料庫
- JDBC中連線資料庫的常用jar包JDBC資料庫JAR
- 連線mysql時提示is not allowed to connect不允許連線MySql
- Navicat連線centos裡mysql報錯Host is not allowed to connect to this MySQL serverCentOSMySqlServer
- 連線mysql報錯lost connect to sever during query解決MySql
- 網站連線資料庫配置錯誤網站資料庫
- 網站提示資料庫連線錯誤網站資料庫
- database的connectDatabase
- DB2___安裝db2客戶端並連線到db2資料庫DB2客戶端資料庫
- 連線MySQL錯誤:Can't connect to MySQL server (10060)MySqlServer
- MMMNL absent錯誤 ,資料庫無法連線資料庫
- Oracle 資料庫連線錯誤解決方法Oracle資料庫
- DedeCms錯誤警告:連線資料庫失敗資料庫
- SQLYOG連線資料庫時報錯1251SQL資料庫
- asp網站提示資料庫連線出錯網站資料庫
- PbootCMS錯誤提示:資料庫連線失敗boot資料庫
- IDEA安裝外掛【Database navigation】並連線資料庫IdeaDatabaseNavigation資料庫
- 如何處理WordPress網站提示“建立資料庫連線時出錯”或“Error establishing a database connection”錯誤網站資料庫ErrorDatabase
- db2 遠端連線伺服器 解決-668 錯誤DB2伺服器
- Java各資料庫jdbc連線,和需要的jar包Java資料庫JDBCJAR
- oracle 到 db2 通用連線OracleDB2
- 網站資料庫連線錯誤怎麼辦?網站資料庫
- 用Navicat連線資料庫-資料庫連線(MySQL演示)資料庫MySql
- Azure web 連線到Azure databaseWebDatabase
- 阿里雲資料庫連線資料庫錯誤:如何解決?阿里資料庫
- 連線資料庫資料庫
- 資料庫連線資料庫
- 轉:DB2聯合資料庫(FEDERATED DATABASE)配置例項DB2資料庫Database
- 資料庫連線池基本介紹及常用jar包<一>資料庫JAR
- DB2 SQL之行合併(連線)DB2SQL
- Java 連線 DB2的工具類JavaDB2
- Tomcat DBCP(Database Connection Pool) 資料庫連線池入門介紹TomcatDatabase資料庫