Question about JDBC and Oracle 10g AL32UTF8

Hey all,
Currently I have a Java program that uses lib: ojdbc14.zip. It works fine for our Oracle 10g database, but when we converted our character set to AL32UTF8, our program seems to have stopped working properly. For instance, I grab a count(*), to see how many rows an ID has in a table. Then I take that list and display and count(*) that are greater than 0. Well, my first getString works properly to generate the select count(*) statements for all the tables in the database. But then when I execute those select count(*) I can grab out the number greater than 0. That's column 1. Then the owner name is displayed in column 2. and the table name is displayed in column 3. When I do a getString(2) we only get the first letter (sometimes) of the owner of the table. Same with the table name.
For instance, before AL32UTF8
getString(2): SCOTT
getString(3): PEOPLE
After
getString(2): S
getString(3): P
Now to open my connection I use:
static Connection conn;
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
conn = DriverManager.getConnection(connection_string, username, password);
And to create query I use:
Statement query_1 = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
Any help will be greatly appreciated. Thanks
Sincerely,
Mel

orkun wrote:
I was wondering whether it was a correct way :
-retrieving data with resultset and putting them to an arraylist, then getting to jsf datatable.Your question/problem statement is unclear, but just lookup the DAO pattern.
Is there any better way I can speed up retrieving data from databse ?Performance is a matter of good code and datamodel and decent hardware.

