SQL Developer question

Hi Folks
I am using SQL Developer tool. I have a procedure with compilation errors so i can see that procedure with red X mark in SQL Developer tool.
When am clicking on the procedure it is going to the editor there i can see "code"."grants","dependencies","references","details","profiles" tabs
But i can't able to see "Errors" tab in the editor. And main thing is i didnt see any red lines in the editor for the invalid procedure
And when i recompiled that procedure it got recompiled successfully and that red x mark is vanished.
Here my question is the "Errors" tab is only appears when the procedure/function/package has errors and surprisingly i didnt see any red lines in the editor for invalid procedure (may be my proc has no errors).
ps: i have asked this question in sql developer forum but i posted here as you may work on this
Thanks

Dear Sir
I have this procedure Find_Emp
create or replace
procedure find_emp(p_in_empno in number)
as
v_ename emp.ename%type;
begin
select ename into v_ename from emp where empno=p_in_empno;
dbms_output.put_line(v_ename);
end;and i have done
alter table emp add dname varchar2(10)I dont know why Find_Emp is invalid now,Folks can you please help.
But that change doesnt affecting the below procs also, i mean these procs are not showing as invalid
create or replace
procedure test
is
cursor c is select ename,empno from emp;
v_result c%rowtype;
begin
open c;
loop
fetch c into v_result;
exit when c%notfound;
dbms_output.put_line(v_result.ename||' '||v_result.empno);
end loop;
close c;
end;
and
create or replace
procedure p1
AUTHID CURRENT_USER
as
v_cyc_dt varchar2(10);
begin
v_cyc_dt := '20120101';
execute immediate 'create table t1 as
select * from emp
where hiredate >=to_date(''||v_cyc_dt||'',''yyyymmdd'')
and rownum <= 1000';
end p1;

