Oracle神諭

            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
            284 隨筆 :: 9 文章 :: 106 評論 :: 0 Trackbacks

          我們使用jtds的SQL Server的驅動替代原來的SQL Server的驅動。后來出現在log中輸出了這樣的信息:
          2005-06-30 09:42:10 [org.hibernate.util.JDBCExceptionReporter] [http-8080-Processor24] [WARN] - SQL Warning: 5701, SQLState: 01000
          2005-06-30 09:42:10 [org.hibernate.util.JDBCExceptionReporter] [http-8080-Processor24] [WARN] - 已將數據庫上下文改為 'logistics'。
          2005-06-30 09:42:10 [org.hibernate.util.JDBCExceptionReporter] [http-8080-Processor24] [WARN] - SQL Warning: 5703, SQLState: 01000
          2005-06-30 09:42:10 [org.hibernate.util.JDBCExceptionReporter] [http-8080-Processor24] [WARN] - 已將語言設置改為 簡體中文。
          經過使用Debug級別的log輸出,發現是在
          SQLDiagnostic.java
           /**
               * Create a dianostic SQLException or SQLWarning.
               *
               * @param number SQL Server error number.
               * @param state SQL Server state code.
               * @param serverity SQL Server serverity > 10 = error.
               * @param message SQL Server error message text.
               * @param server SQL Server name.
               * @param procName SQL Server stored procedure name.
               * @param line SQL Server error line number in SQL source.
               */
              void addDiagnostic(int number,
                                 int state,
                                 int serverity,
                                 String message,
                                 String server,
                                 String procName,
                                 int line)
          這里捕獲了 SQL Server error number的,
          后經過MSDN找到如下資料:
          http://msdn.microsoft.com/library/default.asp?url=/library/en-us/trblsql/tr_reslsyserr_2_9dtd.asp

          Error 5701

          Severity Level 10
          Message Text

          Changed database context to '%.*ls'.

          Explanation

          This is an informational message indicating that the database context has changed. This message is returned anytime a USE database statement is executed.

          Action

          None needed.

          http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbcsql/od_6_010_34oj.asp

          5701

          Indicates that SQL Server put the user's context into the default database defined in the data source, or into the default database defined for the login ID used in the connection if the data source did not have a default database.

          5703

          Indicates the language being used on the server.

          posted on 2005-06-30 10:06 java世界暢談 閱讀(974) 評論(1)  編輯  收藏 所屬分類: JDBC Driver

          評論

          # re: 對JTDS的SQLWarning 的拋出的分析 2007-06-13 15:10 wang
          用JSQL Driver  回復  更多評論
            


          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 罗平县| 辽中县| 晋州市| 旺苍县| 庆阳市| 平邑县| 永顺县| 通化县| 武威市| 长垣县| 山阴县| 汕头市| 威宁| 新乐市| 临夏市| 池州市| 黑水县| 河西区| 陵川县| 安康市| 建始县| 桑日县| 汉川市| 河曲县| 昌都县| 商河县| 临夏市| 平安县| 灌南县| 和田县| 梅河口市| 邯郸市| 古丈县| 岗巴县| 桃园县| 龙门县| 日喀则市| 宁城县| 休宁县| 金华市| 涪陵区|