简体   繁体   English

在AS400中使用DB2的URL设置currentSchema

[英]setting currentSchema using URL for DB2 in AS400

With DB2 JDBC type 4 driver (com.ibm.db2.jcc.DB2Driver), the URL to use in the configuration to connect to a DB2 database is: jdbc:db2://HOST:PORT/DATABASE:currentSchema=SCHEMA; 使用DB2 JDBC类型4驱动程序(com.ibm.db2.jcc.DB2Driver),在配置中用于连接到DB2数据库的URL是:jdbc:db2:// HOST:PORT / DATABASE:currentSchema = SCHEMA; this is working perfectly fine with mainframes database. 这与大型机数据库完美配合。

But what is the URL to connect to a database on AS400 using the driver 'com.ibm.as400.access.AS400JDBCDriver'... 'currentSchema' included in the URL, is not working in this case. 但是,使用URL中包含的驱动程序“com.ibm.as400.access.AS400JDBCDriver”...“currentSchema”连接到AS400上的数据库的URL是什么,在这种情况下不起作用。 The username is being considered as the name of the schema. 用户名被视为架构的名称。 How do I set current schema using URL? 如何使用URL设置当前架构?

Use the as400 sub-protocol, and specify your default like this 使用as400子协议,并指定您的默认值

jdbc:as400://hostname/default-schema 

http://www-01.ibm.com/support/docview.wss?uid=swg21398042 http://www-01.ibm.com/support/docview.wss?uid=swg21398042

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM