Re: Probelems running queries in SQL Developer

I used to be able to run queries in SQL developer without any problems but now I get the followin message whenever I try to run a query
"Could not initialize class oracle.sql.CHAR"
p.s. I also get this: "oracle.i18n.text.converter.CharacterConverterOGS.getInstance(I)Loracle/i18n/text/converter/CharacterConverter;"
Edited by: user564155 on Jul 26, 2010 1:49 PM

Might be corrupt settings; backup/delete the SQL Developer/systemXXX directory in the hidden Application Data under your Windows profile to reset your installation to defaults.
Else, if you run from \sqldeveloper\bin\sqldeveloper.exe, what output do you get in the opened console when starting up and querying? This could help diagnosing the problem.
Hope that helps,
K.

Similar Messages

  • How run Procedure in SQL Developer?

    I need run procedure in SQL Developer with parameter : 2009
    create or replace PROCEDURE "update_table" (ff_year in varchar2) AS
    CURSOR c_update IS
    select DISTINCT P.mafew name, u.frew nameone, t.greddf, .........
    I click green button RUN and have new window Run PL/SQL. Where in this script I need to print 2009?
    DECLARE
    FF_YEAR VARCHAR2(200);
    BEGIN
    FF_YEAR := NULL;
    update_table(
    FF_YEAR => FF_YEAR
    END;

    Hi,
    user10886774 wrote:
    Thanks all!
    I can run the procedure like 1 or 2 example? Is it right?
    1 like Run Script
    EXEC "UPDATE_TABLE" ('2009');
    2 click RUN on UPDATE_TABLE procedure
    DECLARE
    FF_YEAR VARCHAR2(200);
    BEGIN
    FF_YEAR := '2009';
    UPDATE_TABLE(
    FF_YEAR => FF_YEAR
    END;
    What is the name of the procedure?
    Is it update_tabe (all small letters)? If so, you must reference it as "update_table" (all small letters, inside double-quotes).
    Is it UPDATE_TABLE (all capital letters)? If so, you have the choice of referencing it as "UPDATE_TABLE" (all capital letters, inside double-quotes) or as update_table, or Update_Table, or UPDATE_TABLE, or uPdAtE_taBle, or ... (any kind of letters, without quotes).
    How about commit after?How about it?
    What is the question?
    If you want to commit, say COMMIT or click on the COMMIT icon.

  • Running scripts in SQL developer in batch mode (windows 7)

    Hi
    Can anybody share the steps to run a set of SQLs in SQL developer in batch mode in Windows 7
    Regards
    -Learnsequel
    Edited by: 910874 on Jul 25, 2012 9:13 AM

    910874 wrote:
    was thinking of something like this
    1) Create a .txt file name 'mysqlfile.txt' in desktop which contains the below statements
    Create table A
    Create table B
    2) Create a .bat file name 'run.bat' and kept in desktop which contains the below statements ( syntax may not be correct though)
    sqlplus -s <DBusername>/<pwd>@//<Hostname>:<port>/<SID>@<C:\Users\<username>\Desktop/mysqlfile.txt>
    3) Double click 'run.bat'
    Any thought?
    Regards
    -Learnsequelit can be made to work;
    but it is a run ONCE file since errors get throw on second & subsequent runs

  • Save layout of queries in SQL Developer query builder?

    Sometimes queries are very complex and moving tables around in the graphical view is really helpfull to better understand them.
    Unfortunately this layout does not get saved with "save" (because this is a simple text file).
    Once upon there was a query builder (included with designer 2000 and later vom 1991 to 1998) that had a proprietary format (.brw) to just do that: Save a query including layout.
    Any chance to save the layout of SQL Developer query builder queries?

    I dont think there is any way to save the layout for the query, you can request an enhancement on the Exchange for this http://sqldeveloper.oracle.com/
    But if you only need to restore the query you are working with later, or move it to another workstation and continue editing using the query builder, you only need the SQL code generated; when you paste it in an opened worksheet (on the same database or even a clone with the same structure) the query builder is able to resume working just fine with default positioning for the table objects.
    If you hand edit the query and insert some SQL manually then the query builder may stop working for particularly complex statements, in this case it will warn you and disable itself.

  • Running existing queries in sql developer-new user

    I am trying to execute some of my existing queries I created in TOAD but when I open my current existing files it does not give me the option to execute them. How can I get my existing files to execute so that I can get a data return?

    See:
    Re: Nice App

  • Missing ladybug and run icons in SQL Developer

    When I open a package body in the editor, I´m missing the green arrow icon and the ladybug icon. SQLDev was installed as part of the Ora11g client. I found no other way to generate the "run" anonymous block.
    Any ideas? Is there somewhere I can enable the icons?

    1) I'd recommend downloading SQLDeveloper 1.5.5 as the version bundled with 11g is very old (1.2).
    2) Are you sure you are in an editor and not a 'viewer'? If you have a 'pencil and paper' icon, you are in a viewer. Click on it to open an editor.
    3) Try running sqldeveloper from <sqldev>\sqldeveloper\bin\sqldeveloper.exe and see it there are any errors in the console when you open a procedure.

  • Calling from the application Slow vs. Running through SQL developer Fast

    Alright, we write many applications that make use of calling stored procedures in packages to return data. This is the only time i have ever encountered this issue and have not been able to pinpoint the cause.
    This application is very data-centric and is filled with calls to stored procedures and I would say about 80% run fine as in the time required to run is about the same as in SQL Developer maybe just a little slower due to the amount of data that may be returned to the application. The other 20% run horribly slow from the application and run lighting fast in SQL Developer and i cannot figure out why.
    I have traced the code right up to the .Fill on the Oracle.DataAccess.Client.OracleDataAdapter and that is where it just holds either for a long period of time or just forever, some of these i haved waited hours for and they have not finished running.
    For Example: I created a new page in the project and it makes a request through the use of ajax, when the request file is reached it performs two stored procedures from the same package (the only two procedures in the package). Both procedures take in three varchar2's and have an in out cursor, the cursor is returned into a datatable in the VB. The first query runs in a couple seconds returns the correct data etc. The second query, which takes .2 seconds on average to run from SQL Developer, just runs and runs and i have never actually even waited for it to finish because it takes so long. The specific example i am trying only returns 1 row with 7 columns, so there is not a large amount of data being passed back.
    I have seen this sort of thing happen on occasions, but everytime it was usually because the package was not compiled and was waiting on a view to finish before compilation and after killing the view it was fine. But this issue seems to happen randomnly with certain procedures and not others all in the same package.
    This issue happens on the same procedures everytime which would lead me to believe it is the procedure, but running them in SQL Developer shows me this is incorrect because they run exceptionally fast in some cases. I even went so far as to restart the entire database just in case there was some sort of lock causing this issue but this did not fix the issue.
    I have verified parameters, cursors, debugged the procedures, stepped every line of code, tried deleting and readding the oracle.dataAccess reference. I can't seem to figure this one out.
    It is causing alot of wasted time because i am forced to wait a horribly long time for these queries in order to test. If anyone has any clues, hints, or ideas as to what this could be please let me know! If the same issue exists when the application is moved into production it will be unnacceptable and the application utterly unusable.
    Thanks in Advance for any help!
    -Jarrod

    Hi,
    This is consistently reproducible with the problem procedure/operations? Total WAG here, but I've seen cases where having support for distributed transactions enabled causes the database to disable certain optimizations. Try setting Enlist=false in your connection string.
    Otherwise, I'd recommend enabling 10046 database trace and client side sqlnet trace to capture the problem behavior for further investigation. Oracle support can certainly give you a hand with that if needed.
    Hope it helps,
    Greg

  • Oracle SQL Developer Cannot Cancel Queries Properly

    This was a problem with version 2 and continues to be an issue with version 3. If I chose to cancel a query that is taking a long time to run it gives me the prompt and displays that the query was cancelled. However, the query is not actually cancelled and is still running in the background. The lock on the table still exists. How can I tell? Once a query is cancelled I attempt to exit the program and when I try to disconnect it says that the connection is busy. My only options are to try again or abort. First of all, these are terrible option names. How about changing these to try again or cancel, which is actually what abort does. Second, at this point there is no way to exit the application until the query completes in the background. I can kill the application through the Task Manager which in turn kills the query. This is a major problem and needs to be fixed before this application is useful.

    I also am having this same issue. I am running SQL Developer 2.1.1.64.45 (JDK 1.6.0_11), connecting to Oracle 9.2.0.4.0 via TNSNAMES.
    Seems to be similar to this thread: http://forums.oracle.com/forums/thread.jspa?messageID=9524997&#9524997
    In which it appears to be a genuine bug.. Since I develop large queries in SQL Developer before sending them through a SAS program via PROC SQL, I have no other way to test them. It is frustrating, when testing the large queries, to have to do CTRL-ALT-DEL to delete the SQL Developer task and therefore losing any other query tab changes I have made before running/canceling the task. Grrrr.. :)
    Thoughts? -Kristi

  • Run command line with SQL Developer

    Is is possible to run SQL Developer in command line mode?
    As SQL Developer is a unicode client to unicode database, it will be a good news for me. It is possible to run batch using SQL Developer to edit the database.

    Take the suggestions from SQL Developer from the command line , to which I can add you could use $SQL_PATH/login.sql or the same file located in your specified script dir, which will be called on making a connection.
    If you don't vote for the feature request at the SQL Developer exchange, don't be surprised no progress is being made...
    K.

  • SQL Developer fails to query table

    I am trying to use SQL Developer (v3.2.20.09) to query a particular table in an Oracle 10G database using a simple "select * from table" query.  When I run the query SQL Developer sits there forever waiting for results but nothing is every returned.
    The table is relatively small, just a few thousand rows and just half a dozen columns (mixture of numbers, short text strings and datetimes).  I can run other queries on the table in question so I know I have privileges, it's just when run a simple query to return all columns and all rows it fails.  I even tried to an export of the table using Tools->Database Export but that too just sat there forever failing to complete.
    Any ideas?  It seems that there is just something in the table that SQL Developer doesn't like.

    I've never used sqlplus before but I just tried it and it runs the same query (select * from [table] where rownum <= 40) without any problems.  The strange thing is that once I could see which row was row 40 in sqlplus I queried just that one row in SQL Developer (using the primary key column) and it worked fine.
    I did a bit more experimenting and it doesn't look like a problem with that row in particular just with displaying more than a certain number of rows.  The first column on the table is called OBJ_ID and is a unique integer which forms the primary key.  Row 40 has OBJ_ID = 53.  I tried running:
    select * from [table] where obj_id between 40 and 53 - no problems
    select * from [table] where obj_id between 30 and 53 - no problems
    select * from [table] where obj_id between 20 and 53 - no problems
    select * from [table] where obj_id between 10 and 53 - failure as above (no errors but SQL Developer never displays the results)

  • SQLPLUS commands in SQL Developer

    We are using 11g with Sql Developer. We have some script such as healthcheck etc provided by oracle support, which has SQLPLUS commands in it.
    We are not able to run those in SQL Developer. We are getting errors.
    Are there any way, we could invoke SQLPLUS shell within SQL Developer?
    Thanks in helping.

    Hi qwe16235
    SQLPLUS command failed - not enough arguments
    line 36: SQLPLUS Command Skipped: set lines 300
    line 37: SQLPLUS Command Skipped: set pages 999
    These are formatting commands we do not do yet.
    The other command seems like an error in the middle of a PL/SQL block which we should have covered, just the start of it is not enough to know what the error is.
    An example of bad pl/sql error reporting:
    input:
    show parameter error <-------------- Dummy command so the plsql block does not begin at 1
    begin <----------------starting at line 3
    broken plsql; <------------- bad plsql at line (start)3+(from ora error)2 = 5 (should be 4 - must be one off)
    end;
    output:
    NAME TYPE VALUE
    sec_protocol_error_further_action string CONTINUE
    sec_protocol_error_trace_action string TRACE
    Error starting at line 3 in command:
    begin
    broken plsql;
    end;
    Error report:
    ORA-06550: line 2, column 8:
    PLS-00103: Encountered the symbol "PLSQL" when expecting one of the following:
    := . ( @ % ;
    The symbol ":=" was substituted for "PLSQL" to continue.
    06550. 00000 - "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error.
    *Action:
    -Turloch
    SQLDeveloper team

  • SQL script works in SQL Developer but not when scheduled

    I have a script that I can run, logged onto my server as a user with full permissions and into my database as SYSDBA, that produces a CSV file on the server when I run it from SQL Developer ON the server. HOWEVER, when I set it up as a scheduled job, using those SAME CREDENTIALS (same Windows/network user; same database user), I get no output. The job indicates that it's running successfully, but no file gets created.
    Any advice is greatly appreciated.
    Here's the script:
    WHENEVER SQLERROR EXIT FAILURE;
         set serveroutput on
         DECLARE
         my_query varchar2(5000);
         BEGIN
         my_query := q'[
    SELECT client_id, JOB_NAME, SCHEDULE_TYPE, TO_CHAR(START_DATE,'MM/DD/YYYY HH24:MM') AS START_DATE,
    REPEAT_INTERVAL, ENABLED, STATE, RUN_COUNT,
    TO_CHAR(LAST_START_DATE,'MM/DD/YYYY HH24:MM') AS LAST_START, LAST_RUN_DURATION,
    TO_CHAR(NEXT_RUN_DATE,'MM/DD/YYYY HH24:MM') AS NEXT_RUN
    FROM DBA_SCHEDULER_JOBS
    WHERE instr(client_id,'10.') is not null
    ORDER BY LAST_START_DATE DESC
         p2k.ccsd_any_query_to_csv('HRISEDB_E_OUTPUT_MK', 'dbserver_job_output.csv',my_query);
         end;
    =================================================================
    Here's the called procedure (I don't really understand it -- I gleaned it from others on the internet):
    -- DDL for Procedure CCSD_ANY_QUERY_TO_CSV
    set define off;
    CREATE OR REPLACE PROCEDURE "CCSD_ANY_QUERY_TO_CSV" (p_dir in varchar2, p_filename in varchar2, p_query in varchar2) AUTHID CURRENT_USER
    is
    l_output utl_file.file_type;
    l_theCursor integer default dbms_sql.open_cursor;
    l_columnValue varchar2(4000);
    l_status integer;
    l_query long;
    l_colCnt number := 0;
    l_separator varchar2(1);
    l_col_desc dbms_sql.desc_tab;
    l_col_type varchar2(30);
    l_datevar varchar2(8);
    BEGIN
    l_query := 'SELECT SYSDATE FROM DUAL; ';
    dbms_sql.parse(l_theCursor, p_query, dbms_sql.native);
    dbms_sql.describe_columns(l_theCursor, l_colCnt, l_col_desc);
    l_output := utl_file.fopen( p_dir, p_filename, 'w' );
    dbms_sql.parse( l_theCursor, p_query, dbms_sql.native );
    for i in 1..l_col_desc.count LOOP
    utl_file.put( l_output, l_separator || '"' || l_col_desc(i).col_name || '"' );
    dbms_sql.define_column( l_theCursor, i, l_columnValue, 4000 );
    l_separator := ',';
    end loop;
    utl_file.new_line( l_output );
    l_status := dbms_sql.execute(l_theCursor);
    while ( dbms_sql.fetch_rows(l_theCursor) > 0 ) loop
    l_separator := '';
    for i in 1 .. l_colCnt loop
    dbms_sql.column_value( l_theCursor, i, l_columnValue );
    utl_file.put( l_output, l_separator || '"' || l_columnValue || '"');
    l_separator := ',';
    end loop;
    utl_file.new_line( l_output );
    end loop;
    dbms_sql.close_cursor(l_theCursor);
    utl_file.fclose( l_output );
    execute immediate 'alter session set nls_date_format=''dd-MON-yy'' ';
    exception
    when others then
    execute immediate 'alter session set nls_date_format=''dd-MON-yy'' ';
    raise;
    end;
    /

    hello,
    does oracle showing any errors in user_scheduler_job_run_details for this job ? I would advise try inserting some debug statement to identify where exactly its stuck. Also please check sample configurations syntax for user_scheduler_jobs.
    Cheers
    Sush

  • Query works in SQL Developer but not in APEX

    The query below runs fine in SQL Developer. I have tried entering it both as a Report Region based on SQL Query and in a Dynamic PL/SQL Region. I get different error messages in each. In the Dynamic PL/SQL Region I get the error that an INTO clause is expected in the select
    statement. When I place it in a Report based on SQL query I get an error that there is an invalid column and to use column alias. What I am attempting to do is add the first query result to the second query result.
    Select (select count(lead_id) from t3_leads
    WHERE
    t3_leads.market_id = 'Gurnee'
    AND (T3_Leads.Last_Campaign = 'Hand Addressed' OR T3_Leads.Last_Campaign is null)
    AND
    ((TRUNC(sysdate) - TRUNC(T3_Leads.LAST_MAILED_DATE)) > 60
    OR T3_Leads.Last_Mailed_Date is null))
    +
    (select count(lead_id)from t3_leads where zip in (select zip from t3_overlap where t3_leads.zip = t3_overlap.zip)
    and
    market_id <> 'Gurnee'
    and ((TRUNC(sysdate) - TRUNC(T3_Leads.LAST_MAILED_DATE)) > 60
    OR T3_Leads.Last_Mailed_Date is null))
    from dual

    Hi,
    you need a column alias for your "result" before the final 'from dual':
    Select (select count(lead_id) from t3_leads
    WHERE
    t3_leads.market_id = 'Gurnee'
    AND (T3_Leads.Last_Campaign = 'Hand Addressed' OR T3_Leads.Last_Campaign is null)
    AND
    ((TRUNC(sysdate) - TRUNC(T3_Leads.LAST_MAILED_DATE)) > 60
    OR T3_Leads.Last_Mailed_Date is null))
    +
    (select count(lead_id)from t3_leads where zip in (select zip from t3_overlap where t3_leads.zip = t3_overlap.zip)
    and
    market_id 'Gurnee'
    and ((TRUNC(sysdate) - TRUNC(T3_Leads.LAST_MAILED_DATE)) > 60
    OR T3_Leads.Last_Mailed_Date is null)) result
    from dualPlease let me know if this works.
    Thanks
    Sandro

  • Can't submit plsql scripts in SQL developer

    good morning
    i use sql developer 1.1.5.4 . when i want to run tutorial.sql , it dosn't work :
    "The target tutorial.sql cannot be started because it is not a runnable target."
    tutorial.sql is a script I made , pasting the help example to create the books , patrons tables.
    when i run this script , whith the same user , in a command window with sqlplus alone, it works , but not inside sql developer sqlplus worksheet window. could you help me please ?
    thank you very much.

    Does this blog entry help?
    http://sueharper.blogspot.com/2006/08/run-file-in-sql-developer-easing-pain.html
    Sue

  • AUTOTRACE stats different in SQL Developer vs SQL Plus

    Using SQL Developer 3.2.20.09, database is 11.2 on Linux. I'd like to know why I get different stats when using AUTOTRACE in SQL Developer vs SQL Plus. If I do the following in SQL Developer and in SQL Plus I get a very different set of stats:
    set autotrace on
    select * from emp;
    set autotrace off
    I run this with "run worksheet" in SQL Developer and I see this set of stats:
    Statistics
    4 user calls
    0 physical read total multi block requests
    0 physical read total bytes
    0 cell physical IO interconnect bytes
    0 commit cleanout failures: block lost
    0 IMU commits
    0 IMU Flushes
    0 IMU contention
    0 IMU bind flushes
    0 IMU mbu flush
    I do the same in SQL Plus and I see these stats:
    Statistics
    0 recursive calls
    0 db block gets
    7 consistent gets
    0 physical reads
    0 redo size
    1722 bytes sent via SQL*Net to client
    519 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    14 rows processed
    A very different set of stats. The stats in shown in SQL Plus seem to be much more useful to performance optimization over the one shown in SQL Developer. Why the different set of stats for each? Thanks.

    Cross-referencing to another recent thread on this topic:
    Re: set autotrace on statistics in sqldeveloper (oracle 11g) is wrong

Maybe you are looking for