Similar Messages

  • Sql developer: question about exporting data

    Hi,
    we're recently working with sql-developer. i've got a question about how we can export query results to txt/csv files for use in other applications.
    First a problem: if we start a query that looks like this:
    select * from
    select * from A where start_date = &date
    ) a,
    select * from B where start_date = &date
    ) b
    where a.name = b.name
    Sql-developer asks twice to input a value for the variable 'date', although it's the same variable and it's supposed to have the same value.
    We solve this by making a script:
    first we define the variable, then we put the query.
    When we start the script, the query runs ok and sql developer asks to input the value for the variable once.
    But now the result of the query is shown in the script output. The script output seems to be limited in number of lines and difficult to export.
    So my question is: what's the best way to export query results to txt/csv files, avoiding the problem mentioned above?
    i hope there is a solution where we can use a single query or script.
    Thanks in advance!

    Using bind variables like ":date" should solve the problem of being asked twice for the same thing.
    Executing the query normally (F9), gives you the export options you require through the context menu inside the Results grid.
    Regards,
    K.

  • Oracle SQL Developer question

    Not using SQLPlus, so don't suggest to use.
    In Oracle SQL Developer, I'd like to set up an SQL statement so that the user is prompted for a portion of the query condition? Is this possible, if so kindly provide example :)P

    user11210446 wrote:
    Not using SQLPlus, so don't suggest to use.
    In Oracle SQL Developer,
    Not using right forum, so suggest you use that.
    SQL Developer

  • SQL developer to debug a cursor data ?

    In the SQL Developer, how to debug a cursor ? In the debug mode, can I see its data what the cursor points to ?
    Thanks
    CURSOR C_EMP (DEPT_NUM_1  NUMBER)
        IS
        SELECT E.EMPLOYEE_ID, E.LAST_NAME, D.DEPARTMENT_NAME
        FROM EMPLOYEES E JOIN DEPARTMENTS D on(D.DEPARTMENT_ID = E.DEPARTMENT_ID)
        WHERE 
        D.DEPARTMENT_ID = DEPT_NUM_1;

    >
    In the SQL Developer, how to debug a cursor ? In the debug mode, can I see its data what the cursor points to ?
    CURSOR C_EMP (DEPT_NUM_1 NUMBER)
    IS
    SELECT E.EMPLOYEE_ID, E.LAST_NAME, D.DEPARTMENT_NAME
    FROM EMPLOYEES E JOIN DEPARTMENTS D on(D.DEPARTMENT_ID = E.DEPARTMENT_ID)
    WHERE
    D.DEPARTMENT_ID = DEPT_NUM_1;
    >
    A cursor is a definition and not executable code so there is nothing to 'debug'. That would be analogous to saying you want to 'debug' a query. What does that even mean?
    What do you mean by 'see its data what the cursor points to'?
    Do you mean see the query underlying the cursor? Then no - you cannot do that.
    You can fetch the data or, using dynamic sql you could describe the result set to see what column names and datatypes will be returned but there would be no information about where that data actually came from.
    This question isn't really a sql developer question but when you have one of those you should post in the sql developer forum at
    SQL Developer

  • I suspect work of SQL Developer after connect

    what want about work of SQL Developer after connect ?
    Thank you very much

    Not really my area, and not really a SQL Developer question, but it's using a standard Java SQL connection in this case.
    If you do not supply the DNS suffix (perhaps as a suffix to the host or service name), then it must get it from somewhere, probably some OS configuration. For example, on Win XP, I see this from a Cmd console window...
    ipconfig /all
    Windows IP Configuration
            Host Name . . . . . . . . . . . . : <myhostname>
            Primary Dns Suffix  . . . . . . . : us.oracle.com
            Node Type . . . . . . . . . . . . : Hybrid
            IP Routing Enabled. . . . . . . . : No
            WINS Proxy Enabled. . . . . . . . : No
            DNS Suffix Search List. . . . . . : us.oracle.com
    ...Hope that helps (and corrections welcome),
    Gary

  • Question on pl/sql developer tool

    Hello,
    I'm trying to debug a package using pl/sql developer. It looks good but the variable defined in the package are not showing their value even in the debug mode to see what they hold at that particular instance.
    How to achieve this?
    Thank You.
    KK

    PL/SQL Developer is not an Oracle tool.
    Post your question on the PL/SQL Forum @ http://www.allroundautomations.com/threads/ubbthreads.php?ubb=cfrm
    If I recall correctly you have to set a Debug checkbox somewhere in the Tools => Preferences menu.
    (But I cannot check it at this moment).

  • SQL Developer tool question

    Hi Folks
    I am using SQL Developer tool. I have a procedure with compilation errors so i can see that procedure with red X mark in SQL Developer tool.
    When am clicking on the procedure it is going to the editor there i can see "code"."grants","dependencies","references","details","profiles".
    But i can't able to see "Errors" tab in the editor. And main thing is i didnt see any red lines in the editor for the invalid procedure
    And when i recompiled that procedure it got recompiled successfully and that red x mark is vanished.
    Here my question is the "Errors" tab is only appears when the procedure/function/package has errors and surprisingly i didnt see any red lines in the editor for invalid procedure (may be my proc has no errors).
    Thanks

    Hello,
    maybe your procedure has been invalidated by some DDL, e.g. a new column has been added to a table that is referenced in your procedure. The status will be INVALID until you recompile it or until you call the procedure, then it will be recompiled automatically.
    (may be my proc has no errors).Very likely.
    Regards
    Marcus

  • Question about creating a cloud connection to SQL Developer

    Hi all!
    I want to create a cloud connection on SQL Developer to Oracle cloud, but keep getting the following error (NOTE: I have the trial version. Also, I have replace the identity domain name with asterisks for the post) :
    Connection to https://databasetrial1875-******.db.us1.oraclecloudapps.com refused
    Additional Details:
    oracle.dbtools.raptor.cloud.auth.AuthenticationFailedException: Connection to https://databasetrial1875-******.db.us1.oraclecloudapps.com refused
      at oracle.dbtools.raptor.cloud.auth.basic.BasicAuthenticationEngine.doPost(BasicAuthenticationEngine.java:228)
      at oracle.dbtools.raptor.cloud.auth.basic.BasicAuthenticationEngine.authenticate(BasicAuthenticationEngine.java:73)
      at oracle.dbtools.raptor.cloud.connection.ConnectionCreator.createConnection(ConnectionCreator.java:24)
      at oracle.dbtools.raptor.cloud.connection.CConnections$C.getConnection(CConnections.java:39)
      at oracle.dbtools.raptor.cloud.connection.CConnections.getConnection(CConnections.java:176)
      at oracle.dbtools.raptor.cloud.navigator.CloudConnection.openConnectionImpl(CloudConnection.java:127)
      at oracle.dbtools.raptor.cloud.navigator.CloudConnection.getConnection(CloudConnection.java:89)
      at oracle.dbtools.raptor.cloud.navigator.ConnectionTreeNode$LoadTask.doWork(ConnectionTreeNode.java:74)
      at oracle.dbtools.raptor.cloud.navigator.ConnectionTreeNode$LoadTask.doWork(ConnectionTreeNode.java:38)
      at oracle.dbtools.raptor.backgroundTask.RaptorTask.call(RaptorTask.java:193)
      at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      at oracle.dbtools.raptor.backgroundTask.RaptorTaskManager$RaptorFutureTask.run(RaptorTaskManager.java:554)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:744)
    Caused by: org.apache.http.conn.HttpHostConnectException: Connection to https://databasetrial1875-******.db.us1.oraclecloudapps.com refused
      at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:158)
      at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:149)
      at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:121)
      at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:561)
      at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:415)
      at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
      at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:941)
      at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:919)
      at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:910)
      at oracle.dbtools.raptor.cloud.connection.DefaultClient.executeRequest(DefaultClient.java:90)
      at oracle.dbtools.raptor.cloud.auth.basic.BasicAuthenticationEngine.doPost(BasicAuthenticationEngine.java:219)
      ... 16 more
    Caused by: java.net.ConnectException: Connection refused: connect
      at java.net.DualStackPlainSocketImpl.connect0(Native Method)
      at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
      at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
      at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
      at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
      at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
      at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
      at java.net.Socket.connect(Socket.java:579)
      at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:618)
      at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:375)
      at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:148)
      ... 26 more
    I have followed the steps to the last letter using: Data Loading and the Oracle Database Cloud Service
    What I have done on the dashboard and APEX:
    I changed the password of the SFTP user.
    I have created a new user on APEX that belongs to the SQL Developer Group and changed the 'Require change on Password on First Use' to NO before creating the user
    SQL Developer:
    I set the database username to the new user I created in APEX
    I set the database URL to the URL I used to reach the APEX page...https://databasetrial1875-******.db.us1.oraclecloudapps.com/apex/  
    I set the SFTP username to the username listed next to 'Service SFTP User Name' on the dashboard
    I set the SFTP hostname to: sftp.us1.cloud.oracle.com
    I left the port set to 22
    When I login on SQL Developer to database, I use the password for the user I created in APEX
    Thanks in advance to all who help!

    Hi,
    You have to use the admin account to add the admin role to the developer account. Can you please try this and let me know of your feedback.
    The settings you added look good, and the you have the latest version of Sql DEVELOPER     , ...so this should be an issue.
    Maybe you have some firewall setting on your computer, that are blocking the connection?
    If , after checking all of the above you still have an issue, please contact oracle support via the chat on the cloud.oracle.com and ask the engineer to open a Service Request under your name.
    Thanks,
    Flori

  • SQL Developer usage (newbie) question - using for script development

    I'm new to Oracle, but not to SQL (used MS SQL Server off and on for 3 years prior). SQLDeveloper (v1.5.1) was recommended as a dev tool for the work that I'm doing in in Oracle 10.2.0.4. I'm looking to write some scripts to eventually become stored procedures. The problem I'm having is it seems i can only execute one line even though there are multiple statements in the "Enter SQL Statement" window pane.
    ie.
    select id, Full_Name, unique_name, user_id from srm_resources;
    select id, user_name, last_name, first_name from cmn_sec_users;
    when i highlight those two lines and click the "Excecute Statement" button, only the top line generates results.
    I'm used to using MS SQL's Query Analyzer where I could select one statement or multiple statements to execute, even non-SELECT statements (variable assignments, math, control loops). It does not appear that I have this kind of functionality in SQL Developer - or an I not using the tool correctly?
    Thanks
    Brian

    I'm assuming you're meaning the SQL worksheet here. The green arrow icon is execute statement (F9) The tiny green arrow is execute script (F5). I'm currently on 1.5.4 of SQL Developer.
    Hope this helps some. I would download the documentation also.
    http://download.oracle.com/docs/cd/E12151_01/index.htm
    Evita

  • Newbie in SQL Developer: misc questions

    Hello,
    I´m new to SQL Developer, always worked with Quest´s SQL Navigator before.
    1.)
    I have a file.sql with following instructions:
    begin
    package_1.variable_1:='T';
    package_2.procedure_1;
    package_2.procedure_2;
    package_2.procedure_3;
    end;
    In Quest SQLNavigator I started this with "Run (F9".
    In SQL Developer this will not start, always telling me error, invalid numbers or some other sh*t, but nothing changed within the packages or procedures.
    With SQLNavigator everything works fine.
    2.)
    In SQLNavigator with "Quick Browse" I get the sql for a table, for example
    select a.col1, a.col2, a.col3, ...
    from quickbrowsedtable a
    How can I get this in SQL Developer ?
    3.)
    When extracting DDL in SQL Developer columns and table names are in double quotes. Can I change
    this to have no quotes at all ?
    Thank you very much for your help,
    greets,
    Frank
    Edited by: 968906 on 05.11.2012 04:49

    1 - use F5 in the worksheet to run your anon block
    2 - drag the table to the worksheet, and select 'Select'
    3 - not today

  • SQL Developer vs TOAD - query performance question

    Somebody made me notice same queries are executing slower in SQL Developer than in TOAD. I'm rather curious about this issue, since I understand Java is "slow" but I can't find any other thread about this point. I don't use TOAD, so I can't compare...
    Can this be related to the amount of data being returned by the query ? What could be the other reasons of SQL Dev running slower with an identical query ?
    Thanks,
    Attila

    It also occurs to me that TOAD always uses the equivalent of the JDBC "thick" driver. SQL Developer can use either the "thin" driver or the "thick" driver, but connections are usually configured with the "thin" driver, since you need an Oracle client to use the "thick" driver.
    The difference is that "thin" drivers are written entirely in Java, but "thick" drivers are written with only a little Java that calls the native executable (hence you need an Oracle client) to do most of the work. Theoretically, a thick driver is faster because the object code doesn't need to be interpreted by the JVM. However, I've heard that the difference in performance is not that large. The only way to know for sure is to configure a connection in SQL Developer to use the thick driver, and see if it is faster (I'd use a stop-watch).
    Someone correct me if I'm wrong, but I think that if you use "TNS" as your connection type, SQL Developer will use the thick driver, while the default, "Basic" connection type uses the thin driver. Otherwise, you're going to have to use the "Advanced" connection type and type in the Custom JDBC URL for the thick driver.

  • SQL Developer 2.1.1 Editor question

    Finally the problem posted here Re: SQL Developer 2.1 no longer allows to edit another granted schemas resolved.
    Now we can edit all granted schemas. I think, this is the most important improvement in this version! Thank you!
    But now, IMHO, we have too much freedom!
    For example: As soon as you click on object in the navigational panel on left side, the new worksheet is opened and YOU CAN EDIT a source code!!
    Well... Why do we need the EDIT option in the Right Click Content Menu then? It is absolutely redundant!
    I think, that click in the navigational panel should open a source only in READ ONLY mode! This sounds only logical, right? Most of the time code just needs to be browsed, so why have a risk of accidental damage of code?
    Edit should be allowed only if you intentionally select the Edit option from the content menu.
    Am I right or am I right?
    Obviously, this is not a critical issue, but it would be a good idea to fix it in the next release

    I swear I've read requests like this before so I checked the feature requests.
    Search: read only
    http://htmldb.oracle.com/pls/otn/f?p=42626:39:59364384205540:::::&success_msg=Action%20Processed.%2F7908DFD98D4CB7965D7D44992CCF608F%2F
    I added my vote just for the hell of it. Looks like it's already slated for the 3.0 release.

  • SQL Developer Data Wizard - Row terminator question

    Hi all,
    I'm new to SQL Developer and am using the wizard to import a dataset with a non-standard row terminator
    The row terminator essentially looks like 2 spaces but its actually 2 newline characters.
    In SQL Server I specified the following in the SQL Server wizard and it worked:
    {CR}{LF}{CR}{LF}
    What's the equivalent for oracle? Or what should I type in the row terminator field of the SQL Data upload wizard instead of the default: Windows <CR><LF>
    Thanks for your help!
    Edited by: 888130 on Sep 28, 2011 7:38 AM
    Edited by: 888130 on Sep 28, 2011 7:38 AM

    Hi!
    As far as I know, the line terminator for the import wizzard has to be {CR}{LF} or {CR} or {LF}.
    So your best shot may be to preprocess your import file and replace {CR}{LF}{CR}{LF} with {CR}{LF}.
    Another oportunity is to use SQLLoader:*
    Documentation:
    http://download.oracle.com/docs/cd/E11882_01/server.112/e22490/ldr_control_file.htm#i1006645
    Skip empty lines:
    Ignore empty rows at end
    Best regards,
    Matt

  • Questions about the sql developer 2.1

    first sorry for my poor english, I am very happy to see the sql developer 2.1.but here ,it has a very serious problem.
    usually, I used to saving some common sql statements into a sql file. and when need to do something , I just need to open the file with oracle sql developer, and excute the sql statements.
    but when I do this with sql developer 2.1, the excute sql button is not activated , the icon is gray ,so I can't excute any sql statement in the file, and I should open a new sql worksheep and type the sql statements to excute it. what's the matter?
    thanks!

    When opening a script, sqldev logically doesn't know under which connection you want to run the statements.
    Just select the connection you want using the drop-down box in the upper right of the script tab's toolbar, and all buttons will get enabled.
    Have fun,
    K.

  • Questions related SQL Developer Data Modeling

    1) Is it possible to import ERwin 3.5.2 version(called as Platinum Erwin) erx file to SQl developer data
    modeling tool?
    2) When this tool going to be released as a standalone Product?
    3) One of our requirements is calculating Table and Database size from Data model tool(as a volumetric
    report). Is it possible in this tool?. Also i couldn't able to define storage properties(like Tablespace).

    I have also replied to you in the feedback application where you logged your query. I have added my response here for others who may be interested.
    1)We currently only support import from ERwin 4.x
    2) It is company policy not to disclose release dates. We plant to release in 2009.
    3) You can define Tablespace using the Physical model. Expand the Relational node and then the physical model. The two nodes you can use for your tablespaces are the Tablespaces and Segment Templates nodes.
    Regards
    Sue Harper

