How to execute SQL statement with oracle jdev

Please I'm a beginner in oracle jdeveloper. I want to know how to use and execute sql statememt within oracle Jdeveloper 10 g release 3 to manipulate objects in oracle database. I want for e.g. to Enable/disable trigger using sql statement "ALTER TRIGGER trigername DISABLE" explicitly. Please tell me how to proceed.
i am sure you can help me
Sincerly yours.

Hi,
Using following tutorial http://www.oracle.com/technology/obe/ADF_tutorial_1013/10131/index.htm
you will found how to connect from Jdev to a database (chapter 1 or 2 ?). Then you just have to go under Tool>SQL*Plus or Tools>SQL Worksheet depending on what you need.
Luck,
Tif

Similar Messages

  • How to find sql statement with Unix process pid

    Hi
    how to find sql statement with Unix process pid
    is there any view to find that.
    please if so let me know
    Thanks in advance

    this is how I am doing this:
    oracle 7352340 7459066 0 07:47:10 - 0:00 oracleJDERED (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
    oracle 7459066 5386396 2 07:47:10 pts/1 0:01 sqlplus
    select sid,serial# from v$session where process='7459066';
    SID SERIAL#
    2178 6067
    select sql_text
    from
    v$sqlarea a,
    v$session b
    where a.hash_value = b.sql_hash_value
    and b.sid = 2178
    ;

  • How to execute sql statement under bat file?

    I want to execute following statement
    C:\>sqlplus /nolog
    SQL> conn scott/tiger
    SQL> select * from tab;
    I know I can realize it as following test.bat and testdb.sql file
    test.bat is follows:
    sqlplus /nolog @testdb.sql
    testdb.sql is follows:
    conn scott/tiger
    select * from tab;
    Now I don't want to use sql file,I only want to use bat file,like follows:
    test.bat is follows:
    sqlplus /nolog
    conn scott/tiger
    select * from tab;
    when I run test.bat,I find only sqlplus /nolog statement execute,the other statements don't execute.
    1)I want to know whether there is a method to execute sql statement only by bat file without a sql file? How to realize it?
    2)If I call sql file,how to hide passord of user? Because I don't want to other persons know scott password,if I use conn scott/tiger in testdb.sql,other person can see testdb.sql and know the password. Is there a good method to avoid?
    Thanks!

    I'm running *NIX, but works the same on Windows
    bcm@bcm-laptop:~$ cat here.sh
    sqlplus dbadmin/admindb << EOF
    select count(*) from user_objects;
    exit
    EOF
    bcm@bcm-laptop:~$ sh here.sh
    SQL*Plus: Release 11.2.0.1.0 Production on Mon May 17 18:14:09 2010
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL>
      COUNT(*)
          9
    SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    bcm@bcm-laptop:~$ Edited by: sb92075 on May 17, 2010 6:15 PM

  • How to store sql statement in oracle table?

    I tried it in this way:
    SQL> insert into sql_text values('select invoice,invoice_dt,DT_INVOICED from PS_BI_HDR where DT_INVOICED= '21
    JAN-2010' and BILL_STATUS='INV'');
    insert into sql_text values('select invoice,invoice_dt,DT_INVOICED from PS_BI_HDR where DT_INVOICED= '21-JAN-
    010' and BILL_STATUS='INV'')
    ERROR at line 1:
    ORA-00917: missing comma
    Please help to solve it, i can't use concatenation (||),
    coz
    'select invoice,invoice_dt,DT_INVOICED from PS_BI_HDR where DT_INVOICED= '21-JAN-2010' and BILL_STATUS='INV' 'it is dynamic.

    user2060331 wrote:
    No sql statement is a dynamic value inserted by a user for executing it on SQl prompt.Then use q-literals:
    SQL> ACCEPT stmt PROMPT "Enter statement: "
    Enter statement: select invoice,invoice_dt,DT_INVOICED from PS_BI_HDR where DT_INVOICED= '21-JAN-2010' and BILL_STATUS='INV'
    SQL> insert into sql_text values('&stmt');
    old   1: insert into sql_text values('&stmt')
    new   1: insert into sql_text values('select invoice,invoice_dt,DT_INVOICED from PS_BI_HDR where DT_INVOICED= '21-JAN-2010' and BILL_STATUS='INV'')
    insert into sql_text values('select invoice,invoice_dt,DT_INVOICED from PS_BI_HDR where DT_INVOICED= '21-JAN-2010' and BILL_STATUS='INV'')
    ERROR at line 1:
    ORA-00917: missing comma
    SQL> insert into sql_text values(q'[&stmt]');
    old   1: insert into sql_text values(q'[&stmt]')
    new   1: insert into sql_text values(q'[select invoice,invoice_dt,DT_INVOICED from PS_BI_HDR where DT_INVOICED= '21-JAN-2010' and BILL_STATUS='INV']')
    1 row created.
    SQL> SY.

  • How to connect Sql Developer with Oracle 11g Xe

    Hi all.
    I am new in the mac os x world and i want to now if it`s possible to connect the sql developer (running at mac os) with oracle xe (running at windows 8 at parallels vm).
    Thank u all.

    Perhaps the Building ASP.NET Web Applications with Oracle Developer Tools for Visual Studio from the Oracle By Example series will be enough to get you going.

  • How to execute SQL scripts with MaxDB ..?

    Hi all,
    i got some clue from another thread and i observed the command is like
    sqlcli -d DBNAME -u SQLUSER,SQLPASS -i filename.sql -c <delimiter> is there,
    when i use this the only first query is successfully executing,
    this might be problem with delimiter.
    can any body help how to use delimiter in the script file with an example.
    thanks in advance.
    --Hari

    Hi,
    Sample Script
    CREATE TABLE city
    (zip                CHAR (5)    KEY CONSTRAINT zip BETWEEN '10000' AND '99999',
    name               CHAR(20)    NOT NULL,
    state              CHAR(2)     NOT NULL)
    CREATE TABLE customer
    (cno                FIXED (4)   KEY CONSTRAINT cno BETWEEN 1 AND 9999,
    title              CHAR (7)    CONSTRAINT title IN ('Mr', 'Mrs', 'Company'),
    firstname          CHAR (10)   ,
    name               CHAR (10)   NOT NULL,
    zip                CHAR (5)    CONSTRAINT zip BETWEEN '10000' AND '99999',
    address            CHAR (25)   NOT NULL,
    FOREIGN KEY (zip) REFERENCES city ON DELETE RESTRICT)
    \dt customer
    COMMIT
    Regards
    Ayyapparaj

  • How To Execute SQL Statements From Shell Scripts?

    I need to extecute some SELECT statements from a shell scripts. Could anybody kindly tell me how to do that, or which document i should refer to ? Thank you very much!

    You can execute SQLPlus with the SQL in a file (sqlplus -s @<sql-script>).

  • How to execute sql files with windows path ?

    Hi , here's my stupid question :
    I have my parent SQL script say A.sql in directory C:\program files\my files\A.sql
    A.sql has calls to multiple sql files like this
    @@1.sql;
    @@2.sql;
    When I call A.sql using sqlplus as:
    sqlplus <username> <connection_string> @"C:\program files\my files\A.sql"
    A.sql gets executed but then while calling "1.sql" it fails with the error
    SP2-0310: unable to open file "C:\program.sql"
    This is happening because of the space, how can this be handled. thx in advance :)
    Regards,
    Neuron

    my A.sql is:
    @@1.sql
    @@2.sql
    1.sql and 2.sql are in the same directory as A.sql.
    sqlplus <username> <connection_string> @"C:\program files\my files\A.sql"
    VG2,
    Yes. Specify the entire path/filename and put double quotes around itA.sql has the double quotes around it, however what additional things can be done so that 1.sql and 2.sql which are present in same directory as A.sql also runs.
    Ashish,
    Yes the assumption is correct. Although when I cd to this directory then this issue won't come for sure.
    But the requirement is you can't 'cd' to the directory and want to execute with complete path.
    There is no issues in Solaris as the space is not allowed.

  • How to execute this statement from oracle reports

    have to use the following command from oracle reports.
    In oracle forms we can use the HOST command but what about oracle reports2.5.
    I have to email the attached file 100245.pdf from oracle reports to the given email id
    uuencode 100245.pdf 100245.pdf | mailx -s "test" [email protected]

    > u can execute any exe using host that host must contain a bat file
    Incorrect. There is no HOST command in PL/SQL.
    And please note that this is the Database » SQL and PL/SQL forum - and not the Oracle Forms or SQL*Plus forum.
    Also, when using the SQL*Plus HOST command for example, you can execute any executable and not just a BAT file. SQL*Plus on Windows uses the Win32 API call CreateProcess() - and it has no limits as to what/which executable can be executed.

  • How to export the result from executing sql statement to excel file ?

    HI all,
    Great with Oracle SQL Developer, but I have have a trouble as follwing :
    I want to export the result from executing sql statement to excel file . I do easily like that in TOAD ,
    anyone can help me to do that ? Thanks so much
    Sigmasvn

    Hello Sue,
    I just tried to export to excel with the esdev extension and got java.lang.NumberFormatException. I found the workaround at Re: Windows Multi-language env, - how do I set English for application lang?
    open the file sqldeveloper\jdev\bin\sqldeveloper.conf and add the following two lines:
    AddVMOption -Duser.language=en
    AddVMOption -Duser.country=USyet now my date formats in excel are 'american-style' instead of german. For example 01-DEC-01 so excel does not recognize it as date and therefore I can not simply change the format.
    When export to excel will be native to 1.1 perhaps someone can have a look at this 'feature'
    Regards
    Marcus

  • How could I extract past executed SQL statement from dictionary ?

    We use oracle11gR2 on win2008R2.
    How could I extract the past executed SQL statement from dictionary ? (Is it possible from V$SQLTEXT or other dictionary table ?)

    IvicaArsov wrote:
    Hi,
    You can find executed SQL in V$SQLAREA view (if it's still in memory). If it does'n't exist and you have AWR enabled you can query DBA_HIST_SQLTEXT table, but remember that the statistic information in AWR tables is filtered (1 out of 10).
    I.Arsov
    As you know when taking snapshot oracle will capture only top sql statements and stored in AWR.
    But can you please link(source) dba_hist_sqltext contain only 1 out of 10 filtered data?. In dba_hist_active_sess_history yes it contain 1 out of 10 sampled data.

  • [0098]SQL*Plus encountered oracle error 100 while executing SQL Statement

    Hi,
    i'm trying to delete duplicate records from a table and running following script. this script is triggered from a unix script. it successfully deletes the records but in the last throws following error message,
    :[0098]SQL*Plus encountered oracle error 100 while executing SQL Statement:2:Investigation required:
    can anybody please help? below is the script.
    DECLARE
    --CURSOR FOR DUPLICATE ROWS
    CURSOR CUR_DUPLICATE_ROWS IS
    Select RMS_NOTE_ID, RMS_SUMMARY_NOTE_ID, count(*) cnt from PARTY_NOTE
    group by RMS_NOTE_ID,RMS_SUMMARY_NOTE_ID having count(*) > 1;
    var_date PARTY_NOTE.PARTY_NOTE_CREATED_DATE%TYPE;
    BEGIN
    FOR DUPLICATE_ROWS_REC IN CUR_DUPLICATE_ROWS
    LOOP
    delete from party_note
    where RMS_NOTE_ID= DUPLICATE_ROWS_REC.RMS_NOTE_ID
    and RMS_SUMMARY_NOTE_ID= DUPLICATE_ROWS_REC.RMS_SUMMARY_NOTE_ID
    and rowid not in (select max(rowid) from party_note
    where RMS_NOTE_ID= DUPLICATE_ROWS_REC.RMS_NOTE_ID and RMS_SUMMARY_NOTE_ID= DUPLICATE_ROWS_REC.RMS_SUMMARY_NOTE_ID);
    commit;
    END LOOP;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    NULL;
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE(SQLERRM);
    ROLLBACK;
    END;

    Try this:
    delete party_note
    where  rowid not in (select max(rowid)
                         from   party_note
                         group  by rms_note_id, rms_summary_note_id
    commit;No need for cursors and loops.
    And when that's completed, consider ALTERing the table to add a unique index (or even a primary key) so you'll never need to do this again.

  • The transaction associated with the current connection has completed but has not been disposed. The transaction must be disposed before the connection can be used to execute SQL statements.

    Hello All,
    I am getting below error can you please help me
    Error:-
    The transaction associated with the current connection has completed but has not been disposed. The transaction must be disposed before the connection can be used to execute SQL statements.

    Perhaps this thread will help you out
    http://stackoverflow.com/questions/11453066/error-the-transaction-associated-with-the-current-connection-has-completed-but
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • How to Run SQL Tuning Advisor on the SQL statement with SQL_ID?

    Can you give the steps to run the SQL tuning advisor on the SQL statement with SQL_ID?
    Database version: 10g Release 2

    Hi,
    You can use either the automatic SQL tuning features that are accessible from Enterprise Manager Database Console on the "Advisor Central" page or trough SQL*PLUS using the DBMS_SQLTUNE pakage:
    -- creating the tuning task
    set serveroutput on
    declare
      l_sql_tune_task_id  varchar2(100);
    begin
      l_sql_tune_task_id := dbms_sqltune.create_tuning_task (
                              sql_id      => '<your_sql_id>',
                              scope       => dbms_sqltune.scope_comprehensive,
                              time_limit  => 60,
                              task_name   => '<your_tuning_task_name>',
                              description => 'tuning task for statement your_sql_id.');
      dbms_output.put_line('l_sql_tune_task_id: ' || l_sql_tune_task_id);
    end;
    -- executing the tuning task
    exec dbms_sqltune.execute_tuning_task(task_name => '<your_tuning_task_name>');
    -- displaying the recommendations
    set long 100000;
    set longchunksize 1000
    set pagesize 10000
    set linesize 100
    select dbms_sqltune.report_tuning_task('<your_tuning_task_name>') as recommendations from dual;For more information, take a look at link provided by Jaffy.
    Cheers
    Legatti

  • How to define the tab space in the PL/SQL editor with Oracle Forms 4.5?

    When I use the PL/SQL editor with Oracle Form Builder, I found the tab space is very long that affects my programs readability quite a lot. Then, I tried to use Textpad to type my program. It looks fine with Textpad. However, when i tried to 'cut and paste' my code back to the PL/SQL editor, all tab spaces (approx. 8-character) are detected and the program looks awful again ~~ Would any one help me to solve my mentioned problem?
    Thanks for any advices!

    In 4.5 you cannot change this. In Forms 5.0 and above there is a registry value DE_PREFS_TABSIZE which allows you to set a value for the tabsize.

Maybe you are looking for

  • 24" iMac GeForce 8800 GS Pixelated Display

    I bought a refurb Spring 2008 24" iMac with the NVIDIA GeForce 8800 GS video card from the Apple online store almost a month ago now. Worked brilliantly until yesterday afternoon when the display suddenly went all pixelated, with a funny aqua coloure

  • How can I get my money back from an app

    How do I get my money back from an app tht my daughter accidentally bought.

  • Issue w/ Case Differences Using the IBM Directory Server MA

    We have the following issue using the IBM Directory Server MA using FIM 2010 R2 (Version 4.1.3479.0). We provision a new object, e.g., uid=jdoe,ou=users,o=contoso, into an instance of IBM Directory Server The object is created in IBM Directory Server

  • Adding a link to firefox

    ok. i know this is on here somewhere but i cannot find it no matter how i search. so: how do i put a link for ''site best viewed on firefox/download firefox here'' kinda thingy? thx!

  • How to recover the old data

    Hi all, i got a new iPhone, i had tried to restore data from the old iPhone to the new one. Unfortunately, before restoring the data i forgot to copy some importance documents and pictures from the new one. so after restoring, those documents are los