Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2005
    Posts
    127

    Unanswered: JDBC Connectivity to DB2 using Schema name

    Hi,


    1. How could i connect to DB2 using schema name as a parameter. kindly provide me examples or relevent links
    2. DB2 variables are non-case sensitive. Is there any option to make it case sensitive(like configurable option or installation option)

    Thanks,
    Sn

  2. #2
    Join Date
    Nov 2004
    Posts
    374

    schema

    do you mean : set current schema xxxxx ??
    what would be the purpose ? not qualifying the tablenames ?
    Best Regards, Guy Przytula
    DB2/ORA/SQL Services
    DB2 DBA & Advanced DBA Certified
    DB2 Dprop Certified
    http://users.skynet.be/przytula/dbss.html

  3. #3
    Join Date
    Apr 2005
    Posts
    127
    Hi,

    I want to connect to DB2 database via JDBC, is it possible to connect using schema name.. ie., is there any provisions to provide schema name in the connection parameters.

    regards
    Sn
    Last edited by Shefu; 01-03-06 at 08:52.

  4. #4
    Join Date
    Apr 2005
    Posts
    127
    Hi,

    I tried ur set schema option, it works fine for me.

    thanks a lot

    cheers
    sn

  5. #5
    Join Date
    Nov 2004
    Posts
    1,427
    Provided Answers: 4
    Quote Originally Posted by Shefu
    2. DB2 variables are non-case sensitive. Is there any option to make it case sensitive(like configurable option or installation option)
    Don't know what you exactly mean with "variables", but if you mean database objects (table, column, ..) names, you can place the names between double quotes "", otherwise DB2 will convert them automatically to UPPERCASE.
    create table Schemanm.TestTable1 (
    Field1 INT not null);
    internally, DB2 will interpret this as:
    create table SCHEMANM.TESTTABLE1 (
    FIELD1 INT not null);

    create table "Schemanm"."TestTable2" (
    "Field1" INT not null);
    internally, DB2 will interpret this as:
    create table Schemanm.TestTable2 (
    Field1 INT not null);

    SELECT * FROM Schemanm.TestTable1;
    SELECT * FROM SchemaNm.TESTTable1;
    SELECT * FROM SCHEMANM.TESTTABLE1;
    SELECT * FROM "SCHEMANM"."TESTTABLE1";
    will all work.

    SELECT * FROM Schemanm.TestTable1;
    will not work.

    Only
    SELECT * FROM "Schemanm"."TestTable2";
    will work.
    With kind regards . . . . . SQL Server 2000/2005/2012
    Wim

    Grabel's Law: 2 is not equal to 3 -- not even for very large values of 2.
    Pat Phelan's Law: 2 very definitely CAN equal 3 -- in at least two programming languages

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •