473,232 Members | 1,539 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,232 software developers and data experts.

DB2 V 9.1: JDBC driver: How to set default schema

Using the IBM Universal JDBC (Type 4) driver;
Can one specify a default schema as part of the url?
Some application servers do not allow sending a default sql command
upon connection, so I can't rely on 'set schema xyz', hence the need
to set the default via the jdbc url.

Thanks.
natG

Apr 17 '07 #1
7 68842
natG wrote:
Using the IBM Universal JDBC (Type 4) driver;
Can one specify a default schema as part of the url?
Some application servers do not allow sending a default sql command
upon connection, so I can't rely on 'set schema xyz', hence the need
to set the default via the jdbc url.
One of these days I'll have to learn this stuff...
I thought there are so called "connection properties". (?)
Hoping for Knut (not the bear) to come to the rescue...

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Apr 17 '07 #2
Hello.

Search for currentSchema word at
http://publib.boulder.ibm.com/infoce...c/rjvdsprp.htm

Sincerely,
Mark B.

On Apr 17, 10:17 pm, natG <natgr...@gmail.comwrote:
Using the IBM Universal JDBC (Type 4) driver;
Can one specify a default schema as part of the url?
Some application servers do not allow sending a default sql command
upon connection, so I can't rely on 'set schema xyz', hence the need
to set the default via the jdbc url.

Thanks.
natG

Apr 18 '07 #3
Thank you, Serge and Mark. I have seen that page before posting here.
The problem is that when defining a datasource xml, I cannot specify
properties.
I am only allowed 1) URL. 2) Logon & password. Now, some other vendors
jdbc driver allows me to specify these properties as part of the url
logon, and although the page Mark posted above alludes to a 'url
string', it does not specify any details.

For example. One of my jdbc url's is: jdbc:db2://mserver:50007/MYDB7T.
I would like to use something like: jdbc:db2://mserver:50007/
MYDB7T:currentSchema=MySchema.

Thanks
nat

Apr 18 '07 #4
Ray
On Apr 18, 12:04 pm, natG <natgr...@gmail.comwrote:
Thank you, Serge and Mark. I have seen that page before posting here.
The problem is that when defining a datasource xml, I cannot specify
properties.
I am only allowed 1) URL. 2) Logon & password. Now, some other vendors
jdbc driver allows me to specify these properties as part of the url
logon, and although the page Mark posted above alludes to a 'url
string', it does not specify any details.

For example. One of my jdbc url's is: jdbc:db2://mserver:50007/MYDB7T.
I would like to use something like: jdbc:db2://mserver:50007/
MYDB7T:currentSchema=MySchema.

Thanks
nat
There should be a section of the dialog where you can add ad hoc
properties and values. I believe that's what they're referring to.

Apr 18 '07 #5
On Apr 18, 9:04 pm, natG <natgr...@gmail.comwrote:
Thank you, Serge and Mark. I have seen that page before posting here.
The problem is that when defining a datasource xml, I cannot specify
properties.
I am only allowed 1) URL. 2) Logon & password. Now, some other vendors
jdbc driver allows me to specify these properties as part of the url
logon, and although the page Mark posted above alludes to a 'url
string', it does not specify any details.

For example. One of my jdbc url's is: jdbc:db2://mserver:50007/MYDB7T.
I would like to use something like: jdbc:db2://mserver:50007/
MYDB7T:currentSchema=MySchema.

Thanks
nat
according to
http://publib.boulder.ibm.com/infoce...c/tjvjcccn.htm
this url should give you ability to set default schema:
"jdbc:db2://mserver:50007/MYDB7T:currentSchema=MySchema"
It doesn't work?

Apr 18 '07 #6
On Apr 18, 9:54 pm, 4.s...@mail.ru wrote:
On Apr 18, 9:04 pm, natG <natgr...@gmail.comwrote:
Thank you, Serge and Mark. I have seen that page before posting here.
The problem is that when defining a datasource xml, I cannot specify
properties.
I am only allowed 1) URL. 2) Logon & password. Now, some other vendors
jdbc driver allows me to specify these properties as part of the url
logon, and although the page Mark posted above alludes to a 'url
string', it does not specify any details.
For example. One of my jdbc url's is: jdbc:db2://mserver:50007/MYDB7T.
I would like to use something like: jdbc:db2://mserver:50007/
MYDB7T:currentSchema=MySchema.
Thanks
nat