Similar Messages

  • Questions about free Download Oracle 10g, Database and Developer suite

    Hi everyone, got some questions..
    1) Is it possible to download free Oracle 10g and Developer suite? is a 30 day license trial or something like that?
    2) On windows systems which are the minimun requirements?, for example in a Pentium 4, 512Mb RAM, Windows XP Home edition is OK?
    3) Should I download Standard Edition? Personal?
    4) If I am trying to update my Oracle Developer knowledge (I was developer on 1999 with Oracle 7.3 and Developer 2000) what products do I have to install?? Oracle DB 10g, Developer Suite,Application Server too?, what else?
    Thanks guys!
    J.

    My answer you could find here Questions about free download Oracle 10g, Developer Suite

  • Questions about free download Oracle 10g, Developer Suite

    Hi everyone, got some questions..
    1) Is it possible to download free Oracle 10g and Developer suite? is a 30 day license trial or something like that?
    2) On windows systems which are the minimun requirements?, for example in a Pentium 4, 512Mb RAM, Windows XP Home edition is OK?
    3) Should I download Standard Edition? Personal?
    4) If I am trying to update my Oracle Developer knowledge (I was developer on 1999 with Oracle 7.3 and Developer 2000) what products do I have to install?? Oracle DB 10g, Developer Suite,Application Server too?, what else?
    Thanks guys!
    J.

    1. It's posssible to download full version. Look at http://www.oracle.com/technology/software/index.html
    2. Minimum requirements are described in documentation.
    More at: http://www.oracle.com/technology/documentation/index.html
    3. AFAIK there are not Standard or Personal edition of Oracle Developer Suite just DB is in that versions.
    Check the details about product and choose one.
    4. I'think you just need Oracle DB and Oracle DS. Beter check the details about each of product and make your own decision.

  • Question about MX7 and Oracle 10GR2 RAC

    Can someone tell me if it's possible to pass parameter names
    to and oracle function in MX7. I have a function that returns a
    refcursor that worked fine as a simply function now it's an
    overloaded function and I need to pass different parameter names
    and I cannot get it to work. Is this a problem with MX7?

    I did a little testing, and it looks like overloading seems
    to be working (for the most part) with MX 7
    except
    when calling an overloaded procedure that has a refcursor OUT
    parameter. My guess is that since you do not specify a CFPROCPARAM
    tag for refcursor parameters, but instead use a CFPROCRESULT tag to
    capture the result set, there is probably a bind problem with the
    parameter. I'm getting a
    [Macromedia][Oracle JDBC Driver]No more data available to
    read. error when I try to call it using CFPROCRESULT tag, and a
    [Macromedia][Oracle JDBC Driver]The specified SQL type is not
    supported by this driver. error if I try to use a CFPROCPARAM
    OUT parameter of type="CF_SQL_REFCURSOR"
    If ALL of the overloaded procedures do have refcursors, and I
    only change the IN parameter types, and do not change the number of
    parameters, etc., then I get a
    [Macromedia][Oracle JDBC Driver][Oracle]ORA-06550: line 1,
    column 7: PLS-00306: wrong number or types of arguments in call to
    'OVER1_SP' ORA-06550: line 1, column 7: PL/SQL: Statement
    ignored error.
    Phil

  • Question about FCF and Oracle load Balance

    We have recently set up the FCF and load balance advisory.
    We are using JDBC UCP connection Pool.
    Here is the service name is as following:
    CATEST_FCF =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ptt-pt-ildb-01-vip)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = ptt-pt-ildb-02-vip)(PORT = 1521))
    (LOAD_BALANCE = yes)
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = CATEST_FCF.THECPP.COM)
    (FAILOVER_MODE =
    (TYPE = SELECT)
    (METHOD = BASIC)
    (RETRIES = 180)
    (DELAY = 5)
    -- service goal is SERVICE_TIME and CLB_GOAL is LONG
    -- ons.config
    localport=6101
    remoteport=6200
    loglevel=9
    useocr=on
    I was trying some test as the link below.
    http://drdobbs.com/java/222700353?pgno=1
    but my client is always trying to connect to instance 2 even the sys.sys$service_metrics_tab already showed the instance 1 can take on more load.
    Total held connections: 9
    [0] Instance name [TZNTEST2]
    [1] Instance name [TZNTEST2]
    [2] Instance name [TZNTEST2]
    [3] Instance name [TZNTEST2]
    [4] Instance name [TZNTEST2]
    [5] Instance name [TZNTEST2]
    [6] Instance name [TZNTEST2]
    [7] Instance name [TZNTEST2]
    [8] Instance name [TZNTEST2]
    (CATEST_FCF, VERSION=1.0 database=CATEST service=CATEST_FCF { {instance=CATEST1 percent=88 flag=GOOD}{instance=CATEST2 percent=12 flag=GOOD} } timestamp=2011-04-12 11:59:36)
    am I correct here? the percent for CATEST1 is 88. Does it mean CATEST1 is able to take on 88% more load, so it is more attractive now?
    and why the connections always fell on CATEST2? How does oracle calculate the number of connections to each instance. Does it count inactive or killed session too? does it offer the load balance stats based on total number of connections on each instance or total number of connections just to this serivce on each instance?

    I don't know if this helps, but there is a reply comment from
    Macromedia at the bottom of the MX 6 LiveDocs for tag
    cfprocparam
    which was in response to a comment pointing out that calling
    overloaded stored procedures containing refcursors did not work. (I
    submitted a similar question to Adobe last night in the MX 7
    version of LiveDocs for cfprocparam and am waiting for it to post.)
    Macromedia jrunrandy said on Jun 30, 2005 at 9:45 AM :
    I checked and regret to say that this isn't supported. There
    is a bug for this issue,
    53122, but it hasn't been addressed as of CFMX 7.
    I think that this is going to be as official of a response
    from Macromedia/Adobe as you are going to get unless you open a
    trouble report yourself. I hope that this is enough to satisfy the
    requirements of your DBA. Otherwise, you are probably going to have
    to shell out the cash for an official trouble report to Adobe
    (unless you have paid support).
    Phil

  • A question about JDBC and MySQL

    hello dear friends,ask a question:
    if in MySQL database, i have defined a clumon as TEXT data type.
    when i use JDBC, i use which kind of java data type to hold TEXT,
    i mean which getXXX() method i should use.
    is it possible i just use getObject() and cast it to a binarystream??
    thanks in advanced.

    use this:
    declare it 1st
    String x ="";
    then u can now get the value of the field...
    x = getString("<fieldName>");is there length limitation?
    for example, i want store a String which is got from a JTextArea, i also treat it as String and insert into the column with TEXT datatype like
    insert table_name (text_column) values( string_1)
    this works in JSP, should work in JAVA too...
    hope i helped... ^_^

  • Question about jdbc and jsf datatable

    hello
    I was wondering whether it was a correct way :
    -retrieving data with resultset and putting them to an arraylist, then getting to jsf datatable.
    or
    Is there any better way I can speed up retrieving data from databse ?
    regards

    orkun wrote:
    I was wondering whether it was a correct way :
    -retrieving data with resultset and putting them to an arraylist, then getting to jsf datatable.Your question/problem statement is unclear, but just lookup the DAO pattern.
    Is there any better way I can speed up retrieving data from databse ?Performance is a matter of good code and datamodel and decent hardware.

  • Not able to fetch updated data using jdbc and oracle 10g

    Whenever i m updating the data and fetching the same record after updating i m not able to get the fresh/new updated data , old record is fetched every time, but when i checked in database the record gets updated successfully , even if i fire the query two times after 10 seconds using Thread.sleep even then problem persist.
    Please help me out!!!!!!!!
    Implementation has been stucked up!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! :(

    Well its okWhat is OK? Your stuff working now?
    i m doing the same thing Apparently not.
    please go thru the below code fragment:
    code for Update :::
    DataAccessBean1 partsHistoryDataAccessBean = new
    DataAccessBean1(context);
    partsHistoryDataAccessBean.setData(data);
    partsHistoryDataAccessBean.update();
    After Updating i m forwading it to the other servletForwarding what? Why do you need another servlet? Just do the query, put the new data into the response object, and return.
    According to your assumption i should get the updated
    data on the other screen but Nope, you don't understand what I'm saying.
    %

  • Using Clob with TopLink 9.0.4.5 and Oracle 10g RAC

    I am trying to store an XML file in a Clob type field of a DB table using TopLink 9.0.4.5 and Oracle 10g RAC and need some guidance about how to do it. I got some directions to start it with the Tip "How-To: Map Large Objects (LOBs) to Oracle Databases with OracleAS TopLink" but still need some more helps.
    When using the Oracle JDBC OCI driver, the tip gives the code block for a Clob field:
    DirectToField scriptMapping = new DirectToField();
    scriptMapping.setAttributeName("script");
    scriptMapping.setFieldName("IMAGE.SCRIPT");
    descriptor.addMapping(scriptMapping);
    As I understand, TopLink creates instances of the Descriptor class at run time for each of the descriptor files and stores them in a database session, where is the proper place (in SessionEvent of TopLinkSessionEventHandler?) for me to get a reference to such an instance of my Descriptor class in Java code so that I can add the above mentioned additional Mapping? Are the above String values of "script" and "IMAGE.SCRIPT" predefined in TopLink API? Can I accomplish the same thing just using the TopLink Workbench tool instead? If yes, please advise the detailed steps to do so.
    The tip also states to call the following code in case of using Clob:
    DatabaseLogin login = session.getLogin();
    login.useStringBinding();
    Should the above 2 lines of code be called after the following lines of code?
    SessionManager sessionManager = SessionManager.getManager();
    Server serverSession = (Server)sessionManager.getSession("MY_SESSION_NAME");
    Besides the above extra coding for the Session and Descriptor Mapping, is there any special handling in between Data model and DB table mapping? Can I map a Java String type to a DB Clob field using the Direct-to-field mapping?
    Appreciate any help.

    Never mind ....... I had already figured it out .....

  • ####a question about jdbc driver

    A question about jdbc driver: for Oracle JDBC drivers which will not allow O/R
    tools to access columns over 4 kb. This affects some of the functionality of my
    application.A workaround is to use the my JDBC driver that acts as a wrapper to
    ensure that columns over 4 kb read and persist properly. my JDBC driver determines
    which actual driver to load based on the connection URL. If you pass in a URL
    that contains the string jdbc:oracle:thin, it will know to load oracle.jdbc.driver.OracleDriver.
    If the URL contains the string jdbc:db2, it will know to load COM.ibm.db2.jdbc.net.DB2Driver,
    and so on.
    now i have set CLASSPATH for my jdbc wapper,when I Creating and Configuring a
    JDBC Connection Pool,i have to input my driver name such com.lawrence.driver.....then
    i did,all
    is well,then i restart my WLS,when load config.xml,some errors such as "No registered
    driver accept URL:jdbc:oracle:thin:@localhost:1521:lawrence",if i set driver name
    is oracle.jdbc.driver.OracleDriver,all is good,no any errors.
    I find some questions like:
    1.for WLS8.1 ,it is only find some registed driver?
    2.why it cannot load my driver wapper when it is loading jdbc Connection Pool,but
    when the WLS start is finished, i Creating and Configuring a JDBC Connection Pool
    then it is right?

    my JDBC driver like this:
    public class myDriver implements Driver {
         public static String DB2_DRIVER = "COM.ibm.db2.jdbc.net.DB2Driver";
         public static String DB2_URL = "jdbc:db2:";
         public static String HYPERSONIC_DRIVER = "org.hsqldb.jdbcDriver";
         public static String HYPERSONIC_URL = "jdbc:hsqldb:";
         public static String MYSQL_DRIVER = "com.mysql.jdbc.Driver";
         public static String MYSQL_URL = "jdbc:mysql:";
         public static String ORACLE_DRIVER = "oracle.jdbc.driver.OracleDriver";
         public static String ORACLE_URL = "jdbc:oracle:";
         public static String POSTGRESQL_DRIVER = "org.postgresql.Driver";
         public static String POSTGRESQL_URL = "jdbc:postgresql:";
         public static String SQLSERVER_DRIVER =
              "com.microsoft.jdbc.sqlserver.SQLServerDriver";
         public static String SQLSERVER_URL = "jdbc:microsoft:";
         public boolean acceptsURL(String url) throws SQLException {
              return true;
         public synchronized Connection connect(String url, Properties props)
              throws SQLException {
              if (_driver == null) {
                   Class driverClass = null;
                   try {
                        if (url.startsWith(DB2_URL)) {
                             driverClass = Class.forName(DB2_DRIVER);
                        else if (url.startsWith(HYPERSONIC_URL)) {
                             driverClass = Class.forName(HYPERSONIC_DRIVER);
                        else if (url.startsWith(MYSQL_URL)) {
                             driverClass = Class.forName(MYSQL_DRIVER);
                        else if (url.startsWith(ORACLE_URL)) {
                             driverClass = Class.forName(ORACLE_DRIVER);
                        else if (url.startsWith(POSTGRESQL_URL)) {
                             driverClass = Class.forName(POSTGRESQL_DRIVER);
                        else if (url.startsWith(SQLSERVER_URL)) {
                             driverClass = Class.forName(SQLSERVER_DRIVER);
                        _driver = (Driver)driverClass.newInstance();
                   catch (Exception e) {
                        throw new SQLException(e.getMessage());
              Connection con = _driver.connect(url, props);
              return new myConnection(con);
         public int getMajorVersion() {
              return _driver.getMajorVersion();
         public int getMinorVersion() {
              return _driver.getMinorVersion();
         public DriverPropertyInfo[] getPropertyInfo(String url, Properties props)
              throws SQLException {
              return _driver.getPropertyInfo(url, props);
         public boolean jdbcCompliant() {
              return _driver.jdbcCompliant();
         private Driver _driver;

  • Can Adavnced queues be set up beteen oracle 8.1.6 and oracle 10g

    can Adavnced queues be set up beteen oracle 8.1.6 and oracle 10g? if so is there any document that talks about the AQ setup between 8.1.6 and 10g?

    This forum is intended for members to provide feedback and
    suggestions about OTN developer services. Please repost your
    question in an appropriate database forum.
    Best regards,
    --OTN Team                                                                                                                                                                                                                                                                                                                                                                                                   

  • Question about RAC and ASM

    Hi,
    We are thinking about build RAC using ASM for OEM database. It'll have two nodes, oracle 10g and Hitachi san with solaris ( or linux ). I've few questions about RAC and ASM.
    1) Do I need to have ASM instance running on each node ? ( most likely yes... but want to make sure )
    2) can I share oracle_home between ASM instance and database instance ? what is the best choice ?
    3) I'm planning to use shared disks for all files, all databases.... what are the pros/cons ?
    4) what should be the installation procedure ? Meaning, first create ASM instance on each node, then install cluster software, build RAC databases...... can someone explain..
    5) I believe RMAN is the only option for backup since I'm using ASM, correct ?
    I'm a newbie to RAC and ASM..
    Thanks,

    user4866039 wrote:
    1) Do I need to have ASM instance running on each node ? ( most likely yes... but want to make sure )yes.
    2) can I share oracle_home between ASM instance and database instance ? what is the best choice ?in 10g you can, in 11gr2 you cannot. and it might be better to seperate them because it will give you more flexibility with patching.
    3) I'm planning to use shared disks for all files, all databases.... what are the pros/cons ?if you share your oracle_home you won't be able to do rolling updates. so i recommend to keep oracle_homes local.
    4) what should be the installation procedure ? Meaning, first create ASM instance on each node, then install cluster software, build RAC databases...... can someone explain..follow the install guide for your respective version. for 10g you'd install clusterware first, then asm and database is last.
    5) I believe RMAN is the only option for backup since I'm using ASM, correct ?pretty much. you could stop your database and dump the raw devices or use asmcmd/asmftp but rman is definitely the best choice
    Bjoern

  • Help building an e-commerce site using DreamWeaver MX 2004 and Oracle 10G

    I'm new to using Oracle 10G. After reviewing several rdms's I've picked Oracle 10G as my rdms. I'm trying to build an ecommerce site using DreamWeaver MX 2004 and Oracle 10G. The website will be selling hardware and software products. I have a choice in DreamWeaver to go for a .asp or .jsp setup. I have several questions, here goes:
    1. Is there any book/tutorial/whitepaper out there that describes building an ecommerce site using Oracle 10G/9I/8I? Just some examples as how to make the datamodel regarding the shopping basket etc.
    2. I prefer DreamWeaver as it let's me make nice looking css style based pages without throttling too much through the code. Are there Oracle tools which allow me to make an advanced nice looking ecommerce site?
    I hope some of you can help me get started. Any effort is appreciated.
    Cheers

    I'm new to using Oracle 10G. After reviewing several rdms's I've picked Oracle 10G as my rdms. I'm trying to build an ecommerce site using DreamWeaver MX 2004 and Oracle 10G. The website will be selling hardware and software products. I have a choice in DreamWeaver to go for a .asp or .jsp setup. I have several questions, here goes:
    1. Is there any book/tutorial/whitepaper out there that describes building an ecommerce site using Oracle 10G/9I/8I? Just some examples as how to make the datamodel regarding the shopping basket etc.
    2. I prefer DreamWeaver as it let's me make nice looking css style based pages without throttling too much through the code. Are there Oracle tools which allow me to make an advanced nice looking ecommerce site?
    I hope some of you can help me get started. Any effort is appreciated.
    Cheers

  • How do I map Hitachi SAN LUNs to Solaris 10 and Oracle 10g ASM?

    Hi all,
    I am working on an Oracle 10g RAC and ASM installation with Sun E6900 servers attached to a Hitachi SAN for shared storage with Sun Solaris 10 as the server OS. We are using Oracle 10g Release 2 (10.2.0.3) RAC clusterware
    for the clustering software and raw devices for shared storage and Veritas VxFs 4.1 filesystem.
    My question is this:
    How do I map the raw devices and LUNs on the Hitachi SAN to Solaris 10 OS and Oracle 10g RAC ASM?
    I am aware that with an Oracle 10g RAC and ASM instance, one needs to configure the ASM instance initialization parameter file to set the asm_diskstring setting to recognize the LUNs that are presented to the host.
    I know that Sun Solaris 10 uses /dev/rdsk/CwTxDySz naming convention at the OS level for disks. However, how would I map this to Oracle 10g ASM settings?
    I cannot find this critical piece of information ANYWHERE!!!!
    Thanks for your help!

    Yes that is correct however due to use of Solaris 10 MPxIO multipathing software that we are using with the Hitachi SAN it does present an extra layer of complexity and issues with ASM configuration. Which means that ASM may get confused when it attempts to find the new LUNs from the Hitachi SAN at the Solaris OS level. Oracle Metalink note 396015.1 states this issue.
    So my question is this: how to configure the ASM instance initialization parameter asm_diskstring to recognize the new Hitachi LUNs presented to the Solaris 10 host?
    Lets say that I have the following new LUNs:
    /dev/rdsk/c7t1d1s6
    /dev/rdsk/c7t1d2s6
    /dev/rdsk/c7t1d3s6
    /dev/rdsk/c7t1d4s6
    Would I set the ASM initialization parameter for asm_diskstring to /dev/rdsk/c7t1d*s6
    as correct setting so that the ASM instance recognizes my new Hitachi LUNs? Solaris needs to map these LUNs using pseudo devices in the Solaris OS for ASM to recognize the new disks.
    How would I set this up in Solaris 10 with Sun multipathing (MPxIO) and Oracle 10g RAC ASM?
    I want to get this right to avoid the dreaded ORA-15072 errors when creating a diskgroup with external redundancy for the Oracle 10g RAC ASM installation process.

  • Question about Communication with Oracle 7

    Hi,
    Generally we use Oracle Snapshots for Communication, but since Oracle 9.2.0.5 do not work with Oracle 7.1.5.2.4. we are thinking about do use Oracle Interconnect for this Link.
    Now I have the following two Questions about Communication with Oracle 7:
    1. Is an Adapter for Oracle 7.1.5.2.4 available?
    2. From your experience, does it make sense to install Oracle Interconnect for implementation of only one read only Link with 3 Tables if an OAS for BI is available?
    Thanks,
    Hannes

    1. The Oracle database adapter is for Oracle 8i and up. I checked the code needed in the database and doubt that will work in Oracle 7.
    1. The other option Advanced Queuing also needs 8i and up.
    2. For me it doesnt make sense that you want to connect to Oracle 7. Oracle 7 is unsupported and should not have to be developed against. Also the license costs for Oracle Interconnect ~17K without any discount is a bit steep for read only links to three tables. Having the OAS means you wont have to pay another additional ~17K for the apps server.

Maybe you are looking for

  • Can java script be executed inside Acrobat reader 7

    Hello All I am quire new to Acrobat. Please tell me if I can execute a java script in Acrobat reader. I am using itext library to add java script to a pdf and opening the pdf in reader and get the error NotAllowedError: Security settings prevent acce

  • RegEx replacement

    I'm trying to make a small parsing engine that does the following: 1. reads an HTML document 2. searches for special tags of the form [key] 3. looks up the key in a hashmap or something 4. replaces [key] with value from the hashmap I'm storing the HT

  • Running config details

    I customer asked me today during a demo of the Total Care portal, for running configuration, are the details shown captured at the time the device was reviewed during the discovery service or what would be running at the current time. I thought the i

  • Premiere CS6 won't install on my computer

    After I load my CS6 disc into the computer, it automatically runs the installer setup and that's all it does. Then absolutely nothing. What am I doing wrong?

  • ICal generating recurring conflicts until iPod is full

    I followed the instructions pasted below and it fixed my "disappearing October" problem; however, every time I open iCal now, it presents me with hundreds of conflicts and I have resolved them so many times I almost know them by heart. Even after I r