In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
■ phenomenon
The DB2,Schema does not match the user name that accesses the DB.
Schema must be specified when calling the stored procedure, otherwise Error.
■ error code
Stored procedure
SET SCHEMA = "QUOT"; SET CURRENT PATH = "SYSIBM", "SYSFUN", "SYSPROC", "SYSIBMADM", "DB2INST1"; CREATE PROCEDURE COPY_TABLES () BEGIN . END; GRANT EXECUTE ON PROCEDURE "QUOT". "COPY_TABLES" (INTEGER, TIMESTAMP, INTEGER, INTEGER) TO USER "DB2INST1" WITH GRANT OPTION
Mapper.xml
CALL COPY_TABLES (# {userId, jdbcType=INTEGER, mode=IN}, # {currentTime, jdbcType=TIMESTAMP, mode=IN}, # {reasonTypeFlag, jdbcType=INTEGER, mode=IN}, # {copyReason, jdbcType=INTEGER, mode=IN})
Mapper.java
/ * Copy Tables * * @ param param the parameter * / void copyTables (Map param)
Service.java
Map paramMap = new HashMap (); paramMap.put ("userId", userId); paramMap.put ("currentTime", currentTime); paramMap.put ("reasonTypeFlag", 1); paramMap.put ("copyReason", 1); Mapper.copyQuotationTables (paramMap)
Tomcat context.xml
■ correct code
Append currentFunctionPath to Tomcat context.xml.
If you want to call a stored procedure in a DB tool such as Toda, but do not specify Schema
Such as CALL COPY_TABLES (.)
You need to specify Current Path when you create a stored procedure
SET CURRENT PATH = "SYSIBM", "SYSFUN", "SYSPROC", "SYSIBMADM", "DB2INST1", "QUOT"
■ reason
DB2 stored procedures (and functions) are not controlled by CURRENT SCHEMA, but by CURRENT PATH.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.