according tohttp://publib.boulder.ibm.com/infocenter/db2luw/v9/topic/com.ibm.db2....
this url should give you ability to set default schema:
"jdbc:db2://mserver:50007/MYDB7T:currentSchema=MySchema"
It doesn't work?
sorry, correct url is:
"jdbc:db2://mserver:50007/MYDB7T:currentSchema=MySchema;"

Apr 18 '07 #7
On Apr 18, 1:58 pm, 4.s...@mail.ru wrote:
On Apr 18, 9:54 pm, 4.s...@mail.ru wrote:
On Apr 18, 9:04 pm, natG <natgr...@gmail.comwrote:
Thank you, Serge and Mark. I have seen that page before posting here.
The problem is that when defining a datasource xml, I cannot specify
properties.
I am only allowed 1) URL. 2) Logon & password. Now, some other vendors
jdbc driver allows me to specify these properties as part of the url
logon, and although the page Mark posted above alludes to a 'url
string', it does not specify any details.
For example. One of my jdbc url's is: jdbc:db2://mserver:50007/MYDB7T.
I would like to use something like: jdbc:db2://mserver:50007/
MYDB7T:currentSchema=MySchema.
Thanks
nat
according tohttp://publib.boulder.ibm.com/infocenter/db2luw/v9/topic/com.ibm.db2....
this url should give you ability to set default schema:
"jdbc:db2://mserver:50007/MYDB7T:currentSchema=MySchema"
It doesn't work?

sorry, correct url is:
"jdbc:db2://mserver:50007/MYDB7T:currentSchema=MySchema;"
Bravo! NOW it works! It was the semicolon at the end I was missing.
Thank you much!
nat

Apr 18 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Axel Dachtler | last post by:
Hello, my Java-program can't load the JDBC driver. I always get a java.lang.NoClassDefFoundError when I run it. The JDBC Driver is in the directory: C:\programs\ora92\jdbc\lib I think I...
1
by: Ajay | last post by:
Hi, Could some please tell me whether Microsoft provides Type 2 and Type 4 jdbc driver ? For Type 4 MS provides com.microsoft.jdbc.sqlserver.SQLServerDriver driver. What is the cofiguration...
4
by: Dani | last post by:
Hi everyone Description of the problem: Using a PreparedStatement to write down an integer (int) plus a timestamp for testing purposes. When read out again the integer looks very different. We...
0
by: Bing | last post by:
Hi, I am configuring the same DB2 v8.1 JDBC universal driver (db2jcc.jar and db2jcc_license_cisuz.jar) from DB2 SP5 fix pack under WSAD 5.1.x environment and WebSphere application Server 5.0.2...
2
by: Raquel | last post by:
Read this about the Universal JDBC Driver.... "In a Type 2 mode, the Universal JDBC driver provides local application performance gains (because it avoids using TCP/IP protocol to communicate to...
1
by: eugene | last post by:
Happy Christmas to all (who celebrate)! It's still not clear to me... when in a java stored procedure it says: conn = DriverManager.getConnection("jdbc:default:connection"); what driver DB2...
0
by: Kris Jurka | last post by:
The JDBC driver has been moved out of the main source tree to a gborg project. This change will only affect new major releases. The 7.4 series will continue to be maintained in the main tree. ...
11
by: David H. Cook | last post by:
Hi - I just installed the express-edition of DB2 server (on a Win-XP machine), and then I setup a client JDBC driver to access it. The query is a simple 'select * from EMPLOYEE' against their...
1
by: rpm45tech | last post by:
Hi everyone. I'm deveolping in Java with DB2 running on Win XP and everything was working ok but then I installed Vista Ultimate and the application stopped working. This is the exception showed: ...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.