Sql delete command

I have one table emp, here emp having 3 fields, names like empno,ename,job.
SQL> select *From emp;
EMPNO ENAME JOB
23 SEKHAR JAVA
34 RAVI DBA
12 ramesh testing
I want to delete empno column and job column do not use rowid,fields.
I want output like this
SQL> select *From emp;
EMPNO ENAME JOB
kumar
ravi
raja
karhtik
send me command.
thanks in advance.

Hi,
By using unused command you can delate the specific column either logically and physically.
Logically drop the unused columns:-
ALTER TABLE table_name SET UNUSED (column_name);
ALTER TABLE table_name SET UNUSED (column_name1, column_name2);
Physically drop the unused columns:-
ALTER TABLE table_name DROP UNUSED COLUMNS;
ALTER TABLE table_name DROP COLUMN column_name;
ALTER TABLE table_name DROP (column_name1, column_name2);
I think its helpful to you.
Regards,
Narendra G.

Similar Messages

  • SQL: delete command for duplicate rows for any particular user

    Hello Experts,
    I've a table like below, where 'X' is the primary key.
    X Y Z
    a | p | amit
    b | q | amit
    c | r | amit
    d | p | amit
    e | s | amit
    f | p | manish
    g | t | manish
    h | p | akash
    Objective:
    Find and delete all the rows who has duplicates (for 'Y') for user 'amit'. Here, 'p' is given as an example. We don't know what the actual duplicate value is.
    Expected Result:
    rows 'a' and 'd' should be deleted
    SQL:
    ===
    select Y, count(*) from T where Z='amit'
    group by Y
    having count(Y) >1
    This query works to get the duplicates and the total count.
    However, how to delete these rows from actual table is the question. Please note that I need to run this query through a JDBC program.
    Thanks,

    You could try
    delete from tableb
      where x not in ( select max(s.x)
                        from tableb s
                        group by s.y, s.z);The easiest way I've found to build these sort of statements is to write a select first which gives you the records you want ( or not want in this case ). Then to write the delete round that statement.
    Edited by: Nigel Ren on 07-May-2011 01:23

  • Skip the DELETE command on logical standby

    Hi All,
    I want to skip the DELETE command on logical standby.
    DB Version - 10.2
    OS - Linux
    Primary DB and logical standby DB .
    In our DB schema some transaction tables. We delete data from those tables by delete commands.
    Delete command, also delete data from logical standby DB. But we want to skip on logical standby DB .
    I use following for that and get error.
    ALTER DATABASE STOP LOGICAL STANDBY APPLY;
    EXECUTE DBMS_LOGSTDBY.SKIP (stmt =>'DELETE TABLE', schema_name =>'TEST',object_name =>'TRANS',proc_name => null);
    ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE;
    But I got error
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'SKIP'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    When I change stmt =>'DELETE TABLE' to stmt =>'DML', no error happen
    Please help me to solve this issue . This is urgent.
    Thanks in advance.
    Regards

    Dear aditi2,
    Actually it is so simple to understand the problem. Please read the following documentation and try to understand the SKIP procedure.
    http://download.oracle.com/docs/cd/B14117_01/appdev.101/b10802/d_lsbydb.htm#997290
    *SKIP Procedure*
    Use the SKIP procedure to define filters that prevent the application of SQL statements on the logical standby database.
    By default, all SQL statements executed on a primary database are applied to a logical standby database.
    If only a subset of activity on a primary database is of interest for application to the standby database,
    you can use the SKIP procedure to define filters that prevent the application of SQL statements on the logical standby database.
    While skipping (ignoring) SQL statements is the primary goal of filters,
    it is also possible to associate a stored procedure with a DDL filter so that runtime determinations can be made whether to skip the statement,
    execute this statement, or execute a replacement statement.
    Syntax
    DBMS_LOGSTDBY.SKIP (
         stmt                      IN VARCHAR2,
         schema_name               IN VARCHAR2,
         object_name               IN VARCHAR2,
         proc_name                 IN VARCHAR2,
         use_like                  IN BOOLEAN,
         esc                       IN CHAR1);Hope That Helps.
    Ogan
    Edited by: Ogan Ozdogan on 30.Tem.2010 13:03

  • Delete Command

    I am trying to add a delete command using DreamWeaver 8. I am
    using SQL. I add my Delete Command, however, since updating to
    Dreamweaver 8.02, I notice two additional columns in the properties
    and I am unsure what gets entered.
    I can see NAME which i enter IDParam, I see TYPE - unknown, I
    see SIZE - unknown, and RUN-TIME VALUE, which I enter
    Request.Form("MM_recordId"). I get an error when opening the
    DeleteCommand dialog SQL type not recognized
    Can someone tell me what I enter in the TYPE and Size
    column?

    Sorry but wanted to correct u fundamentally
    what r u trying to do ?
    delete from table1 where table1.id = table2.id and table1.firstname = 'john'
    how will u get table2.id when u r not selecting ithe table anywhere ?
    Hope u got my hint ....
    try this way
    delete from table1
    where table1.id =(select table2.id from table1,table2
    where table1.id=table2.id and table1.firstname = 'john' )
    cheers
    SHUBH

  • Problem with delete command through JDBC

    hi all,
    I have the following code in a Java program
    try
    DriverManager.registerDriver
    (new oracle.jdbc.driver.OracleDriver());
    conn = DriverManager.getConnection(
    "jdbc:oracle:thin:@localhost:1521:orcl", "airport", "airport");
    catch (SQLException ex)
    ex.printStackTrace();
    Every statement works fine except the delete command. When i try to execute this statement:
    stmt = conn.createStatement();
    stmt.executeUpdate("DELETE FROM distances");
    the program stalls. The table "distances" is owned by the user airport and this sql command works fine when I execute it in SQL+. The problem occurs when I try to execute a delete command through JDBC.
    Can anyone help me?
    Thanks...

    It seems that the problem ocuurs only when there are pending transactions.Correct. There are uncommitted INSERT/UPDATE/DELETEs on the table. Readers never block writers, thus having opened SELECT cursors on the table is not a problem. You writer process must be blocked by another writer process. (assuming of course no JDBC thin driver error - of which I've heard rumours there are or were quite a few - not using thin JDBC myself, thus cannot comment on whether these rumours are valid or not)
    What I would think a bit concerning is that one application trashing a table (deleting all the data) while other applications/users are busy changing data in that table. Why are they changing data that will be immediately trashed after they have committed their transactions? Surely they are wasting time and resources all around (user-side and server-side) by doing work that will be immediately invalidated? This kind of points to me to a database or application design problem.

  • Delete Command button doesn't take more than one parameter while update command does

    Hi,
    Does anybody have an idea WHY sharepoint does not send the parameter information to a delete command while the exact same parameter is being sent to the Update command?, the data is being pulled from an asp:TextBox bound  to the 'comments' field in
    the data source which happens to be the field I need to update, the code works for Update commands but not for Delete commands. Unfortunately I have to use sharepoint designer because SP is restricted at work, so I can't write code behind the scenes. I would
    appreciate any help, here's my code
    <%@ Page Language="C#" masterpagefile="../_catalogs/masterpage/v4.master" title="Test" inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" meta:progid="SharePoint.WebPartPage.Document" meta:webpartpageexpansion="full" %>
    <%@ Register tagprefix="SPSWC" namespace="Microsoft.SharePoint.Portal.WebControls" assembly="Microsoft.SharePoint.Portal, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Register tagprefix="cc2" namespace="Microsoft.SharePoint.WebControls" assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Register tagprefix="WebUI" namespace="Microsoft.Office.InfoPath.Server.Controls.WebUI" assembly="Microsoft.Office.InfoPath.Server, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Register tagprefix="WebPartPages" namespace="Microsoft.SharePoint.WebPartPages" assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <asp:Content id="Content1" runat="server" contentplaceholderid="PlaceHolderMain">
    <asp:SqlDataSource runat="server" ProviderName="System.Data.SqlClient" UpdateCommand="sp_updateStartedApprovals" ID="SqlDataSource2" ConnectionString="Data Source=MCARLOSJ2;User ID=sa;Password=****;Initial Catalog=MyDB;" SelectCommand="SELECT * FROM mainView " __designer:customcommand="true" UpdateCommandType="StoredProcedure" DeleteCommand="sp_rejectApprovals" DeleteCommandType="StoredProcedure">
    <UpdateParameters>
    <asp:Parameter Name="comments" Type="String"/>
    <asp:parameter Name="id" Type="Int32" />
    </UpdateParameters>
    <DeleteParameters>
    <asp:Parameter Name="comments" Type="String"/>
    <asp:parameter Name="id" Type="Int32"/>
    </DeleteParameters>
    </asp:SqlDataSource>
    <asp:GridView runat="server" id="GridView1" AutoGenerateColumns="False" DataSourceID="SqlDataSource2" DataKeyNames="id" GridLines="None" ForeColor="#333333" CellPadding="4">
    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
    <Columns>
    <asp:boundfield DataField="description" HeaderText="Status" ReadOnly="True" SortExpression="description">
    </asp:boundfield>
    <asp:boundfield DataField="Employee Last Name" HeaderText="Employee Last Name" ReadOnly="True" SortExpression="Employee Last Name">
    </asp:boundfield>
    <asp:boundfield DataField="Employee First Name" HeaderText="Employee First Name" ReadOnly="True" SortExpression="Employee First Name">
    </asp:boundfield>
    <asp:boundfield DataField="Pending approval" HeaderText="Pending approval" ReadOnly="True" SortExpression="Pending approval">
    </asp:boundfield>
    <asp:boundfield DataField="Atnmt %" HeaderText="Atnmt %" ReadOnly="True" SortExpression="Atnmt %">
    </asp:boundfield>
    <asp:boundfield DataField="Country" HeaderText="Country" ReadOnly="True" SortExpression="Country">
    </asp:boundfield>
    <asp:boundfield DataField="comments" HeaderText="comments" ReadOnly="True" SortExpression="Comments">
    </asp:boundfield>
    <asp:boundfield DataField="processStartedDate" DataFormatString="{0:MM/dd/yyyy}" HeaderText="Date Opened" ReadOnly="True" SortExpression="processStartedDate">
    </asp:boundfield>
    <asp:boundfield DataField="Due Date" DataFormatString="{0:MM/dd/yyyy}" HeaderText="Due Date" ReadOnly="True" SortExpression="Due Date">
    </asp:boundfield>
    <asp:templatefield>
    <ItemTemplate>
    <asp:TextBox runat="server" id="comments" Text='<%# Bind("comments") %>'/>
    <asp:LinkButton runat="server" Text="Approve" id="Button1" CommandName="Update" CausesValidation="False" />
    <asp:LinkButton runat="server" Text="Reject" id="Button2" CommandName="Delete" CausesValidation="false"/>
    </ItemTemplate>
    </asp:templatefield>
    </Columns>
    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
    <PagerStyle HorizontalAlign="Center" BackColor="#284775" ForeColor="White" />
    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
    <EditRowStyle BackColor="#999999" />
    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
    </asp:GridView>
    </asp:Content>

    Hi,
    you have multiple options here:
    1) upload as a script:
    a) save the statements in a file
    b) go to sql workshop > sql scripts
    c) upload script and run the script
    2) run the script line by line in the sql commands window directly:
    a) go to sql workshop > sql commands
    b) copy all statements there
    c) highlight the first statement with the mouse
    d) click "run" or press <ctrl>+enter
    3) use sql developer
    a) go to http://www.oracle.com/technology/products/database/sql_developer/index.html
    b) download and install
    c) connect to XE
    d) run the statements there
    Regards,
    ~Dietmar.

  • Understanding the dataadapter.delete command

    I'm new to ADO and ODP so forgive me if I'm missing the obvious. I want to do a simple delete from the database. The problem is I feel like I have to issue the delete command twice. The code I've posted blow works but I don't understand why. I create two commands one a select command the second a delete command. I apply these commands to a dataadapter and then use dataadapter .fill() to get a dataset.
    Great it works fine up to this point. The problem was when I called dataadapter.update nothing would happen. The delete command was ignored. So I looped through the resulting dataset and deleted the record from there. Then I called dataadapter.update and it worked. I tried not setting the dataadapter.deletecommand but then update failed.
    Now my question is: Is it always necessary to delete from a dataset as well as issue a delete command or is there a way of issuing just one delete command? Is it possible to simplify my code?
    Any suggestions or help greatly appreciated.
    Drew
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
    Dim oradb As String = "Data Source=vulcan.world;User Id=adowling;Password=aragon;"
    Dim conn As New OracleConnection(oradb)
    Dim cmd As New OracleCommand
    Dim cmd2 As New OracleCommand
    Dim orada As New OracleDataAdapter
    Dim dsLog As New DataSet
    Dim drDelete As DataRow
    Dim myCol As DataColumn
    Dim dcPK(1) As DataColumn
    Dim i As Integer
    Dim rc As DataRowCollection
    Dim pSDEWorkspace As IWorkspaceFactory2
    Try
    conn.Open()
    cmd.Connection = conn
    cmd.CommandText = "select * from t.reconcile_log"
    cmd.CommandType = CommandType.Text
    orada.SelectCommand = cmd
    cmd2.Connection = conn
    cmd2.CommandText = "delete from t.reconcile_log where objectid = " + TextBox1.Text
    cmd2.CommandType = CommandType.Text
    orada.DeleteCommand = cmd2
    orada.Fill(dsLog, "Reconcile_Log")
    orada.MissingSchemaAction = MissingSchemaAction.AddWithKey
    myCol = dsLog.Tables("Reconcile_Log").Columns.Item(dsLog.Tables("Reconcile_Log").Columns.IndexOf("OBJECTID"))
    dcPK(0) = myCol
    dsLog.Tables("Reconcile_Log").PrimaryKey = dcPK
    drDelete = dsLog.Tables("Reconcile_Log").Rows.Find(TextBox1.Text)
    drDelete.Delete()
    orada.Update(dsLog, "Reconcile_Log")
    ListBox1.Items.Clear()
    rc = dsLog.Tables("Reconcile_Log").Rows
    For i = 0 To rc.Count - 1
    ListBox1.Items.Add(Convert.ToString(rc.Item(i).Item(0)) + " " + rc.Item(i).Item(1) + " submitted " + rc.Item(i).Item(2) + " on " + rc.Item(i).Item("submitted"))
    Next i
    Catch ex As OracleException
    Select Case ex.Number
    Case 1
    MessageBox.Show("Error attempting to insert duplicate data.")
    Case 12545
    MessageBox.Show("The database is unavailable.")
    Case 904
    MessageBox.Show("invalid type")
    Case Else
    MessageBox.Show("Database error: " + ex.Message.ToString())
    End Select
    Catch ex As Exception
    MessageBox.Show(ex.ToString)
    Finally
    conn.Close()
    conn.Dispose()
    End Try
    End Sub

    Because the dataset is disconnected from the database. This allows you to load some data (into your dataset), disconnect from the network or whatever, make whatever changes you like and have none of this affect the data in the database until you issue the update.
    If you actually want to have your changes applied immediately then you can (assuming your application is constantly connected of course). Don't bother with a dataset/data adaptor at all. For example set up the sql select statement, assign it to a reader, execute the reader, store the rows returned in some custom objects or whatever. Make some changes and then use executeNonQuery to apply the updates, either one at a time or as a batch using array binding. There is a samples folder where you installed ODP.NET, have a look at some of the others.

  • Delete command was hanged

    Hi all,
    I have a one problem while execute the job.
    We execute the job every day in offline (after 10pm).
    We find out a delete command not worked. it hangs.
    Our database is 11g r2.
    The delete command is
    DELETE FROM tab1
    WHERE
    col1= :B1
    But whenever i put a same job after analyzing the table its works fine.
    if i did't put a analyze then this won't work.
    the delete command will delete the more then 30000 every day and inserted again.
    we will put a database analyze on every week without fail.
    can you pls suggest ur idea's to solve the issue.
    because i won't analyze every day .
    Regards,
    reshu.

    From your description of the command 'hanging' I would suspect that Oracle has chosen an execution plan that is not a correct fit for your data profile because the statistics are incorrect or non-existent.
    Check out these threads:
    {message:id=1812597}
    {thread:id=863295}
    You may want to consider fixing statistics on this table (sounds like you do a delete and insert every day). However it's tough to say without knowing the impact it might have on other SQL statements as well as without knowing the volatility of this table.

  • SQL describe command not running in JSP

    Hello All,
    i hope u all will be enjoying ur lives :)
    i have a problem that when i run the SQL describe command it gives me the error that Invalid SQL Statement...
    the command syntax is
    desc tablename; OR describe tablename;
    and i am doing it like that
    ResultSet rs = stmt.executeQuery("describe CF");
    where CF is the name of table..
    actually what i want to do is get the columns and its datatypes dynamically.. means that i want i get all the tables first from database then whichever table i select i can display its records and also add delete and modify the records...
    if anyone have already code of this ..please email me at
    [email protected]
    i will be very very thank ful for that..
    otherwise tell me the solution of the above problem :(
    thanx in advance
    RANA

    You can get all the information about the table using the meta data. Run a dummy query (I don't think it even needs to return any results), and then grab the meta data
    from the result set:
    ResultSet rs = null;
    ResultSetMetaData rsmd;
    int numcolumns = 0;
    Vector field = new Vector();
    rs = statement.executeQuery( "select * from mytable where field='nevermatchme'");
    rsmd = rs.getMetaData();
    numcolumns = rsmd.getColumnCount();
    for ( int i = 1 ; i <= numcolumns ; i++ ) {
    field.add( rsmd.getColumnName(i) );
    You now have a Vector with one element per database field, each containing a String of that fields name. I believe it is also possible to get field
    type, etc also the MetaData.

  • .......Embedding  SQL PLUS commands inside PL/SQL.....

    hai every body,
    I have a doubt regarding sql plus commands and PL/SQL..I am using Oracle 10g..I have created 1 procedure for deletion/updation of transactions..and the number of effected rows I just displayed with using " *dbms_output.put_line* (SQL%ROWCOUNT)"..hence before executing the procedure the sqlPlus command "*SET SERVEROUTPUT ON*" should turn on..at most times it is forget to turn on and output becomes vague..
    hence my question is "*Is there any package or any thing to execute sql plus commands(here it is SET SERVER OUTPUT ON) through PL/SQL statements???*"
    with thanks,
    jp@valapad

    jp@valapad wrote:
    I have a doubt regarding sql plus commands and PL/SQL..
    Easy PL/SQL supports PL/SQL commands and embedded SQL, which are found in the PL/SQL and SQL reference manuals.
    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10472/toc.htm
    http://download.oracle.com/docs/cd/E11882_01/server.112/e10592/toc.htm
    It does not support the commands of other applications or languages such as SQL*Plus, Unix or COBOL for example.
    I am using Oracle 10g..I have created 1 procedure for deletion/updation of transactions..and the number of effected rows I just displayed with using " *dbms_output.put_line* (SQL%ROWCOUNT)"..hence before executing the procedure the sqlPlus command "*SET SERVEROUTPUT ON*" should turn on..at most times it is forget to turn on and output becomes vague..You can set serveroutput on in your log in script for SQL*Plus if you keep forgetting.
    http://download.oracle.com/docs/cd/E11882_01/server.112/e10823/ch_two.htm#sthref94
    hence my question is "*Is there any package or any thing to execute sql plus commands(here it is SET SERVER OUTPUT ON) through PL/SQL statements???*"No.

  • RMAN-03009: failure of delete command on ... ORA-19606: Cannot copy or rest

    one server using 11.2.0.1.0 under Suse Linux
    configured catalog db, main db & jobs & ... almost everything with enterprise manager
    keep backups 14 days
    To make 14 full online dumps I had to aktive the archive mode and try to get rid of thoose unwanted additional files.
    Additional I make every night (less til no db activity) a dump and compress it myself.
    After some days the backupjob complain that it can not delete old files.
    EM / manage all backups / crosscheck all(
    CROSSCHECK BACKUPSET;
    CROSSCHECK COPY;
    sucessful
    EM / manage all backups / delete old backups
    DELETE NOPROMPT OBSOLETE;
    failed.
    script result
    Recovery Manager: Release 11.2.0.1.0 - Production on Tue Sep 7 17:20:55 2010
    Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
    RMAN>
    connected to target database: <SID> (DBID=773091283)
    RMAN>
    connected to recovery catalog database
    RMAN>
    echo set on
    RMAN> DELETE NOPROMPT OBSOLETE;
    RMAN retention policy will be applied to the command
    RMAN retention policy is set to recovery window of 14 days
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=196 device type=DISK
    Deleting the following obsolete backups and copies:
    Type Key Completion Time Filename/Handle
    Control File Copy 3831 03-AUG-10 /opt/oracle/base/product/11gR1/db/dbs/snapcf_<SID>.f
    Backup Set 18750 23-AUG-10
    Backup Piece 18754 23-AUG-10 /srv/ora/data/flash_recovery_area/<SID>/backupset/2010_08_23/o1_mf_nnndf_BACKUP_<SID>CH0_673c0hbp_.bkp
    Backup Set 18751 23-AUG-10
    Backup Piece 18755 23-AUG-10 /srv/ora/data/flash_recovery_area/<SID>/backupset/2010_08_23/o1_mf_nnndf_BACKUP_<SID>CH0_673c0hbo_.bkp
    Backup Set 19479 24-AUG-10
    Backup Piece 19482 24-AUG-10 /tmp/o0lm3qh9_1_1
    Backup Set 19490 24-AUG-10
    Backup Set 20087 24-AUG-10
    Backup Piece 20089 24-AUG-10 /srv/ora/data/flash_recovery_area/<SID>/autobackup/2010_08_24/o1_mf_s_727891232_677n40r3_.bkp
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03009: failure of delete command on ORA_DISK_1 channel at 09/07/2010 17:20:57
    ORA-19606: Cannot copy or restore to snapshot control file
    exit;
    Recovery Manager complete.
    google found some questions, but not fittung answers.
    So far:
    - I checked the folder & users rights.
    - I found some /tmp/ files - yes I "backup" the backuped archivelogs to-delete files in /tmp - I only active archivelogmode so I can onlinebackup
    - I managed to login via rman and execute DELETE OBSOLETE manual - result above.
    - Actual I delete the set one by one to find the problem set. (delete backupset 12345 ) from the list manually.
    Some a good idea what went wrong?
    additional: Is there a way to let oracle delete the empy archvielog-directories after deleting the logs within?
    18:00- the command "RMAN> BACKUP CURRENT CONTROLFILE" also fails.
    Edited by: 793286 on 07.09.2010 09:00

    Meanwhile I managed to delete all backupsets one by one.
    The problem with $ORACLE_HOME/dbs/snapcf_<SID>.f persists.
    cd $ORACLE_HOME/dbs
    mv snapcf_<SID>.f snapcf_<SID>.f.bak
    # replaced actual dbsidname with <SID>
    RMAN> delete obsolete;
    RMAN retention policy will be applied to the command
    RMAN retention policy is set to recovery window of 14 days
    using channel ORA_DISK_1
    Deleting the following obsolete backups and copies:
    Type Key Completion Time Filename/Handle
    Control File Copy 3831 03-AUG-10 /opt/oracle/base/product/11gR1/db/dbs/snapcf_TARMED1P.f
    Do you really want to delete the above objects (enter YES or NO)? y
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03009: failure of delete command on ORA_DISK_1 channel at 09/08/2010 09:44:07
    ORA-19606: Cannot copy or restore to snapshot control file
    mv snapcf_<SID>.f.bak snapcf_<SID>.fRMAN> backup current controlfile;
    Starting backup at 08-SEP-10
    using channel ORA_DISK_1
    channel ORA_DISK_1: starting compressed full datafile backup set
    channel ORA_DISK_1: specifying datafile(s) in backup set
    including current control file in backup set
    channel ORA_DISK_1: starting piece 1 at 08-SEP-10
    channel ORA_DISK_1: finished piece 1 at 08-SEP-10
    piece handle=/srv/ora/data/flash_recovery_area/TARMED1P/backupset/2010_09_08/o1_mf_ncnnf_TAG20100908T095000_68gj1b2m_.bkp tag=TAG20100908T095000 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
    Finished backup at 08-SEP-10
    Starting Control File and SPFILE Autobackup at 08-SEP-10
    piece handle=/srv/ora/data/flash_recovery_area/TARMED1P/autobackup/2010_09_08/o1_mf_s_729165003_68gj1d1b_.bkp comment=NONE
    Finished Control File and SPFILE Autobackup at 08-SEP-10
    RMAN> delete obsolete;
    RMAN retention policy will be applied to the command
    RMAN retention policy is set to recovery window of 14 days
    using channel ORA_DISK_1
    Deleting the following obsolete backups and copies:
    Type Key Completion Time Filename/Handle
    Control File Copy 3831 03-AUG-10 /opt/oracle/base/product/11gR1/db/dbs/snapcf_<SID>.f
    Do you really want to delete the above objects (enter YES or NO)? y
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03009: failure of delete command on ORA_DISK_1 channel at 09/08/2010 09:52:37
    ORA-19606: Cannot copy or restore to snapshot control file
    No different effect, if I changed the filename via 2nd terminal to .bak or not.
    RMAN> delete controlfilecopy 3831;
    will fail, if the file exists or not.
    Any chance to reset/kill that file?
    Is there a need to restart the dbms after rename the file?

  • SQL Plus command to print a report in Landscape format

    Hi,
    what is the SQL Plus command to print a report in Landscape format?

    841731 wrote:
    Hi,
    what is the SQL Plus command to print a report in Landscape format?SQLPlus doesn't print, and it doesn't know about 'landscape' vs. 'portrait' any more than it knows about fonts. the only 'formatting' it knows is line size, page size. And all it does with line size is know where to insert a CR/LF pair (windows) or a CR (*nix). The only thing it knows to do with page size is repeat column headers.
    The rest is up to whatever application you use to open the pure asciii text spool file.

  • Insert,update and delete commands

    hi everybody,
    how can i make a button that runs a specific insert update and delete commands
    i am using adf faces jdeveloper 11.1.1.2.0
    than you for all

    thank you guys for your interest what i need in my button click is to take some values from outputtext controls and execute an insert command according to these values what i have done is make a stored procedure and make a client interface function to my amImpl class and i have called getDBTransaction().executeCommand(command); it runs well when i didn't enter values in outputtext controls and it throws an exception when i put the values
    the exception is javax.servlet.ServletException: Unable to resolve a Validator instance using either validatorId '' or binding '#{bindings.FileName.validator}'.
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:270)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.portlet.client.adapter.adf.ADFPortletFilter.doFilter(ADFPortletFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at com.bea.content.manager.servlets.ContentServletFilter.doFilter(ContentServletFilter.java:178)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.webcenter.lifecycle.filter.LifecycleLockFilter.doFilter(LifecycleLockFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:159)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:326)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: javax.faces.convert.ConverterException: Unable to resolve a Validator instance using either validatorId '' or binding '#{bindings.FileName.validator}'.
         at com.sun.faces.taglib.jsf_core.ValidatorTag$BindingValidator.validate(ValidatorTag.java:168)
         at org.apache.myfaces.trinidad.component.UIXEditableValue.validateValue(UIXEditableValue.java:345)
         at org.apache.myfaces.trinidad.component.UIXEditableValue.validate(UIXEditableValue.java:172)
         at org.apache.myfaces.trinidad.component.UIXEditableValue._executeValidate(UIXEditableValue.java:503)
         at org.apache.myfaces.trinidad.component.UIXEditableValue.processValidators(UIXEditableValue.java:270)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.validateChildrenImpl(UIXComponentBase.java:1024)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.validateChildren(UIXComponentBase.java:1009)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processValidators(UIXComponentBase.java:816)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.validateChildrenImpl(UIXComponentBase.java:1024)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.validateChildren(UIXComponentBase.java:1009)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processValidators(UIXComponentBase.java:816)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.validateChildrenImpl(UIXComponentBase.java:1024)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.validateChildren(UIXComponentBase.java:1009)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processValidators(UIXComponentBase.java:816)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.access$101(ContextSwitchingComponent.java:39)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$3.run(ContextSwitchingComponent.java:122)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:309)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.processValidators(ContextSwitchingComponent.java:125)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.validateChildrenImpl(UIXComponentBase.java:1024)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.validateChildren(UIXComponentBase.java:1009)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processValidators(UIXComponentBase.java:816)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.access$101(ContextSwitchingComponent.java:39)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$3.run(ContextSwitchingComponent.java:122)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:309)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.processValidators(ContextSwitchingComponent.java:125)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.validateChildrenImpl(UIXComponentBase.java:1024)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.validateChildren(UIXComponentBase.java:1009)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processValidators(UIXComponentBase.java:816)
         at org.apache.myfaces.trinidad.component.UIXForm.processValidators(UIXForm.java:82)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.validateChildrenImpl(UIXComponentBase.java:1024)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.validateChildren(UIXComponentBase.java:1009)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processValidators(UIXComponentBase.java:816)
         at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1058)
         at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:700)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl$ProcessValidationsCallback.invokeContextCallback(LifecycleImpl.java:1203)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:303)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         ... 42 more
    thank you for help

  • Delete Command in Internal table

    Hi Friends,
    Currently i am using  DELETE command in internal table. My main requirement is delete the records in internal table based on the select -options given in Selection screen. 
    Synatx is given below.
      DELETE i_list WHERElifsk NOT in S_lifsk[].
    It is working fine if we give positive values  ie EQ 24 etc.
    if we give negetive values if NE 23(in select options) here
    sy-subrc is failing.
    Can any one kindly suggest.
    Regards,
    DVNS.

    Hi DV
    Its so simple... u r requirement is to delete all the entries which are not in the select options.
    Ur sintax is working correct.  Because, even if u hit a database table with select querry using this select option,  it will fetch all the positive entries and excludes all negative entries....
    if still u feel problem is persisting...  then fetch the lifsk from db table using this select option into an internal table and then filter how ever u want.
    Venkata Raju Duggirala

  • How to find GUI SQL*Plus command tool in Oracle 8i (version 8.1.7)

    I had installed Oracel 8i Enterprise Edition (version 8.1.7) on my server machine (Windows NT 4.0), I'd like to use Oracle Navigator (GUI SQL*PLUS command tool), but I can not find it from the menu. I know Oracle Navigator is available in Oracle 7. Can anyone tell me where and how to use GUI SQL*PLUS command tool in Oracle 8i Enterprise Edition (version 8.1.7) ?
    thanks a lot.
    David Zhu

    Hi
    Oracle Navigator is part of Personal Oracle7 and Oracle Lite. I don't know is it available in 8i Personal Edition but I am sure that it is not part of Standard and Enterprise Edition.
    Regards
    null

Maybe you are looking for