ORA-06502 in pl/sql code after converting from 9i to 10g

Code worked in 9i, fails in 10g (v10.1.2.0.3) with "character buffer too small":
v_period varchar2(6);
select max(period) into v_period from fiscal_periods;
PERIOD in the table is CHAR(6), representing yyyymm.
I've discovered two workarounds:
1) Declare v_period as varchar2(4000), nothing smaller works
or
2) select TRIM(max(period)) into v_period from fiscal_periods;
The code worked okay in 9i, so is there a 10g change in variable handling I've missed? Or possibly bad programming form? Database vars NLS_SORT (blank), NLS_COMP (blank), and NLS_LANGUAGE (American) are set the same in 9i and 10g, all defaults.

Thanks for your speedy response. The version is 10.2.0.1.0 according to Grid Control, so I assume 10.2.0.2 trumps it. (The previous version number I provided was the result of "select owa_util.get_version from dual;" in SQL Developer so it might be the SQL Worksheet version?) I'll get this info to the dba and we'll see what happens.
Thanks!

Similar Messages

  • Unable to install iTunes after converting from Windows Vista to Windows 7.  Am told installation was successful, then "iTunes was not installed correctly", followed by "Error 7 (Windows error 193).

    Unable to install iTunes after converting from Windows Vista to Windows 7.  Am told installation was successful, then "iTunes was not installed correctly", followed by "Error 7 (Windows error 193).  I have my iPod plugged into my computer via USB port.  What am I doing wrong?

    i have the only account on my laptop so have checked and am the account administrator
    i run windows 7 home premium
    I have the same problem and
    have followed the link uninstalling in the correct order,
    then restarted as per instructions,
    went to Apple to download itunes,
    hit download now,
    Visit the iTunes download page. Click Download Now to download the iTunes installer. When prompted, click Save (instead of Run).
    did not get a save instead of run prompt
    Right click on iTunesSetup or iTunes64Setup (the installer you downloaded in step 3).
    If you have Windows Vista, Windows 7, and Windows 8: Choose "Run as administrator."
    i can only click run as administrator from right clicking the shortcut on my desktop screen
    If iTunes fails to install or repair, it might be necessary to remove components left from a previous installation of iTunes and then reinstall.
    sick of doing this
    at least 7 or 8 times i have re installed itunes to no avail
    troubleshooting no better
    please help. pulling my hair out at this stage
    it was working fine until 2 days ago when i opened itunes it offered to update to 12.1
    not working since i clicked yes
    also i have gone to restore previous point and ffs there are no restore points before my multiple reinstalls
    really dont want to have to restore factory settings

  • When using Adobe Export PDF - I cannot save a document after converting from PDF.  Why not?

    When using Adobe Export PDF - I cannot save a document after converting from PDF.  Why not?

    What happens when you click the Save/Download button after the file conversion is complete?

  • Sorting issue after upgrade from 9i to 10g

    Dear all,
    It is found that the sorting behavior is different after upgrade from 9i to 10g.
    In 9i, even if the SQL statement does not specify the ORDER BY clause, the sorting order is consistent for a particular SQL statement and most likely the sequence follows the searched key fields' order.
    After upgrade to 10g, the query output could vary as long as the SQL statement does not specify the ORDER BY clause.
    Is it due to the Reverse Docid Sorting issue? How can I troubleshoot this issue?
    Thanks for your help,
    M.T.

    903714 wrote:
    Dear all,
    It is found that the sorting behavior is different after upgrade from 9i to 10g.
    In 9i, even if the SQL statement does not specify the ORDER BY clause, the sorting order is consistent for a particular SQL statement and most likely the sequence follows the searched key fields' order.
    After upgrade to 10g, the query output could vary as long as the SQL statement does not specify the ORDER BY clause.
    Is it due to the Reverse Docid Sorting issue? How can I troubleshoot this issue?
    Thanks for your help,
    M.T. This is expected behavior in 10g. Oracle will not order the dataset for you unless and until you explicitly specify it.
    So without using order by clause in 10g, oracle doesn't guarantee that rows will be ordered.
    To go back to old behavior like 9i, you can set a workaround by
    alter session set "_newsort_enabled"=false;
    Also see MOS - Order Of Data Retrieval Differs after upgrading 9i To 10g [ID 456707.1]

  • ORA-06502 error on SQL tab

    I have just installed the latest version of SQL Developer (1.2.1.3213) and am running an Oracle 9i database (version 9.2.0.7).
    When I click on the SQL tab when looking at a table I get an ORA-06502 error and the DDL generated has "-- Unable to Render DDL with DBMS_METADATA using internal generator." at the top.
    I then get a whole host of other errors when using other parts of the program until I disconnect and reconnect.
    This error also occurs when I run the following query:
    select dbms_metadata.get_ddl('TABLE',table_name , user ) from user_tables;
    Any ideas?
    Incidentally prior to this release I had an early version 1 release of SQL Developer and the SQL tab here showed nothing at all.
    Any comments would be most appreciated.

    I am currently using v2.1.1.64, Build MAIN-64.45 and have the same or a similar problem. SQL developer will not generate the SQL code, but fails with the following error:
    ORA-06502: PL/SQL: numeric or value error
    LPX-00210: expected '<' instead of 'n'
    ORA-06512: at "SYS.UTL_XML", line 0
    ORA-06512: at "SYS.DBMS_METADATA_INT", line 3688
    ORA-06512: at "SYS.DBMS_METADATA_INT", line 4544
    ORA-06512: at "SYS.DBMS_METADATA", line 466
    ORA-06512: at "SYS.DBMS_METADATA", line 640
    ORA-06512: at "SYS.DBMS_METADATA", line 1260
    ORA-06512: at line 1
    This installation doesn't have the same directory structure as in the previous reply, so I can't run the catmeta.sql script which doesn't exist in this release.
    Mike

  • Unwanted Line Breaks in PL/SQL CODE after 'CREATE OR REPLACE' statements

    Does anybody know how to keep SQL Developer from automatically editing PL/SQL code and adding line breaks after 'CREATE OR REPLACE' statements?
    It keeps taking:
    CREATE OR REPLACE PACKAGE DEVELOPER AUTHID DEFINER
    And turns it into:
    create or replace
    package developer AUTHID DEFINER
    This unwanted linebreak causes our autodeployment processes to break.
    Thanks,
    Michael Dunn
    University of Notre Dame
    Edited by: user9133268 on Feb 21, 2012 8:00 AM

    Hi Michael,
    I believe nothing for this issue has progressed since it was asked here:
    2.1 RC Extra Line Breaks
    As there may be approval for some planned improvements to the SQL Formatter feature in 3.2, I logged an enhancement request for you:
    Bug 13744858 - FORUM: UNWANTED LINE BREAK AFTER CREATE OR REPLACE SYNTAX
    Regards,
    Gary
    SQL Developer Team
    Edited by: Gary Graham on Feb 21, 2012 4:19 PM
    But if you have control over your auto-deployment process code, it might be quicker to enhance that to deal with CREATE OR REPLACE on the same or the preceding line. Also, note that if you edit the package DDL to put the CREATE OR REPLACE on the same line with the package name in the code editor, then immediately use Export or Save Package Spec and Body to save it to disk, then PACKAGE <name> will appear on the same line as the CREATE OR REPLACE syntax.

  • How to 100% Protect PL/SQL Code By Wrapped in Oracle Database 10g R2

    Hello,
    Is Possible to 100% Protect PL/SQL Code By Wrapped in Oracle 10g R2 ?
    If it is not possible by wrap in oracle 10g R2,
    Please, let me suggest, how i will be able to 100% protect PL/SQL code in Oracle Database 10g R2.
    Because, I have lot of functions, procedures & package's in my project.
    Which is running in field filed.
    So, i have needed to protect 100%.
    Also, will i convert to al functions, procedures & package's to .pll file ?
    And .pll file to .plx file?
    Is it possible to convert .plx file to .pll file ?
    Please, let know any better solutions in this case....
    Regards
    Mehedi

    Hello,
    No, wrapping is not a 100% secure method. It could prevent your code from amateurs, but not from professional hackers. Look at the article http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/wrap.htm#BEHGBJAA
    It says: "•Wrapping is not a secure method for hiding passwords or table names.
    Wrapping a PL/SQL unit prevents most users from examining the source code, but might not stop all of them."
    Edited by: apiminov on 03.12.2012 3:23
    Edited by: apiminov on 03.12.2012 3:24

  • Including an Expression in SQL Code with Columns from a Table

    The code under MY CODE will not work. Getting error saying 00922-from keyword not found where expected..
    In the examples I looked up, the months_between function was written as a select statement like:
    Select
    months_between (sysdate,me607.mbr_dob) / 12 as date
    from mbr_exp me607
    Can anyone help me with the syntax I need to include this with my SQL code as below?
    Thanks..
    MY CODE:
    Select
    me607.mbr_dob,
    months_between (sysdate,me607.mbr_dob) / 12 as date
    from mbr_exp me607

    -date- is an oracle keyword and cannot be used as a column name
    SQL> select sysdate as date from dual
    select sysdate as date from dual
    Error at line 1
    ORA-00923: FROM keyword not found where expectedeither do
    select sysdate as "date" from dualor use a diffent colum name.

  • Receiving a message in my word document after converting from a PDF to word. Please advise

    After converting and dowloading that converted file from a  Adobe PDF file to a word document I then open the word document to see a message stateing
    "To view the full contents of this document, you need a later version of the PDF viewer. You can upgrade to the latest version of Adobe Reader from www.adobe.com/products/acrobat/readstep2.html
    For further support, go to www.adobe.com/support/products/acrreader.html"
    Please proivde advise on how to sucessfully convert the Adobe PDF file to a word document.

    Hi Buster,
    The error message you were receiving occurs when you try to convert a dynamic PDF file created with Adobe LiveCycle Designer.  This file is usually already a fillable form.  Unfortunately there is no workaround available for converting documents like this within the ExportPDF service.
    I'm sorry for the inconvenience.
    Please let me know if you have any questions or if I can be of further assistance.
    -David

  • How do I get PRO to not include codes when converting from Word?

    When converting from word, I get all of the codes printed too.How do I get it to not show in Adobe?  I'm on a deadline and right now not happy that I upgraded.  Need my old adobe back!
    Board of Directors Meeting{ PRINT \p para "[
    /EMC pdfmark [ /StPop pdfmark" }
    { PRINT \p para "[ /Subtype /P /Title () /StPNE pdfmark" }{
    PRINT \p para "[ /StBMC pdfmark" }{ PRINT \p para "[ /EMC pdfmark [ /StPop pdfmark" }
    { PRINT \p para "[ /Subtype /P /StPNE

    Thanks Bill for your reply.
    I am using Acrobat XI, just downloaded it and Word 2003.  There are no punctuations on my form, I just hit return to go to the next lines. 
    I put in a little square check box and that is also causing issues.  I checked to make sure the field codes are off on the original word doc. 
    I did try from the printer to save and adobe and I get the same codes.  Other people that I work with are able to get my document to save correctly in acrobat with the same versions of word and XI. 
    It has to be some small setting on my computer. 

  • Unnecessary text behind listbox after converting from a web-page

    When I make convertation from htm-page containing listbox to pdf, there also appear text on the back of Listbox object. The strings are equal to Listbox values. If I create listbox manually, these strings not appear. How to fix this bug?

    OK, I see now what you mean. It's been a while since I've web-captured an HTML form and I've never noticed that before. I don't think there's anything you can do to prevent it from happening though. You can change the color of the text so it's not visible, or remove it through redaction or other editing tools.

  • The optimizer changed after upgrade from 8i to 10g

    I have upgraded my Oracle database from 8i (8.1.7.3) to 10g (10.2.0.3). After upgraded, there's some SQLs are with performance issue that the response time is very slow. The SQL can run very fast (around 1 seconde) in the pre-upgrade environment. Also, after generating the execution plan, there's different from the original enivronment (8i) which the query using some full table scan instead of index scan originally used in 8i.
    The optimizer_mode of 8i is RULE and it's CHOOSE when upgraded.
    My questions are:
    1. Do I have any init.ora parameters setting in 10g environment which differ from 8i?
    2. What method of analyzing tables is appropriate to use in 10g? Will this affect the performance like my case?
    Thanks,
    Wai

    Please have a look to following threads:
    Re: Optimizer Statistics collection after upgrade from 8i to 10R2
    Re: DB upgrade from oracle 8.1.7 to oracle 10.2.0.2

  • Stored procedures not working after migrating from 8i to 10g

    The Oracle stored procedures are generating an error following upgrading a ColdFusion web application from Oracle8i to 10g release 2.
    "Error","jrpp-102","05/28/08","13:35:09","insite","Error Executing Database Query.[Macromedia][Oracle JDBC Driver][Oracle]ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'S_DEFAULT_LETTER_SETTING' ORA-06550: line 1, column 7: PL/SQL: Statement ignored The specific sequence of files included or processed is: new_letter.cfm, line: 63 "
    I've been looking at this for about 3 days with a colleague in the office. We can resolve this be recreating the stored procedure with a new name (e.g. adding the suffix "_v2"). Its not really practical for us to do this throughout the system. Anyone know what the root cause might be?
    I'm currently connecting to Oracle10g using SQLTools and Oracle8 client. I've yet to upgrade to Oracle10 client.
    I've tried selecting all the stored procedures and re-compiling them but it appeared to make no difference.

    The Oracle stored procedures are generating an error following upgrading a ColdFusion web application from Oracle8i to 10g release 2.
    "Error","jrpp-102","05/28/08","13:35:09","insite","Error Executing Database Query.[Macromedia][Oracle JDBC Driver][Oracle]ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'S_DEFAULT_LETTER_SETTING' ORA-06550: line 1, column 7: PL/SQL: Statement ignored The specific sequence of files included or processed is: new_letter.cfm, line: 63 "
    I've been looking at this for about 3 days with a colleague in the office. We can resolve this be recreating the stored procedure with a new name (e.g. adding the suffix "_v2"). Its not really practical for us to do this throughout the system. Anyone know what the root cause might be?
    I'm currently connecting to Oracle10g using SQLTools and Oracle8 client. I've yet to upgrade to Oracle10 client.
    I've tried selecting all the stored procedures and re-compiling them but it appeared to make no difference.

  • Hebrew Characters...Chars display as junk after import from 8i to 10g

    Gurus,
    I have a problem with a customer upgrade...
    Background of the issue... the customer is an Agile PLM customer of version 8.5 (Agile PLM version 8.5). The database was hosted on oracle 8i. He is intending to upgrade from Agile 8.5 to Agile 9.2.2.4. During this process he has upgraded he db from Agile 8.5 to Agile 9.2.2.4, and has also shifted the DB platform from 8i to 10g.
    Problem: There were hebrew characters entered in Varchar2 columns (Oracle 8i), which after upgrade are not displaying correctly. Newly entered hebrew characters after upgrade display correctly in UI...
    Customer DB Parameters : The nls parameters on the source db before upgrade(8i) are American_America.WE8ISO8859P1, and the destination db parameters are American_America.UTF8.
    What i have done to deal with the issue: i have tried exporting the db using UTF8 and importing the db to 10g on UTF8, but still the characters show as garble characters..., have tried various options of exporting/importing using the combinations of WE8ISO8859P1 char set as well as IW8ISO8859P8 charsets, as i have learnt during my research abt the charsets that Hebrew Characters are supported in IW8ISO8859P8 charset and not WE8ISO8859P1. My suspicion here is that the problem is with the export and import from 8i to 10g, and the Char conversion which is happening during this process..(this is my guess and i might be wrong tooo...)
    Currently this is a hot issue with the customer, and needs an immediate fix (to display the Hebrew characters properly after upgrade)
    I am a layman on the NLS Settings and couldnt figure out what else to do....I would request all the Gurus out there to help us figure out the problem and try resolve it...
    Thanks for your Help in Advance
    Regards,
    Raja.

    Hebrew characters aren't supported using the ISO 8859-1 character set. In the original system, what must be happening is that the NLS_LANG on the client matches the database character set, which tells the Oracle client not to do character set conversion. This causes Oracle to treat character data just as a binary data stream and to store whatever bits the client sends. So long as the client is really sending ISO 8859-8 data, telling Oracle it is ISO 8859-1, and on the return side asking Oracle for ISO 8859-1 and treating it internally as ISO 8859-8 while Oracle is doing no character set conversions, this will appear to work. But the data in the database is fundamentally wrong. You can configure things so that you can, apparently, store Chinese data in a US7ASCII database using this sort of approach, but you end up with screwed up data.
    This sort of problem usually comes to light when you start using tools (like export) that don't know how to mis-identify the data they are sending and retrieving like your application is doing or when character set conversion is necessary. Since the data in the database isn't valid ISO 8859-1, Oracle has no idea how to translate it to UTF8 properly.
    As previously suggested, the safest option is to move the data with a solution that replicates the behavior of the application. So
    - Set the client NLS_LANG to match the database character set (WE8ISO8859P1)
    - Extract the data to a flat file using SQL*Plus or a C/C++ application
    - This data file will, presumably, really be ISO 8859-8 encoded
    - Use SQL*Loader to load the data into the UTF8 database, specifying the actual character set (ISO 8859-8) in the control file.
    If you're rather more adventurous and working with Oracle Support, it is potentially possible to change the character set of the source database from ISO 8859-1 to ISO 8859-8 and then export and import will work properly. But this would require some undocumented options that shouldn't be used without Oracle Support being involved and introduces a number of risks that the flat file option avoids.
    Justin

  • Frequent Rebuild Requires After Upgrade from 9i to 10g

    Hi Friends,
    Recently we have upgraded our production database from 9i to 10g and after that the performance of certain queries degraded drastically. when we did a workaround of rebuilding the table and associated indexes for these queries, it performs as fast as 9i.
    Can anybody clarify why the same query which was working very fine without rebuild in 9i requires a rebuild in 10g?
    Please note that the tables involved in this query are very huge and a frequent rebuild is not a permanent solution for us :-)
    Regards,
    Savad

    Pl identify which "10g" - there are two flavors. Pl also see these MOS Docs
    10g Upgrade Companion (Doc ID 466181.1)
    https://supporthtml.oracle.com/ep/faces/secure/km/DocumentDisplay.jspx?id=466181.1&h=Y
    TESTING SQL PERFORMANCE IMPACT OF AN ORACLE 9i TO ORACLE DATABASE 10g RELEASE 2 UPGRADE WITH SQL PERFORMANCE ANALYZER (Doc ID 562899.1)
    https://supporthtml.oracle.com/ep/faces/secure/km/DocumentDisplay.jspx?id=562899.1&h=Y
    PERFORMANCE TUNING USING 10g ADVISORS AND MANAGEABILITY FEATURES (Doc ID 276103.1)
    https://supporthtml.oracle.com/ep/faces/secure/km/DocumentDisplay.jspx?id=276103.1&h=Y
    HTH
    Srini

Maybe you are looking for

  • Safari load times slower under Snow Leopard?

    Has something recently changed? Safari used to be very snappy- suddenly pages are taking forever to load. The first days I ran SL- all seemed fine. The last few days- major hang-ups. I have three machines and it happening across the board.

  • How do I safely stop a Time Machine Restore midway through?

    I started a Time Machine restore from backup at about 1pm this afternoon. After about 15 minutes of estimating the size of the files to be transferred, it gave me a 19hr estimate for transfer time. I had heard that it could take awhile, so I wasn't t

  • Not able to call BPEL web service using RMI call from different machine

    Hi, 1. I have created a smiple Helloworld asynchoronous BPEL process 2. I am able to call that BPEL process using java program (RMI call) which I have written in JDeveloper 10.1.3.3 and the java program is running in the embeded OCJ4 instance of JDev

  • OpenCV SEGFAULT when using imshow functions

    Hello, recently, when I run my OpenCV application on archlinux, I get a segfault when using  OpenCV's imshow() functions for displaying the video output. This still worked some weeks ago and I did not change my code since then. The error is related t

  • Reg:-ref cursor.

    hi friends, can somebody tell ,if i want find out my Ref Cursor having data or not. can i use like below.never tried. REFCURSORNAME%ROWCOUNT > 0; if it is there other way please let me know with some example. --Rajnish