Maybe you are looking for

  • Andrew - one more doubt in the donsample.sql file,it is urgent

    Andrew, I believe you can answer this ,i hope i am not trying too much on your patience.Thanks .I am connected to the oracle server.In that i execute a procedure which i believe is executing on the oracle server.i supply arguments to it .The arguemen

  • Opening INDD files in Windows7 that were created on a Mac

    I'm not even really sure if this is a PC - Mac issue but here goes..... I am having performance issues, particularly with type, switching between tools and updating links. All of these seemingly simple tasks are inordinately slow. The INDD CS6 docs w

  • Searching Text in Contact Notes Field

    Hi, I have been a Windows Phone user all along. I am interested in switching over to Nokia. I am looking for one basic requirement of being able to search through the Contacts Field for any text. I use MS Outlook and store lot of text in the Notes Fi

  • OM- Positions Assignment

    Hi, We all know that a position can be occupied  by many persons without exceeding 100%. I have a scenario that to create an OM structure with 500+ emps in a particular org unit. If suppose i need to create 50+ operators in engineering and production

  • XCode Projects won't open

    A misbehaving "uninstall" program deleted everything in my Home directory, so I reinstalled from a Time Machine backup. I used Migration Assistant to do this, but also had to do a number of things manually, fixing permissions on them as I went. My fo