Oracle 9.0.1 SQL*Plus and PL/SQL

Having just upgraded from Oracle 8.0.1 to the above, can anyone suggest a good book for learning the above languages as I believe there is quite a lot of difference in the codes, which also contains some good exercises for trying them out.
Phil.

I would take a look at this for PL/SQL:
Oracle PL/SQL Programming, 3rd Edition
If you want to learn SQL, you can try this book, which some people I know have liked: Mastering Oracle SQL
For the extra features of SQL*Plus, the Oracle manual is very complete and should be sufficient.

Similar Messages

  • SQL*Plus and Oracle

    Hi, i have recently started a new course where i am required to learn sql using the sql*plus program and several books. I have downloaded the instant client and the sql*plus program so that i can run them on my computer at home so i can learn at home. However i get a problem where i cannot logon to sql*plus.
    I believe this may be because i do not have an oracle server running on my pc, i am however not sure, would be gratefull for any help.

    Yes, you will need an Oracle Server to connect to. On your personal system, you can download Oracle XE (Express Edition) from OTN and use that. It contains both the server and client (SQL*Plus) components.

  • SQL*Plus and Oracle 9i Lite

    What is the trick to connecting to Oracle 9i Lite using SQL*Plus?
    I am using the following:
    Username: system
    Password: aaa
    Host String: ODBC:POLite
    I recieve an ORA-12203: TNS:unable to connect to destination: Function not performed
    do I need an entry in my tnsnames.ora file? If yes what? Also, if yes, where in the docs is this discussed?
    Thanks in advance

    Try format
    ODBC:POLITE:datasource
    for Polite:
    ODBC:POLITE:POLITE
    But since 4.0.1 Oracle Lite you can't use SQL plus.
    Use new tool named msql (<ora home>\Mobile\SDK\BIN\msql.exe) or SQL Worksheet in Oracle9i JDeveloper.

  • SQL*Plus and NLS_DATE_FORMAT

    So, I haven't visited this topic in a long time, so I'm trying to refresh my memory on how everything works ...
    We set our NLS_DATE_FORMAT at the system level ... what ... 4 years ago to 'MM/DD/RR'. Despite the fact that I set this to something more commonly-used than the default of 'DD-Mon-RR', we've adopted the standard of always using TO_DATE() with an explicit format, just in case it's ever changed.
    There were some applications that missed the standard, and now that a driver (for ColdFusion) has been updated, these SQL statements are now failing.
    When I started looking into it, I realized that the system-level default of 'MM/DD/RR' should work fine. But, after experimenting in SQL*Plus and TOAD, I am thinking that either:
    1) the system-level format is not being used
    2) and/or there are login scripts which are setting these to something else
    Coincidentally, both SQL*Plus and TOAD return the exact same query results:
    SQL> select *
         from NLS_INSTANCE_PARAMETERS
         where parameter = 'NLS_DATE_FORMAT';
    PARAMETER                      VALUE
    NLS_DATE_FORMAT                MM/DD/RR
    SQL> select *
         from NLS_SESSION_PARAMETERS
         where parameter = 'NLS_DATE_FORMAT';
    PARAMETER                      VALUE
    NLS_DATE_FORMAT                DD-MON-RRSo I looked into the glogin.sql script (which both tools share), and there's nothing mentioned about the NLS_DATE_FORMAT
    -- Copyright (c) 1988, 2003, Oracle Corporation. 
    -- All Rights Reserved.
    -- NAME
    --   glogin.sql
    -- DESCRIPTION
    --   SQL*Plus global login "site profile" file
    --   Add any SQL*Plus commands here that are to
    --   be executed when a user starts SQL*Plus, or
    --   uses the SQL*Plus CONNECT command
    -- USAGE
    --   This script is automatically run
    -- Used by Trusted Oracle
    COLUMN ROWLABEL FORMAT A15
    -- Used for the SHOW ERRORS command
    COLUMN LINE/COL FORMAT A8
    COLUMN ERROR    FORMAT A65  WORD_WRAPPED
    -- Used for the SHOW SGA command
    COLUMN name_col_plus_show_sga FORMAT a24
    COLUMN units_col_plus_show_sga FORMAT a15
    -- Defaults for SHOW PARAMETERS
    COLUMN name_col_plus_show_param FORMAT a36 HEADING NAME
    COLUMN value_col_plus_show_param FORMAT a30 HEADING VALUE
    -- Defaults for SHOW RECYCLEBIN
    COLUMN origname_plus_show_recyc   FORMAT a16 HEADING 'ORIGINAL NAME'
    COLUMN objectname_plus_show_recyc FORMAT a30 HEADING 'RECYCLEBIN NAME'
    COLUMN objtype_plus_show_recyc    FORMAT a12 HEADING 'OBJECT TYPE'
    COLUMN droptime_plus_show_recyc   FORMAT a19 HEADING 'DROP TIME'
    -- Defaults for SET AUTOTRACE EXPLAIN report
    COLUMN id_plus_exp FORMAT 990 HEADING i
    COLUMN parent_id_plus_exp FORMAT 990 HEADING p
    COLUMN plan_plus_exp FORMAT a60
    COLUMN object_node_plus_exp FORMAT a8
    COLUMN other_tag_plus_exp FORMAT a29
    COLUMN other_plus_exp FORMAT a44
    -- Used to alter the TOAD environment so that users do not have to
    -- use the SET DEFINE OFF command prior to compiling code
    -- Charles Forbes 10.17.2005
    SET scan offIf I expressly go into either tool and execute, the following, setting the format to that already delcared at the system-level:
    alter session set nls_date_format = 'MM/DD/RR'Then these SQL statements start running just fine again.
    There's something that I'm missing in my basic understanding of how this works. I assumed that the driver update for ColdFusion perhaps enabled a different "glogin.sql"-type script equivalent for that tool ... until ... I started checking into how the NLS_DATE_FORMAT is supposed to work ... but isn't. Could someone help me clarify where the hole is in my understanding?
    Thanks,
    Chuck

    chuckers wrote:
    What's the difference, then, between NLS_SESSION_PARAMETERS and NLS_INSTANCE_PARAMETERS in my initial post? The glogin.sql script isn't altering the NLS_DATE_FORMAT for the desktop version of SQL*Plus, so I'm perplexed that the SESSION format differs from the INSTANCE format.NLS_SESSION_PARAMETERS are the NLS parameters that are in force for your particular session (i.e. the particular connection you have). Most client applications cause things like NLS_DATE_FORMAT to be set, overriding the NLS_INSTANCE_PARAMETERS. Instance-level NLS settings are most commonly used only for purely back-end processing (i.e. background jobs scheduled via DBMS_JOB or DBMS_SCHEDULER, etc.) 9 times out of 10, the client application is going to override the instance-level paramters.
    I even opened SQL Developer, and got
    select * from nls_session_parameters where parameter = 'NLS_DATE_FORMAT';
    PARAMETER                      VALUE                                   
    NLS_DATE_FORMAT                DD-MON-RR                               
    1 rows selected
    select * from nls_instance_parameters where parameter = 'NLS_DATE_FORMAT'
    PARAMETER                      VALUE                                   
    NLS_DATE_FORMAT                MM/DD/RR                                
    1 rows selected
    That's not unexpected. Java applications are going to use the Java regional properties at least to specify a date format. SQL Developer has a config option for the date format, so it may well be specifying a different format.
    They're all 3 (Toad, SQL*Plus, TOAD) so suspiciously consistent, that I'm questioning some of the fundamentals of the NLS setup.
    I went ahead and looked via SQL*Plus from the server-side, & things are looking more consistently in-line with my expectations:
    [oracle@dvsrvr13 ~]$ sqlplus forbesc@d13
    SQL*Plus: Release 10.1.0.4.0 - Production on Thu Mar 19 12:44:57 2009
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Enter password:
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    SQL> select * from nls_session_parameters where parameter = 'NLS_DATE_FORMAT';
    PARAMETER                      VALUE
    NLS_DATE_FORMAT                MM/DD/RR
    SQL> select * from nls_instance_parameters where parameter = 'NLS_DATE_FORMAT';
    PARAMETER                      VALUE
    NLS_DATE_FORMAT                MM/DD/RR
    SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    [oracle@dvsrvr13 ~]$ locate glogin.sql
    /u01/app/oracle/product/10.1.0/db_1/sqlplus/admin/glogin.sql
    [oracle@dvsrvr13 ~]$ more /u01/app/oracle/product/10.1.0/db_1/sqlplus/admin/glogin.sql
    -- Copyright (c) 1988, 2003, Oracle Corporation.  All Rights Reserved.
    -- NAME
    --   glogin.sql
    -- DESCRIPTION
    --   SQL*Plus global login "site profile" file
    --   Add any SQL*Plus commands here that are to be executed when a
    --   user starts SQL*Plus, or uses the SQL*Plus CONNECT command
    -- USAGE
    --   This script is automatically run
    -- Used by Trusted Oracle
    COLUMN ROWLABEL FORMAT A15
    -- Used for the SHOW ERRORS command
    COLUMN LINE/COL FORMAT A8
    COLUMN ERROR    FORMAT A65  WORD_WRAPPED
    -- Used for the SHOW SGA command
    COLUMN name_col_plus_show_sga FORMAT a24
    COLUMN units_col_plus_show_sga FORMAT a15
    -- Defaults for SHOW PARAMETERS
    COLUMN name_col_plus_show_param FORMAT a36 HEADING NAME
    COLUMN value_col_plus_show_param FORMAT a30 HEADING VALUE
    -- Defaults for SHOW RECYCLEBIN
    COLUMN origname_plus_show_recyc   FORMAT a16 HEADING 'ORIGINAL NAME'
    COLUMN objectname_plus_show_recyc FORMAT a30 HEADING 'RECYCLEBIN NAME'
    COLUMN objtype_plus_show_recyc    FORMAT a12 HEADING 'OBJECT TYPE'
    COLUMN droptime_plus_show_recyc   FORMAT a19 HEADING 'DROP TIME'
    -- Defaults for SET AUTOTRACE EXPLAIN report
    COLUMN id_plus_exp FORMAT 990 HEADING i
    COLUMN parent_id_plus_exp FORMAT 990 HEADING p
    COLUMN plan_plus_exp FORMAT a60
    COLUMN object_node_plus_exp FORMAT a8
    COLUMN other_tag_plus_exp FORMAT a29
    COLUMN other_plus_exp FORMAT a44
    [oracle@dvsrvr13 ~]$ So in all, I'm just perplexed by the differences.
    --=cfI'm not surprised that SQL*Plus from the Unix database server is going to have session-level settings that match the instance-level settings because there is probably nothing set in the Unix environment that would override the instance-level settings. There is probably no NLS_LANG or NLS_DATE_FORMAT set as environment variables and probably no central place to look for regional settings. Most applications, particularly Windows and Java apps, are going to have multiple places to look for that sort of information.
    Justin

  • SQL Plus and ODBC w/different database types

    In order to connect to Oracle lite, we go through ODBC in SQL Plus (ex:login/pw@ODBC:polite)
    Can I utilize this method to connect SQL Plus to a SQL Server 7 database and from there run the COPY TO command to copy data into my Oracle database? If so, what do I need to install to make this work? Is there a specific version of SQL Plus that this works with?

    examples:
    - optimizer_mode is 'RULE' when I select using SQL*Plus and 'CHOOSE' when I use SQL*Plus Worksheet.
    - large_pool_size is 32Mb when I select using SQL*Plus and 108Mb when I use SQL*Plus Worksheet.
    etc.

  • How to connect to SQL*Plus and issue a query all in one command?

    Hi everyone,
    Does anyone know of a way to connect to a db with SQL*Plus, and issue a simple query, all with one command?
    I know that I can save a .sql script with a query, then do this:
    sqlplus user/pwd@db @myscript.sql
    But I'm wondering if there's any way to put the actual query right into the connect command, something like:
    sqlplus user/pwd@db "select count(*) from dba_tables;"
    Does anyone know of a way to do this?

    you didn't mention windows or unix. so, here's a link with both
    Re: windows sql script
    it also has a link to another thread on how to deal with the parens when using ehco in dos.

  • Want to know about Oracle Obiee(New to SQL and OBIEE)

    Hi
    I am currently working on software testing.And I would like to change my domain to Oracle obiee.but I have only moderate knowldge on SQL.
    Is it going to be diffcult to me to learn oracle obiee without pl/sql knowldge?
    How is the Oracle obiee tool in uk market?
    Do I can install this oracle obiee and can practice in home to get more experience?
    Please clear all these doubts
    Thank you

    Is it going to be diffcult to me to learn oracle obiee without pl/sql knowldge?
    -->You need some basic sql knowledge, I dont think its that much hard to learn
    How is the Oracle obiee tool in uk market?
    -->Its depends on your location.
    Do I can install this oracle obiee and can practice in home to get more experience?
    -->Yes you can do, check edelivery.oracle.com
    If helps pls mark
    all the best

  • Sql Plus and Unicode (or utf-8) characters.

    Hello,
    i have problem with Sql Plus and unicode files. I want to execute Start {filename}, where {filename} is file in unicode format (this file have to contains german and polish characters). But i receive error message. It is possible to read from unicode (or utf-8) file and execute commands from this file)?
    Thanks in advance.
    Pawel Przybyla

    What is your client operating system characterset?

  • Help to start iSQL*PLUS and OEM services

    Here is what I did in trying upgrade 10.1 to 10.2 on Windows:
    1. use Oracle Universal Installer installed 10.2 in a separated ORACLE_HOME;
    2. run pre-upgrade assistant (utlu102i.sql)
    3. run Net Configuration Assistant to congired listner
    4. run DBUA ( however message shows that database already upgraded)
    At this point, new instance is up. new listner is working, but iSQL*PLUS and oem services didn't even be recognized by OS.
    From Universal Installer, I saw iSQL*PLUS and OEM were installed. What I am missing here in order to start services of iSQL*PLUS and OEM?

    Well, the instance is running properly. sqlplus also works fine. Because there is no new OEM service available if you look at Services list, how it could be meaningful to connect to OEM through a browser? As fact, browser can not connect to OEM.
    Do I need to reinstall 10.2?

  • Oracle error 1403:java.sql.SQLException: ORA-01403: no data found ORA-06512

    My customer has an issue, and error message as below:
    <PRE>Oracle error 1403: java.sql.SQLException: ORA-01403: no data found ORA-06512:
    at line 1 has been detected in FND_SESSION_MANAGEMENT.CHECK_SESSION. Your
    session is no longer valid.</PRE>
    Servlet error: An exception occurred. The current application deployment descriptors do not allow for including it in this response. Please consult the application log for details.
    And customer’s statement is: Upgrade from EBS 11.5.10 to 12.1.3. Login the EBS, open any forms and put it in idle. Then refresh the form, error happens
    Then, I checked ISP, and found two notes:
    Note 1284094.1: Web ADI Journal Upload Errors With ORA-01403 No Data Found ORA-06512 At Line Has Been Detected In FND_SESSION_MANAGEMENT.CHECK_SESSION.Your Session Is No Longer Valid (Doc ID 1284094.1)
    Note 1319380.1: Webadi Gl Journal Posting Errors After Atg R12.1.3 (Doc ID 1319380.1)
    But these two notes are both WebADI.
    Following is the data collection from customer:
    1. Run UNIX command to check .class file version:
    strings $JAVA_TOP/oracle/apps/bne/utilities/BneViewerUtils.class | grep Header--> S$Header: BneViewerUtils.java 120.33.12010000.17 2010/11/21 22:19:58 amgonzal s$
    2. Run SQL to check you patch level:
    SELECT * FROM fnd_product_installations WHERE patch_level LIKE '%BNE%';--> R12.BNE.B.3
    3. Run SQL to check patch '9940148' applied or not:
    SELECT * FROM ad_bugs ad WHERE ad.bug_number = '9940148';--> No Rows returned
    4. Run SQL to check patch '9785477' applied or not:
    SELECT * FROM ad_bugs WHERE bug_number in ('9785477');-->
    BUG_ID APPLICATION_SHORT_NAME BUG_NUMBER CREATION_DATE ARU_RELEASE_NAME CREATED_BY LAST_UPDATE_DATE LAST_UPDATED_BY TRACKABLE_ENTITY_ABBR BASELINE_NAME GENERIC_PATCH LANGUAGE
    576982 11839583 2011/8/7 上午 08:20:36 R12 5 2011/8/7 上午 08:20:36 5 pjt B n US
    516492 9785477 2011/6/12 上午 11:42:45 R12 5 2011/6/12 上午 11:42:45 5 bne B n US
    546109 9785477 2011/6/12 下午 01:17:41 R12 5 2011/6/12 下午 01:17:41 5 bne B n ZHT
    5. Run SQL to check the status of object ‘FND_SESSION_MANAGEMENT’
    SELECT * FROM dba_objects do WHERE do.object_name = 'FND_SESSION_MANAGEMENT';-->
    OWNER OBJECT_NAME SUBOBJECT_NAME OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE CREATED LAST_DDL_TIME TIMESTAMP STATUS TEMPORARY GENERATED SECONDARY NAMESPACE EDITION_NAME
    APPS FND_SESSION_MANAGEMENT 219425 PACKAGE 2004/10/30 下午 01:52:35 2011/8/7 上午 08:18:39 2011-08-07:08:18:26 VALID N N N 1
    APPS FND_SESSION_MANAGEMENT 226815 PACKAGE BODY 2004/10/31 上午 01:05:40 2011/8/7 上午 08:18:54 2011-08-07:08:18:27 VALID N N N 2
    So, my question is: Customer’s BneViewerUtils.java version is already 120.33.12010000.17, which greater than 120.33.12010000.14. Is there any others solutions for this issue? Does customer still need to apply patch '9940148' based on action plan of
    Note 1284094.1: Web ADI Journal Upload Errors With ORA-01403 No Data Found ORA-06512 At Line Has Been Detected In FND_SESSION_MANAGEMENT.CHECK_SESSION.Your Session Is No Longer Valid?
    Customer's EBS version is 12.1.3; OS is HP-UX PA-RISC (64-bit); DB is 11.2.0.2.
    Thanks,
    Jackie

    And customer’s statement is: Upgrade from EBS 11.5.10 to 12.1.3. Login the EBS, open any forms and put it in idle. Then refresh the form, error happens
    Idle for how long? Is the issue with all sessions?
    Please see these docs/links
    User Sessions Get Timed Out Before Idle Time Parameter Values Are Reached [ID 1306678.1]
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Timeout+AND+R12&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Then, I checked ISP, and found two notes:
    Note 1284094.1: Web ADI Journal Upload Errors With ORA-01403 No Data Found ORA-06512 At Line Has Been Detected In FND_SESSION_MANAGEMENT.CHECK_SESSION.Your Session Is No Longer Valid (Doc ID 1284094.1)
    Note 1319380.1: Webadi Gl Journal Posting Errors After Atg R12.1.3 (Doc ID 1319380.1)
    But these two notes are both WebADI.Can you find any details about the error in Apache log files and in the application.log file?
    Any errors in the database log file?
    So, my question is: Customer’s BneViewerUtils.java version is already 120.33.12010000.17, which greater than 120.33.12010000.14. Is there any others solutions for this issue? No.
    Does customer still need to apply patch '9940148' based on action plan ofIf the issue not with Web ADI, then ignore this patch. However, if you use Web ADI you could query AD_BUGS table and verify if you have the patch applied.
    Note 1284094.1: Web ADI Journal Upload Errors With ORA-01403 No Data Found ORA-06512 At Line Has Been Detected In FND_SESSION_MANAGEMENT.CHECK_SESSION.Your Session Is No Longer Valid?
    Customer's EBS version is 12.1.3; OS is HP-UX PA-RISC (64-bit); DB is 11.2.0.2.If you could not find any details in the logs, please enable debug as per (R12, 12.1 - How To Enable and Collect Debug for HTTP, OC4J and OPMN [ID 422419.1]).
    Thanks,
    Hussein

  • Oracle 8i to MS SQL Server replication

    Im new to Oracle, but a MS SQL Server DBA. Im helping in the architecture of a data warehouse that pulls from some disparate sources, including Oracle 8i, into a SQL Server 2000 box. We could use batch processing to pull updated data from the Oracle database to populate our data warehouse, but we were hoping to get real-time transactional processing via some replication scenario. My terminology may be wrong from the Oracle perspective, but I think the transactional replication that SQL Server supports is called synchronous replication in Oracle. My question is, does anybody know how to do synchronous replication from an Oracle server to a SQL Server? Or perhaps which Oracle product supports it? Thanks!
    null

    ===========================================================
    I'm working on the similar requirements, exactly my source DB is DB2, and the target DB is Oracle. I have two year experience with Oracle, but I know nothing about DB2. There a about 50 tables in source DB. Transactions on source DB is not too heavy(less than 10/Second), and the mainfram are all powerful.
    I've though about Oracle Gateway, but I'd rather save it as the backup solution. For one thing, neither co-workers nor I have experience with it. Second, I'm afraid the Gateway performance would not be satisfactory. Furthermore, words has it that we should pay for the Gateway. So My ideas to real-time replication of the two DB is as following:
    (1) use trigger in DB2 to reponse to immediate transactions in source DB;
    (2) use Embedded C/SQL to extract those transactions into flat files;
    (3) FTP files to the target server;
    (4) On target server, SHELL scripts read the files and call Pro*C to apply the transactions into Oracle DB.
    but, some problems really get me.
    A: in step(1) and (2), How to set EC to do its work in reponse to trigger? I know that one can call host script in Oracle trigger, but I have no idea about DB2 trigger. Maybe, I can create a real-time monitoring EC process to address it. what's your opinion?
    B: I should maintain all transaction metadata by myself. e.g. INSERT, UPDATE old/new data, DELETE info. It is originally covered by the database, and it isn't easy to handle it squarely.
    C: How to address some exception? like database rollback, the process recovery in case of any interruptions in the above steps.
    Could you share me some idea, Thank you!
    eilison
    [email protected]

  • Oracle 10g/11g to Sql Server 2005 Migration

    Dear All,
    I am a beginner to this migration Activities..
    We have designed one Application which is havin Database as Oracle 10g.
    and We had another small Application which is having Sql Server 2005 has Database.
    Daily we need to convert DB of Oracle to Sql server DB in order to acces recent updated data..
    Pls help me how to convert Database in Oracle 10g/11g to Database in sqlserver 2005..

    Hello,
    this is an Oracle forum and we are handling here migrations from foreign databases to an Oracle database.
    For migrations in the other direction, in your case from Oracle to MS SQL Server, you need to read the Microsoft pages, e.g.:
    http://www.microsoft.com/sqlserver/2005/en/us/migration.aspx
    Daily we need to convert DB of Oracle to Sql server DB in order to acces recent updated data..Normally a migration is not a daily process, so I guess that you just want to transfer data from Oracle to SQL Server on a daily basis. If that is the case, you should consider to use our Gateways. Please start reading here:
    http://www.oracle.com/technetwork/database/gateways/index-100140.html
    Using the Database Gateway for MS SQL Server (DG4MSQL) or the Database Gateway for ODBC (DG4ODBC) you can copy your data from your Oracle database to your SQL Server database, using a database link in the Oracle database.
    Please let me know whether this answer helped you.
    Regards
    Wolfgang

  • Oracle 10g - Introduction to SQL  course question

    Two years ago I completed the Oracle 9i - Introduction to SQL course. An complete the #1Z0-007 exam and pass with almost 100%.
    I notice that Oracle 10g - Introduction to SQL courses are now being offer. If I have already done the Oracle 9i course and have been using SQL for the pass two years. Is doing the Oracle 10g - Introduction to SQL worthwhile ?
    Will I learn anything new or is the course almost the same ?
    Thanks
    Brendon

    Brendon,
    Almost certainly not useful. I'd compare the contents of the course you did with the features that have been introduced into Oracle since the version that the course was based on, and try to find some material on these features.
    Cheerio,
    Colin

  • Oracle 10.1.0 jdbc driver and 9i Database

    Are there any known issues with using the Oracle 10.1.0 jdbc drivers and 9i Database. I was lead to believe that the Jdbc drivers are backward compatible.
    Thanks

    Sorry for not including my error:
    Hello all,
    I am getting an error "Bigger type length than Maximum" when calling a stored procedure that returns a small result set. I am not working with BLOBs or CLOBs and cannot find anything on the web that addresses my specific situation.
    I would greatly appreciate any help available in solving this problem.
    Here is my data access object:
    package my.app.access;
    import java.sql.CallableStatement;
    import java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import oracle.jdbc.OracleTypes;
    import oracle.jdbc.OracleTypes.*;
    import my.app.beans.Person;
    import my.app.util.Database;
    public class PersonAccess {
         public Person getPerson(Person person) throws SQLException, Exception {
              Database db = new Database();
              Connection con = db.connect();
              ResultSet rs;
              CallableStatement cs = con
                        .prepareCall("{call SP_GET_PERSON_BY_USER_ID (?,?)}");
              cs.setString(1, person.getUserId());
              cs.registerOutParameter(2, oracle.jdbc.OracleTypes.CURSOR);
              cs.execute(); // ################### ERROR HAPPENS ON THIS LINE
              rs = (ResultSet) cs.getObject(2);
              if (rs.next() == true) {
                   person.setId(new Integer(rs.getString("id")).intValue());
                   person.setFirstName((String) rs.getString("first_name"));
                   person.setLastname((String) rs.getString("last_name"));
                   person.setPhoneNumber((String) rs.getString("phone_number"));
                   person.setEmailAddress((String) rs.getString("email_addr"));
                   person.setRoleId(new Integer(rs.getInt("role_id")).intValue());
                   //this.roleName = rs.getString("role_name");
                   person.setPassword((String) rs.getString("password"));
                   person.setAgencyId(new Integer(rs.getInt("agency_id")).intValue());
                   if (rs.getString("account_disabled").equals("1"))
                        person.setAccountDisabled(true);
                   if (rs.getString("pwd_change_reqd").equals("0"))
                        person.setPasswordChangeRequired(false);
              return person;
    And here is a test object:
    package my.app.access;
    import my.app.beans.*;
    public class testAccess {
         * @param args
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              PersonAccess pa = new PersonAccess();
              Person person = new Person();
              person.setUserId("jrlaughlin");
              try {
                   pa.getPerson(person);
              } catch (Exception e) {
                   e.printStackTrace();
              System.out.println("done");
    And here is the output from this test app
    java.sql.SQLException: Bigger type length than Maximum
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:124)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:161)
         at oracle.jdbc.driver.DatabaseError.check_error(DatabaseError.java:884)
         at oracle.jdbc.driver.T4CMAREngine.buffer2Value(T4CMAREngine.java:2230)
         at oracle.jdbc.driver.T4CMAREngine.unmarshalUB4(T4CMAREngine.java:1146)
         at oracle.jdbc.driver.T4CTTIoac.unmarshal(T4CTTIoac.java:215)
         at oracle.jdbc.driver.T4C8TTIuds.unmarshal(T4C8TTIuds.java:121)
    done
         at oracle.jdbc.driver.T4CTTIdcb.receiveCommon(T4CTTIdcb.java:125)
         at oracle.jdbc.driver.T4CTTIdcb.receiveFromRefCursor(T4CTTIdcb.java:103)
         at oracle.jdbc.driver.T4CResultSetAccessor.unmarshalOneRow(T4CResultSetAccessor.java:165)
         at oracle.jdbc.driver.T4CTTIrxd.unmarshal(T4CTTIrxd.java:787)
         at oracle.jdbc.driver.T4CTTIrxd.unmarshal(T4CTTIrxd.java:704)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:526)
         at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:179)
         at oracle.jdbc.driver.T4CCallableStatement.execute_for_rows(T4CCallableStatement.java:782)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1027)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2887)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:2978)
         at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4102)
         at my.app.access.PersonAccess.getPerson(PersonAccess.java:68)
         at my.app.access.testAccess.main(testAccess.java:17)
    I am only having this problem when using the 10g jdbc driver, 9.2.0.4 and up are fine.
    Thanks again.....

  • Oracle 9i dblink to SQL Server

    Hi experts,
    I need some info on what I need to set up a db link on an Oracle 9i db running on HP-UX to a SQL Server 2008 db running on Windows Server 2008 R2.
    For the Oracle Windows component do I need to keep it at Oracle 9 or can I install the latest and greatest?
    Thanks.

    Hi Jamie,
    Maybe some interesting references:
    Heterogeneous Database connections
    http://www.dba-oracle.com/t_heterogeneous_database_connections_sql_server.htm
    Accessing ODBC and JDBC Data Sources from Oracle Heterogeneous Services (hsODBC)
    http://www.easysoft.com/applications/oracle/hsodbc.html
    Generic Heterogeneous Services and Transparent Gateways in 10 Minutes:
    http://www.orafusion.com/art_orahs.htm
    HTH,
    Thierry

  • Oracle 11g - External Table/SQL Developer Issue?

    Oracle 11g - External Table/SQL Developer Issue?
    ==============================
    I hope this is the right forum for this issue, if not let me, where to go.
    We are using Oracle 11g (11.2.0.1.0) on (Platform : solaris[tm] oe (64-bit)), Sql Developer 3.0.04
    We are trying to use oracle external table to load text files in .csv format. Here is our data look like.
    ======================
    Date1,date2,Political party,Name, ROLE
    20-Jan-66,22-Nov-69,Democratic,"John ", MMM
    22-Nov-70,20-Jan-71,Democratic,"John Jr.",MMM
    20-Jan-68,9-Aug-70,Republican,"Rick Ford Sr.", MMM
    9-Aug-72,20-Jan-75,Republican,Henry,MMM
    ------ ALL NULL -- record
    20-Jan-80,20-Jan-89,Democratic,"Donald Smith",MMM
    ======================
    Our Expernal table structures is as follows
    CREATE TABLE P_LOAD
    DATE1 VARCHAR2(10),
    DATE2 VARCHAR2(10),
    POL_PRTY VARCHAR2(30),
    P_NAME VARCHAR2(30),
    P_ROLE VARCHAR2(5)
    ORGANIZATION EXTERNAL
    (TYPE ORACLE_LOADER
    DEFAULT DIRECTORY P_EXT_TAB_D
    ACCESS PARAMETERS (
    RECORDS DELIMITED by NEWLINE
    SKIP 1
    FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' LDRTRIM
    REJECT ROWS WITH ALL NULL FIELDS
    MISSING FIELD VALUES ARE NULL
    DATE1 CHAR (10) Terminated by "," ,
    DATE2 CHAR (10) Terminated by "," ,
    POL_PRTY CHAR (30) Terminated by "," ,
    P_NAME CHAR (30) Terminated by "," OPTIONALLY ENCLOSED BY '"' ,
    P_ROLE CHAR (5) Terminated by ","
    LOCATION ('Input.dat')
    REJECT LIMIT UNLIMITED;
         It created successfully using SQL Developer
    Here is the issue.
    It is not loading the records, where fields are enclosed in '"' (Rec # 2,3,4,7)
    It is loading all NULL value record (Rec # 6)     
    *** If we remove the '"' from input data, it loads all records including all NULL records
    Log file has
    KUP-04021: field formatting error for field P_NAME
    KUP-04036: second enclosing delimiter not found
    KUP-04101: record 2 rejected in file ....
    Our questions
    Why did "REJECT ROWS WITH ALL NULL FIELDS" not working?
    Why did Terminated by "," OPTIONALLY ENCLOSED BY '"' not working?
    Any idea?
    Thanks in helping.

    I don't think this is a SQLDeveloper issue. You will get better answers in the Database - General or perhaps SQL and PL/SQL forums.

Maybe you are looking for