Executing PLSQL statements on Oracle SQL Developer

Hello All,
I am trying to execute following PLSQL statements through SQL Developer:
DECLARE
myvar VARCHAR2(30);
BEGIN
myvar := 'TEST NAME';
DBMS_OUTPUT.PUT_LINE(myvar);
END;
But nothing is being displayed. And when I execute the same on SQL*Plus, the output is properly being displayed.
How can I a make it work on SQL Developer also.

hi
try this ......
set serveroutput on;
DECLARE
myvar VARCHAR2(30);
BEGIN
myvar := 'TEST NAME';
DBMS_OUTPUT.PUT_LINE(myvar);
END;
if it is correct then please make it correct /helpful
Thanks
shyam~

Similar Messages

  • Oracle SQL Developer for OSX not able to compile/execute/handle packages?

    Hi,
    Have been stuck with this for quite some mins now,
    When I execute this simple -valid- create package statement in Oracle SQL Developer:
    http://www.pastebin.ca/757859
    It shows it's not compiled and has errors, when I check the Packages part in Oracle SQL Developer I see this:
    http://www.pastebin.ca/757860
    The ; after end has been removed by the application. In fact this means I can't do anything with packages in Oracle SQL Developer for OSX?
    Is this a known bug?
    Or am I doing something wrong?
    Any resolving response to this matter would be really appreciated.

    Yeah, that bug is in there since stoneage, and is really a no-brainer to fix. Until they don't, we'd be losing time recompiling.
    FWIW, everything works fine using the procedure editor for creating, editing and compiling.
    Regards,
    K.

  • Oracle SQL Developer and Errors (Line Number Incorrect)

    First, I wanted to state that Oracle SQL Developer 2 is a standout job.
    I wanted to report, though, that when Oracle SQL Developer 2 can't compile a block of code or a simple SQL statement has invalid syntax, it does not have an option to accurately go to the line of code in question. GOING TO the erroneous line of code doesn't need to be a feature, but often times the line no. REPORTED by Oracle SQL Developer is incorrect by 50+ lines.
    Is this something I could fix on my end? I have five other developers griping about this.
    Thank you!

    I don't know if this is the situation you are talking about, but line numbers for errors in SQL in a SQL Worksheet are not line numbers within the statement but rather line numbers in the worksheet. For example, with the following SQL in the worksheet:
    select * from dual;
    select * from dual;
    select * from dual;
    select from dual;Running the "select from dual;" statement (as either statement based on cursor position, selected statement or as script), the error is reported on Line 4, Column 7. As I show line numbers (Tools | Preferences | Code Editor | Line Gutter | Show Line Numbers), this makes sense. Without line numbers showing or having the option to go to the error and with more realistic examples with SQL statements scrolling off the page, I can see that the line number in the errors wouldn't be helpful.
    I think -K- is talking about the PL/SQL code editors not reporting the correct line number based on the error line not counting the "create or replace" line at the start of a package (and more for triggers).
    theFurryOne

  • Limit users to execute "SELECT" statemes only from SQL Developer

    Hi:
    Is there a way to control what SQL command can be executed from SQL Developer?
    I am trying to limit users to execute "SELECT" statements only from SQL Developer.
    I believe SQL*Plus used to have the product profile where I can control what SQL command can be executed from what user.
    Thanks in advance.

    There's nothing special in sqldev to enforce privileges, the database does all that already. See the database documentation on the GRANT and REVOKE statements. Basically, you would only want to grant SELECT privileges to your users...
    Have fun,
    K.

  • Run sql statements in PL/Sql Developer without installing Oracle database?

    Hi all,
    I wish to ask is there any possibility to run Run sql statements in PL/Sql Developer without installing Oracle database?
    Regards.

    Hello Jimmy,
    this is the forum for the tool SQL Developer and, as the title says, *(Not for general SQL/PLSQL questions)*.
    PL/Sql Developer is not an Oracle tool, but from allound allroundautomations.
    And you need access to a database to run SQL statements. This does not need to be one installed by yourself.
    Regards
    Marcus

  • How to execute command(program) from external file in Oracle SQL developer

    Hi,
    Does anyone know, Oracle SQL developer version 1.0.0.14.67 got any function that can execute command from an external file?
    Example, i have 100 insert SQL inside a text file,
    and i want to use Oracle SQL developer to execute it. How do i read from my text file? Thanks a lots.

    If you're new to Oracle, do yourself and us a favour: read some tutorials and manuals. What sqldev's worth, better download the latest version (1.1.2), lots of fixes and enhancements...
    Now for the big popper: to run an external file: @file
    Best of luck,
    K.

  • PLSQL Developer 与 Oracle SQL Developer 哪个更好?

    一直都是使用 PLSQL Developer 做一些开发, 想知道它与 Oracle SQL Developer 有什么不一样, 哪个更好用?

    我想对于这两个产品,哪个更好众说纷纭。我觉得各自有各自的优缺点。当然相对于PLSQL Developer 来说Oracle SQL Developer 的最大优点之一就是它的免费吧,当然它的很多细节上的功能还没有那么丰富。^_^
    你可以通过以下链接下载 Oracle SQL Developer
    http://www.oracle.com/technology/software/products/sql/index.html
    We’ve given up all of our licenses for other tools. We simply don’t need them anymore. Oracle SQL Developer does it all for us. We’ve saved a lot of money because it’s free. It’s also given our development staff a standard tool and they love it. It’s made training and support easier.
    以上是一个使用者的评论,你可以在下边的地址找到。
    http://www.oracle.com/technology/products/database/sql_developer/index.html

  • Oracle SQL Developer 1.0 is easy to install and use, and is portable

    I have tried the latest version of Oracle SQL Developer 1.0 and would like to share my experience of using it.
    Installation of Oracle SQL Developer 1.0
    Download from
    http://www.oracle.com/technology/software/products/sql/index.html?_template
    Unzip the Oracle SQL Developer for Windows (55.8 MB) to C:\sqldeveloper (103MB)
    Advantages: The unzip folder can be your removable disk and you can access Oracle
    anywhere provided that there is an Internet connection to Oracle Server.
    Unzip sqldeveloper-1557.zip to C:\ with folder name;
    double-click on sqldeveloper.exe in c:\sqldeveloper
    Click on [No]
    Tick all check boxes
    Click on [OK]
    Right-click on Connections, New
    Database Connection…
    Enter User name: SCOTT
    Password: TIGER
    Hostname: 127.0.0.1 (or IP of your Oracle Server on the Internet)
    SID: orcl
    If you want to connect to local Oracle user SYS,
    Enter User name: sys
    Password: ora10g_manager_password
    Hostname: 127.0.0.1
    SID: orcl
    Select Role: SYSDBA
    Click on [Connect]
    Right-click on Tables, Create Table
    Click on [Add Column]
    Select Type: NUMBER for COLUMN2
    Click on [OK]
    Table1 is created
    Click on TABLE1, click on “Data” tab
    Click on the “Green Plus” icon to insert record
    Click on “Commit Changes” icon
    Click on “DBConnection1” tab
    Enter: select * from table1;
    Click on “Execute Statement (F9)” icon
    To exit: Click on File, Exit

    Have you noticed that there's a forum dedicated to SQL Developer?
    C.

  • Oracle SQL Developer needs some work

    I just downloaded a copy today (1557) for Oracle 9.2i / Windows XP Pro
    Oracle SQL Developer has a few glitches...
    A compiled and working package (compiled in SQL*Plus and TOAD) opens and shows 2 errors in a SQL Query involving a CASE statement. Invalid CASE clause on an ELSE and unexpected token on an alias at the end of the case.
    Compiling a package should display a message saying successfully compiled and the state of a package should always be on display!
    Opened an SQL script but could not execute it as the icon's didn't become active.
    Couldn't then run the script.
    These basic problems would put any serious developer off using Oracle SQL Developer.
    Also background color scheme should be gray and NOT white. White is hard on the eyes. This is just basic UI stuff.
    Oracle, you need more senoir developers!

    Justified to the top left of the sql window, you see the execute buttons. On the top right, you will see a drop down list box. After opening a file, this drop down list box is not selected. Select your connection and the execute buttons on the top left will enable.
    For PL/SQL use a slash / at the end for it to execute.

  • Oracle SQL Developer Data Modeler start up error

    Hi All,
    I just downloaded Oracle SQL Developer Data Modeler (2.0.0.57.0) [Released 1 July 2009] by selecting the option "Oracle SQL Developer Data Modeler for Windows (This zip file includes the JRE)"
    After I installed the same and tried to run it by clicking datamodeler.exe, I get the following error message
    "unable to create an instance of the Java virtual machine located at path:..\jdk\jre\bin\client\jvm.dll"
    On the same machine I can successfuly run the Oracle SQL Develper with no errors. My machine is having Windows XP Professional SP3.
    Any ideas? If there was a problem with Java, than the Oracle SQL Developer should also not run. But as stated it runs with out any error but the Oracle SQL Developer Data Modeler gives the above error.
    Regards,
    JAA149

    1 - The above problem has nothing to do with the memmory. I tried on a 400 MB RAM, 900 MB RAM, 1.5 MB RAM & 2 MB RAM with the same arror.
    "unable to create an instance of the Java virtual machine located at path:..\jdk\jre\bin\client\jvm.dll"
    http://i30.tinypic.com/9vkwf6.jpg
    2 - There are two "datamodeler.exe: files
    One is at D:\datamodeler\datamodeler.exe
    2nd is at D:\datamodeler\bin\datamodeler.exe
    The same error occurs with both the files.
    3 - The Oracle SQL Developer Data Modeler version is "Oracle SQL Developer Data Modeler (2.0.0.57.0) [Released 1 July 2009]" and the file I downloaded is "Oracle SQL Developer Data Modeler for Windows (This zip file includes the JRE) - (57M)"
    If I look in "D:\datamodeler\jdk\jre\README.txt" I find
    "Java(TM) Platform, Standard Edition Runtime Environment Version 6"
    If I run "D:\datamodeler\jdk\jre\bin\javacpl.exe" I get
    http://i30.tinypic.com/mt8ocn.jpg
    If I run "D:\datamodeler\jdk\jre\bin\jureg.exe" I get
    http://i28.tinypic.com/30boiyo.jpg
    If i check at the control panle add/remove program
    http://i30.tinypic.com/1428tba.jpg
    If I go to "http://www.java.com/en/download/manual.jsp" and download "jre-6u16-windows-i586-s.exe" and run it.
    If I go to "C:\Program Files\Java\jre6" I find the same files as in "D:\datamodeler\jdk\jre"
    I am able to run Oracle SQL Developer with out any kind of error let alone the above one. But with Oracle SQL Developer Data Modeler I get the above mentioned error no matter what I try.
    As the error states "unable to create an instance of the Java virtual machine located at path:..\jdk\jre\bin\client\jvm.dll". The file "jvm.dll" is located at two places. One at "D:\datamodeler\jdk\jre\bin\client\jvm.dll" and the second at "D:\datamodeler\jdk\jre\bin\server\jvm.dll"
    A similiar problem occurs with JDeveloper with the fllowing solution
    http://forums.oracle.com/forums/thread.jspa?threadID=506339&start=0&tstart=0
    Which states the following
    "hello!
    in the problem with JDeveloper i have a solution. The jdk have a file jvm.dll in the path: jdk/jre/bin/client/jvm.dll this is the problem ... now in the path:jdk/jre/bin/client/ojvm has a file with the same name if you copy and paste this file to the another path, now its works fine your Jdeveloper.
    Jdeveloper use two files to jvm.dll to work one in the folder /client and other in /server copy the same file to the two locations for precaution
    for me work fine thanks..."
    I tried to do the same (Copy from client folder to server folder)
    D:\datamodeler\jdk\jre\bin\client\jvm.dll
    COPIED THIS FILE TO
    D:\datamodeler\jdk\jre\bin\server\jvm.dll
    Nada. So I reversed it (copied from server folder to client folder)
    D:\datamodeler\jdk\jre\bin\server\jvm.dll
    COPIED THIS FILE TO
    D:\datamodeler\jdk\jre\bin\client\jvm.dll
    Does not work. So I tried another solution stated at the same forum entry
    "Well,
    i solved the problem by this way :
    <SQLDEVELOPER>/jdev/bin/ide.conf
    In this file, change this line :
    AddVMOption -Xmx512M
    by
    AddVMOption -Xmx256M
    Now, the executable is lauching correctly. No more errors with Java Virtual Machine.
    But is it a good thing to solve it like that ?"
    But the ide.conf file is only at "D:\sqldeveloper\ide\bin\ide.conf" which is for the SQL Developer and not the SQl Developer Data Modeler
    Correct me if I am wrong but
    JRE = Java Run Time Envoirment
    JDK = Java Development Kit
    And Oracle SQL Developer Data Modeler needs JRE and not JDK. In any case I download JDK
    jdk-6u14-javafx-1_2-windows-i586.exe (121,306 KB) and installed it but no succcess.
    I tried every thing except completely re-install my whole PC.
    Any help will be much appreciated.
    Cordially,
    Jawad

  • Extract Siebel Tools sse_data.dbf file into Oracle Sql Developer.

    Hi All,
    I have Siebel tools installed on my machine and I need to export the sse_data.dbf file from tools to Oracle Sql Developer, how do I do that? Any help would be much appreciated. Thanks
    Edited by: user11919275 on May 17, 2010 4:20 AM

    Hi,
    There's a tool named dbisqlc.exe which comes with default Siebel Tools installation. You can execute DML statements by using this tools. Actually dbisqlc.exe and sqldeveloper are both client tools for executing SQL statements.
    What do you want to do by exporting the local dbf? Can you please explain your requirement?
    Regards
    Cuneyt

  • Oracle SQL Developer  error - "The file-based source procedure Name is not present in the database."

    I recently started working on the Oracle SQL developer. I have 'select' privileges on the QA schema and when tried to execute proc in QA. It is giving the error as 'The file-based source <procedure Name>  is not present in the database.  Was it compiled?'
    instead 'you do not have sufficient privileges to execute this procedure'. Did research on internet but with no luck.What configuration changes needed to be done to make it work.Guide me.

    Sounds like you do not have the correct privileges.  What should have been granted to you by the QA user, or some other user with appropriate privileges, is...
    grant EXECUTE on "QA"."<PROCEDURE_OF_INTEREST>" to "<YOUR_USERID>" ;
    Note that a grant of execute on a procedure has nothing to do with grants of select on some or all of QA's tables and views.
    So, as Vadim suggests, from your connection node in SQL Developer's Connections view, if you expand the Other Users node, then expand QA and look in the Procedures node, do you see the procedure of interest?  If not, you cannot expect to be able to execute it from your userid's connection. And even if you do see it, you may have some other privilege that permits viewing but not executing, like...
    The role SELECT_CATALOG_ROLE
    The system privilege SELECT ANY DICTIONARY
    And even if you do not see it there, then having certain other privileges granted to you could permit executing it in general, like...
    The role EXECUTE_CATALOG_ROLE
    The system privilege EXECUTE ANY PROCEDURE
    Also, note that the 3.0 release is a bit dated nowadays. Upgrading to 4.0.3 production or even the 4.1 EA2 (early adopter) release will, in general, give you a better experience.
    Best wishes,
    Gary

  • Oracle SQL Developer is out

    If you haven't been paying attention to early adopters of Project Raptor there it is - production release of Oracle SQL Developer, outstanding database development tool. It works very well with XE and if you're somehow reluctant to web interface or too ascetic sqlplus, you shall certainly like it. Very useful and at no charge.
    Oracle SQL Developer is a new, free graphical tool that enhances productivity and simplifies database development tasks. With SQL Developer, you can browse database objects, run SQL statements and SQL scripts, and edit and debug PL/SQL statements. You can also run any number of provided reports, as well as create and save your own.
    http://www.oracle.com/technology/products/database/sql_developer/index.html

    I use SQL Developer for SQL and PL/SQL and only use SQL*Plus for the few commands that don't work in SQL Developer.
    SQL Developer has a forum, too.

  • Oracle sql developer and  oracle express

    I am new in PL/SQL
    I just wonder for run the pl/sql , why has the different result for two tools
    for the following example I get out put on the express
    Employee 145 commission .4 which is High
    Statement processed.
    on sql developer I get
    anonymous block completed why???
    DECLARE
      n_pct employees.commission_pct%TYPE;
      v_eval VARCHAR2(10);
      n_emp_id employees.employee_id%TYPE := 145;
    BEGIN
      -- get commission percentage
      SELECT commission_pct
      INTO n_pct
      FROM employees
      WHERE employee_id = n_emp_id;
      -- evalutate commission percentage
      CASE n_pct
      WHEN 0 THEN
        v_eval := 'N/A';
      WHEN 0.1 THEN
        v_eval := 'Low';
      WHEN 0.4 THEN
        v_eval := 'High';
      ELSE
        v_eval := 'Fair';
      END CASE;
      -- print commission evaluation
      DBMS_OUTPUT.PUT_LINE('Employee ' || n_emp_id || ' commission ' || TO_CHAR(n_pct) || ' which is ' || v_eval);
    END;
    /

    Hjava wrote:
    I just wonder for run the pl/sql , why has the different result for two tools
    for the following example I get out put on the express
    Employee 145 commission .4 which is High
    Statement processed.
    on sql developer I get
    anonymous block completed why???Nothing to do with the database or PL/SQL.
    The client makes the call (e.g. passing the PL/SQL anon block to the server to be parsed and executed).
    This is successful. The server returns a zero return code to that client call. This means successful completion of that database call.
    The client can now choose to display any message it wants to inform the user of that - from "+hey dude, it worked!+" to "+command completed successfully+" or whatever.
    The database does not return a message string in response to that call - only a return code. What the client can do is make another call and request the associated message from the client driver for that return code. In this case, an English language message file (as queried by the driver) will return the message string, "+normal, successful completion+".

  • Using bind variables in Oracle SQL developer

    Hi all,
    i am using Oracle SQL developer. i want to use the bind variable in my sql.
    variable myid number :=1;
    select * from mds_3618_request where id = :myid;
    but i am getting the below error.
    Error starting at line 2 in command:
    select * from mds_3618_request where id = :myid
    Error report:
    SQL Error: Missing IN or OUT parameter at index:: 1
    Does Oracle SQL developer support bind variables in the SQL statements?
    thanks in Advance
    Vali Shaik

    You are probable going to get a quicker answer on this forum : SQL Developer
    -- Andy

Maybe you are looking for

  • How to install the OS using a Toshiba Recovery DVD

    Hi I want to clear my laptop and start from scratch and I have a toshiba product recovery DVD When i put it into the D drive i just keep getting a window that asks if i want to copy pice, play cd etc I thought the DVD would wipe everything off the ha

  • My bottom has gone!

    I am a total novice at all this, but. I made my own site www.newhomecyprus.com when the old internet explorer was about. Since the wonderful microsoft update, the bottoms of my pages have ridden up and no longer go to the bottom. Like on this page ht

  • Bank Book or Bank Statement Report

    I am looking for bank statement standard SAP report or bank - book report. Is there any standard report in Sap for the same

  • Re: Batch updates & deletes

    John, I suspect that you could accomplish what you want like this: Pass the values needed in your WHERE clause to the SQL method, and use them as host variables in the SQL statement. Something like this: .....deleteTableBlah(p_One, p_Two, ...., p_N)

  • Need help creating a specific report

    I am trying to create a specific report but to-date can not get it to work the way I want it to. I am trying to create a report that does the following: - lists all my groups I have - if the group has not registered a meeting in a specific week then