Get the error ora-01113 opening database after restore

Hi all

We have a test database. I lost my entire database including DBFs, newspaper Archives, controlfiles, redo log files.
But I have a hot copy of the lost database backup.
I tried to recover the database using the backup copy

I have restored my control files and all the dbfs and then when I tried to recover the database, I received the following message

RMAN-00571: =.
RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =
RMAN-00571: =.
RMAN-03002: failure of the command recover at 2005-04-01 14:14:43
RMAN-06054: recovery of media asking unknown journal: thread 1 Yvert 32230460

still I tried to open the database resetlogs, but I was following eror
RMAN > alter database open resetlogs:

ORA-01113: file 5 needs media recovery
ORA-01110: data file 5: C:\DB11\ORADATA\DB11\system01.dbf

I don't have the recovery logs and the archivelogs. Can someone help me how to open the database

Thanks and greetings

VINCENT

First step: make sure that you have a safe backup of what you use at the moment.

Because it is a test database and that you have a safe backup and you are certain that you do not have the available archived recovery logs to apply for restoration and (latter) canceling immediately doesn't allow however not the database open (maybe you might have been fortunate regarding the SNA/point in time consistency ), then:

Use the allowresetlogs_corruption hidden parameter (pretty sure he is one, can come back and edit this later to confirm), take an export and import the data into a new version of the database.

allowread_only_corruption is another, but the resetlogs should do the trick

Published by: stevencallan on April 9, 2009 11:00

Tags: Database

Similar Questions

  • My iCloud and shared calendars has stopped working in MS Outlook today.  They worked yesterday.  Now, I get the error message "cannot open this series of records.  The information store cannot be opened?  I tried the fix standard support.

    My iCloud and shared calendars has stopped working in MS Outlook today.  They worked yesterday.  Now, I get the error message "cannot open this series of records.  The information store cannot be opened?  I tried the fix standard support.

    Same thing here.  Looks like Windows did an automatic update during the night, and now nothing iCloud associated work (calendars, contacts, etc.)

    I also noticed that the error message: "could not load file or Assembly ' MOM." Implementation ' or one of its dependencies.  The system cannot find the specified file. "It started after restarting the Windows Update as well.  I imagine that the two are related in the same problem to iCloud.

  • Gets the error ORA-01779 after I added the column

    Hi, I'm a total newbie in APEX but collaborated with ordinary development Oracle (tables, views, packages, triggers, etc) for a number of years.

    I ve been assigned in order to respect an existing application to APEX. One task is to add a column to a single character named 'ACTIVE' to a database table and also present on a current project list page. The value can be 'Y' or 'n'. In the view which is the source of data for the project page ad 'Y' turned into 'Yes' and 'n' turned into 'no '. So far so good, everything works well.

    There is another page on which it is possible to create new or modify existing projects. This page uses a view as a source of data. On this page, I added a group of radiobutton that contains two options: 'Yes' and 'no '. When I select to edit a project in the project list page the second page is loaded and the correct option, 'yes' or 'No', is marked on the page. This group of radiobutton works exactly like a couple of other groups of radiobutton also represented with a single character column in the database. So far so good!

    However, when I try to save the project file by clicking on "Apply Changes" I get this error:

    ORA-20001: DML error: p_rowid = 50, ID = p_alt_rowid, p_rowid2 =, p_alt_rowid2 is. ORA-01779: cannot modify a column that is mapped to a table not preserved key

    What is the problem here? The new 'ACTIVE' column is added to the view, when I run the view I Don t get all records in duplicate, the underlying table has a column id as the primary key.

    Since I Don t know that APEX is under the hood it s hard tp what's wrong. Anyone knows the solution to this problem?

    / Magnus

    Hello Magnus,

    Is there an INSTEAD OF trigger defined on the view? Have you added the new column ACTIVE there too?

    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this response in marking it as useful or Correct ;-)

  • I use TDE tablespace encriptación and backup is performed (no encriptación rman). I get the error message when you try to restore the database

    I use TDE tablespace encriptación and backup is performed (no encriptación rman). I deleted the database and try to restore the backup. I get the error when you try to restore the database with rman restore database.

    ORA-19870: error when restoring backup piece + FRA_DG, oratst, backupset, 2015_03_2

    ORA-19913: could not decrypt the backup

    ORA-28365: portfolio is not open

    About what I know, you should be able to RESTORE the data, but no RECOVERY without portfolio being opened.

    Check the value of the variable environment - ORACLE_UNQNAME

    It has everything first a correct value and try to open the wallet.

    HTH,

    Pradeep

  • Get the error ORA-01422 in stored procedure

    ORA-01422: exact fetch returns more than number of lines
    This page explains the error:
    http://www.techonthenet.com/Oracle/errors/ora01422.php

    This is my procedure:
    In the clause select is causing the error. I understand the nature of the error, but the strange thing is that when I run the sql code, remove the "in."
    part of my test settings, I just receive a single line. Always when I execute my procedure with the same settings I get the error. What could be wrong?

    create or replace
    PROCEDURE COUNTER_GETACTIVE
    (
    METERPOINTID IN MeterPointCounters.MeterPointId%Type,
    METERPOINTCOUNTERNR IN METERPOINTCOUNTERS. Type of METERPOINTCOUNTERNR %,
    p_cursor on REFCURSOR_PKG.counter_cursor
    )
    IS
    l_counterNr CounterBridgeTable.CounterNr%type;
    l_meterId CounterBridgeTable.MeterId%type;
    BEGIN
    Select counternr, meterid in l_counterNr, l_meterId from CounterBridgeTable where meterpointid = METERPOINTID and meterpointcounternr = METERPOINTCOUNTERNR and datetom is null;

    Open p_cursor for select * from counters where counternr = l_counterNr and meterId = l_meterId;

    END COUNTER_GETACTIVE;

    You actually run this query

    select counternr, meterid from CounterBridgeTable where meterpointid = METERPOINTID and meterpointcounternr = METERPOINTCOUNTERNR and datetom is null;
    

    param name is identical to the column, he's ignoring your param and pretty much do a self-join

    Try this:

    create or replace
    PROCEDURE COUNTER_GETACTIVE
    (
    p_METERPOINTID IN MeterPointCounters.MeterPointId%Type,
    p_METERPOINTCOUNTERNR IN METERPOINTCOUNTERS.METERPOINTCOUNTERNR%type,
    p_cursor out REFCURSOR_PKG.counter_cursor
    )
    IS
    l_counterNr CounterBridgeTable.CounterNr%type;
    l_meterId CounterBridgeTable.MeterId%type;
    BEGIN
    select counternr, meterid into l_counterNr, l_meterId from CounterBridgeTable where meterpointid = p_METERPOINTID and meterpointcounternr = p_METERPOINTCOUNTERNR and datetom is null;
    
    open p_cursor for select * from counters where counternr = l_counterNr and meterId = l_meterId;
    
    END COUNTER_GETACTIVE;
    

    Published by: tanging on June 8, 2010 10:37

  • Get the error ora-02021

    I'm trying to truncate a table but oracle throws the error ORA-02021: DDL operations are not allowed on a remote database.

    02021, 00000, "DDL operations are not allowed on a remote database"
    * Cause: An attempt was made to use a DDL operation on a remote database.
    For example, "CREATE TABLE tablename@remotedbname... ».
    * Action: To change the remote database structure, you must connect to the
    remote database with the appropriate privileges.


    I'm pretty sure you have the appropriate privileges.

    You can even call a procedure:
    dbms_utility.exec_ddl_statement@DB_LINK exec ('your stmt');

  • get the error code 1429 (I can't restore my shuffle gen 4)

    I can't restore my shuffle gen 4 (I get the error code 1429)

    Suffle stopped mid-song and don't retart

    A Reset (reboot) for a shuffle is to set the switch OFF for at least 10 seconds.

    If you are able to start a restore through iTunes, which must mean that the shuffle still appears in iTunes when connected.  It is the Apple document with tips for this error.

    If you see the error 1415, 1417, 1418, 1428, 1429, 1430, 1436 or 1439 during restore or update iPod in iTunes - Apple...

    If this does not help, please report back.

  • Get the error ORA-31204: DBMS_LDAP: PL/SQL - Session of LDAP invalid.

    I get error report error: ORA-31204: DBMS_LDAP: PL/SQL - Session of LDAP invalid. When you attempt to select a view in the APEX. The view is the source of the region for a regional report.

    The view contains data from active directory that has been built using the DBMS_LDAP package.

    PLEASE SEE BELOW FOR THE CODE USED IN THE CONSTRUCTION OF THE VIEW;

    VIEW to CREATE or REPLACE v_capa_security AS
    (select attribute_name, attribute_value)
    table (ldapquery (sys_context ('CAPA_ACCESS', 'domain') |'. com',))
    '389',
    sys_context ('CAPA_ACCESS', 'username') | » @'|| sys_context ('CAPA_ACCESS', 'domain') |'. com',.
    sys_context ('CAPA_ACCESS', 'password'),
    "DC is psdev, DC = com",
    "sAMAccountName =' | ' sys_context ('CAPA_ACCESS', 'username'),
    (("memberof, business, mail, sAMAccountName"))
    );

    (The below function retrieves data from a LDAP directory)

    CREATE OR REPLACE FUNCTION LDAPQuery)
    p_host IN VARCHAR2,
    p_port IN VARCHAR2,
    p_user IN VARCHAR2,
    p_password IN VARCHAR2,
    p_dn_base IN VARCHAR2,
    p_filter IN VARCHAR2,
    p_attributes IN VARCHAR2)
    Tbl_ty_ldap_query RETURN PIPELINED IS


    v_result tbl_ty_ldap_query: = tbl_ty_ldap_query)
    ty_ldap_query (NULL,
    NULL,
    NULL));


    retval PLS_INTEGER;
    v_session DBMS_LDAP. SESSION;
    v_attrs DBMS_LDAP.string_collection;
    v_message DBMS_LDAP. MESSAGE;
    v_entry DBMS_LDAP. MESSAGE;
    v_dn VARCHAR2 (256);
    v_attr_name VARCHAR2 (256);
    v_ber_elmt DBMS_LDAP.ber_element;
    v_vals DBMS_LDAP. STRING_COLLECTION;
    b_first BOOLEAN: = TRUE;
    v_dn_identifier VARCHAR2 (200);
    v_attributes apex_application_global.vc_arr2;

    BEGIN
    retval: = - 1;
    DBMS_LDAP.use_exception: = TRUE;
    v_session: = DBMS_LDAP.init (p_host, p_port);
    retval: = DBMS_LDAP.simple_bind_s (v_session,
    p_user,
    p_password);

    v_attributes: = apex_util.string_to_table (p_attributes, ',');
    because me in (v_attributes.first)... loop (v_attributes.last)
    v_attrs (i): = v_attributes (i);
    end loop;

    value: =.
    DBMS_LDAP. SEARCH_S (v_session,
    p_dn_base,
    DBMS_LDAP. SCOPE_SUBTREE,
    p_filter,
    v_attrs,
    0,
    v_message
    );
    retval: = DBMS_LDAP. COUNT_ENTRIES (v_session, v_message);
    v_entry: = DBMS_LDAP. FIRST_ENTRY (v_session, v_message);
    WHILE v_entry IS NOT NULL LOOP
    v_attr_name: = DBMS_LDAP. FIRST_ATTRIBUTE (v_session,
    v_entry,
    v_ber_elmt);

    WHILE v_attr_name IS NOT NULL LOOP
    v_vals: = DBMS_LDAP. GET_VALUES (v_session,
    v_entry,
    v_attr_name);

    IF v_vals.count > 0 THEN
    BECAUSE me IN v_vals. FIRST... v_vals. LAST LOOP
    v_dn_identifier: = DBMS_LDAP. GET_DN (v_session,
    v_entry);
    line of conduct (ty_ldap_query (v_dn_identifier,
    v_attr_name,
    v_vals (i)));
    END LOOP;
    END IF;
    v_attr_name: =.
    DBMS_LDAP. NEXT_ATTRIBUTE (v_session,
    v_entry,
    v_ber_elmt);
    END LOOP;
    v_entry: = DBMS_LDAP. NEXT_ENTRY (v_session,
    v_entry);

    END LOOP;
    retval: = DBMS_LDAP.unbind_s (v_session);
    RETURN;

    END LDAPQuery;



    I then use the following pl/sql code piece to fill the frame and the view;

    Start
    pkg_capa_security.pr_set_context (< username > < password >, < domain >).
    end;


    If I run the code through TOAD or SQLPLUS it works very well (I am able to select the view without getting errors)

    Is the error due to the LDAPQuery as a function of Pipelined?

    Any help/suggestions welcome.

    Thanks in advance

    If you set a process of loading page on preparing for the session of database to view your page. If you need it for the session of data used for the application that manages the POST (presentation) of your page you must set an after - submit processes. An easier way to do both is to code once in the VPD (under Security) attribute for the application.

    Scott

  • Try reinstalling iTunes but I get the error "could not open key: HKEY_LOCAL_MACHINE\Software\Classes\.m4b\OpenWithList\iTunes.exe.

    original title: problem with installation of iTunes

    Hi guys

    iTunes was running great until I tried to update to 9.0...

    I tried the apple forums and forum of microsoft ideas, but nothing helps...

    I use a dell 17 with vista home premium with sp2 installed studio.

    partially, he settled then I get this error:

    Could not open key: HKEY_LOCAL_MACHINE\Software\Classes\.m4b\OpenWithList\iTunes.exe check that you have sufficient access to that key or contact your support team.

    I guess you're the closest to support staff I have....

    in any case... I uninstalled itunes and quicktime and itunes now will not reinstall.  I tried the version 8.2.1.6 and I guess I can try the previous version... I also tried opening the HKEY and got in what concerns the OpenWithList, but he will not give me access.  I have no idea what I'd do if I got there, but I watched out of curiosity and was blocked...

    any info would be greatly appreciated!

    If you have guitar questions let me know, I have been a tech for almost 25 years.

    Thanks again, scott

    I had the exact same problem and error as you message the guy but he fixed earlier. I'm not an expert, or even trained somehow. I just worked through until I got everything to install. If you try this, please back up your registry first.

    In any case, here's what I did.

    First of all, I uninstalled iTunes, Quicktime, Apple Software updater toally, _-anything with Apple in the name.

    I opened regedit using 'run as administrator '.

    I then went to the registry key:

    HKEY_LOCAL_MACHINE-1-5-18\Components\DA42BC89BF25F5BD0AF18C3B9B1A1EE8\108B43C0CEA676640B35306AE7D24051

    .. .and selected the folder DA42BC89BF25F5BD0AF18C3B9B1A1EE8

    Right-click & click Permissions
    Click Advanced, and then click the owner tab
    Type "Administrators" in the current field of owners and th check Replace owner subcontainer and volumes

    (Note: I did this because I had another key with permission issues, after I fixed the original onelisted above)

    Apply the settings, and then click Permissions tab. Once more, add 'administrators' to the permission entries list, and then click on edit and select all the checkboxes of permission. Also click on the boxes of the 2 bottom regarding permissions inheritable.

    Click OK

    Now on the main permissions tab, choose administrators in the windows user name or group and then check the full control and read check boxes. Click OK.

    In the main window of regedit, you should now see the keys in the right pane for each subfolder in:
    HKEY_LOCAL_MACHINE-1-5-18\Components\DA42BC89BF25F5BD0AF18C3B9B1A1EE8

    In the menu bar click file > exit

    I downloaded and installed the new handset iTunes9 and apple Quicktime.

    Everything worked well. I hope this helps.

    -J

  • Sending a message using UTL_SMTP, get the error ORA-29278: SMTP temporary error

    Hi all

    I try to send mail from oracle plsql. for that I use the below mode operative but unfortunately not able to move forward.
    SQL> select * from v$version;
    
    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    procedure is
    CREATE OR REPLACE PROCEDURE send_mail (p_to        IN VARCHAR2,
                                           p_from      IN VARCHAR2,
                                           p_message   IN VARCHAR2)
    AS
      l_mail_conn   UTL_SMTP.connection;
      l_reply utl_smtp.reply;
      l_smtp_host VARCHAR2(50) := 'smtp.gmail.com:25';
      l_smtp_port NUMBER := 25;  
    BEGIN
      l_mail_conn := UTL_SMTP.open_connection(l_smtp_host, l_smtp_port);
      utl_smtp.EHLO(l_mail_conn, l_smtp_host);
      utl_smtp.command(l_mail_conn, 'AUTH LOGIN');
      utl_smtp.command(l_mail_conn, utl_raw.cast_to_varchar2(utl_encode.base64_encode(utl_raw.cast_to_raw('[email protected]'))));
      utl_smtp.command(l_mail_conn, utl_raw.cast_to_varchar2(utl_encode.base64_encode(utl_raw.cast_to_raw('mypwd'))));
      l_reply :=UTL_SMTP.mail(l_mail_conn, p_from);
      dbms_output.put_line( l_reply.code || ' ' || l_reply.text );
      UTL_SMTP.rcpt(l_mail_conn, p_to);
      UTL_SMTP.write_data(l_mail_conn, p_message || UTL_TCP.crlf || UTL_TCP.crlf);
      UTL_SMTP.quit(l_mail_conn);
    END;
    /
    call you as follows
    declare
     conn        utl_smtp.connection;
     smtp_domain VARCHAR2(256) := null;
     BEGIN
     utl_smtp.command(conn,'STARTTLS');
     utl_smtp.helo(conn, smtp_domain);
       send_mail(p_to        => '[email protected]',
                 p_from      => '[email protected]',
                 p_message   => 'can i get message.');
     END;
     /
    and the error
    ORA-29278: SMTP transient error: 421 Service not available
    ORA-06512: at "SYS.UTL_SMTP", line 21
    ORA-06512: at "SYS.UTL_SMTP", line 97
    ORA-06512: at "SYS.UTL_SMTP", line 159
    ORA-06512: at line 5
    I checked in Control Panel that IIS is installed and also SMTP is configured.
    I am able to ping HOST SMTP thro' TELNET

    and I changed the parameter, SMTP_OUT_SERVER, as
    ALTER SYSTEM SET SMTP_OUT_SERVER= 'smtp.gmail.com:25' scope = both
    I don't get no idea. is this due to use the GMAIL Server?

    Oracle 10 g and Windows version is XP - SP3

    Thanks for any help

    Concerning
    Knockaert

    When I googled for "Gmail PL/SQL" I find a lot of things, including the articles of blog with code examples. How about you?

  • The simple geometry Gets the error ORA-29532 on all calls SDO_GEOM

    Hi all

    I have a single point in a table in such a way that the query:
    select SDO_GEOM.VALIDATE_GEOMETRY(geomObj, 0.05) from testvalid;
    /* Returns */
    SDO_GEOM.VALIDATE_GEOMETRY(GEOMOBJ,0.05)
    'TRUE'
    However the query:
    select SDO_GEOM.VALIDATE_GEOMETRY_with_context(geomObj, 0.05) from testvalid;
    Receives the following error message:
    ORA-29532: Java call terminated by uncaught Java exception: java.lang.NumberFormatException: empty String
    ORA-06512: at "MDSYS.SDO_3GL", line 658
    ORA-06512: at "MDSYS.SDO_GEOM", line 519
    ORA-06512: at "MDSYS.SDO_GEOM", line 558
    ORA-06512: at line 1
    The data itself are a unique SDO_POINT_TYPE:
    select GEOMOBJ from testvalid;
    /* Returns: */
    GEOMOBJ
    '(3001, , (174.092329032787, 129.420551704918, -71.2857142857142), , )'
    I think the problem is something to do with the accuracy of the stored X, Y and Z values in point because if I'm running the following:
    update TESTVALID set GEOMOBJ.sdo_point.x = cast(GEOMOBJ.sdo_point.x as number(8,3));
    select SDO_GEOM.VALIDATE_GEOMETRY_with_context(geomObj, 0.05) from testvalid;
    /* Returns: */
    SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT(GEOMOBJ,0.05)
    'TRUE'
    Similarly, running a direct comparison of an object made in the textual representation of the point fly works fine:
    select SDO_GEOM.VALIDATE_GEOMETRY_with_context("MDSYS"."SDO_GEOMETRY"(3001,NULL, "MDSYS"."SDO_POINT_TYPE"(174.092329032787,129.420551704918,-71.2857142857142),NULL,NULL), 0.005) from dual;
    /* Returns */
    SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT("MDSYS"."SDO_GEOMETRY"(3001,NULL,"MDSYS"."SDO_POINT_TYPE"(174.092329032787,129.420551704918,-71.2857142857142),NULL,NULL),0.005)
    'TRUE'
    Note that I only noticed this problem after upgrade to v11 v11 R2. In addition, the same error ORA-29532 happens when executing calls SDO_GEOM. [x] function such as SDO_GEOM. DISTANCE(). The problem is not limited to the geometries of type SDO_POINT_TYPE, but the problem only happens on some geometry entries in my database. It is reproducible in that the same geometry will continue to fail and the only solution I found is to try to round up its precision in x, y or z. I don't know how to round the precision for the types of SDO_POINT_TYPE easily, so one of my problems is that I find myself with a any dispersion of other geometries that I can query is no longer in space.

    The data itself was inserted from MATLAB (which connects using drivers of ODBC Oracle Java v11) which converts my details in Java.Math.BigDecimal and binds to a prepared statement oracle.
    It is possible that I consider that the insertion is made from different computers, some of which are 64-bit computers. Maybe somehow these machines are pumping in too large of a precision coordinates for the geometry of the oracle?

    Any help would be great I am quite lost here.
    If the precision is indeed the problem, anyone know how can I cut these surplus values after the decimal point for all types of geometry?


    Thank you
    Sven.

    It is only related to the version of the server.
    So once the database is 11.2, that corruption won't happen.

  • Get the error: ORA-01460: letter dead or unreasonable conversion requested

    Hello

    I created a Page in Oracle APEX, I have a textarea element Page. I created a Page process on the "submit" button to insert text box data in the CLOB column in a table. If the data in the text box is less than 4,000 characters, it works fine, but if the data exceeds 4000 I get the below error:

    "Error during the processing of validation.

    "ORA-01460: letter dead or unreasonable conversion requested".

    Here's my process of Page:

    declare

    CLOB v_notes;

    Start

    v_notes: = wwv_flow_utilities.clob_to_varchar2(:P1_NOTES);

    INSERT INTO ENQ_DETAILS (ENQUIRY_TYPE,STOCKS,NOTES,CREATED_BY)

    VALUES (1,: P1_RESPONSE_ACTION, v_notes,: APP_USER);

    end;

    Can someone help me please?

    Chaitali salvation,

    Check this plugin: Enkitec CLOB support

    Kind regards

    Jitendra

  • Get the error ORA-39146 while trying to import data from 10 g to 12 c

    Hi all


    im getting below error while trying to import data from 10 g to 12 c


    ORA-39146: schema 'B_SITES' does not exist
    import in WE8MSWIN1252 and AL16UTF16 NCHAR character set
    export in the UTF8 character set and AL16UTF16 NCHAR character set
    ATTENTION: the possible loss of data to character set conversions


    can someone help how do we change to WE8MSWIN1252 UTF8 character set...

    Hello

    "ORA-39146: there is no schema 'B_SITES'.

    ORA-39146: schema 'string' does not exist

    Cause: The specified schema was referenced as the source of a REMAP_SCHEMA parameter, but did not exist in the dump file (for

    Action: Specify the correct name of the schema to be remapped.

    Anand

  • get the error ORA-30483 (window functions not allowed herevv)

    Hi all
    Oracle version: 11.2.0.2.0

    with Table_dm AS
    (select 1 month_no, "wk1" week, DM_AMT 120, 300 GRoss_Amt, Week_no 4, Gross_qty 12, 1000 dm_adj_total double
    UNion all
    Select 1 month_no, "wk2" week, DM_AMT 120, 300 GRoss_Amt, Week_no 4, Gross_qty 12, 1000 dm_adj_total double
    Union of all the
    Select 1 month_no, "wk3" week, DM_AMT 120, 300 GRoss_Amt, Week_no 4, Gross_qty 12, 1000 dm_adj_total double
    Union of all the
    Select 1 month_no, "wk4" week, DM_AMT 120, 300 GRoss_Amt, Week_no 4, Gross_qty 12, 1000 dm_adj_total double
    Union of all the
    Select 2 month_no, 'wk5"week, DM_AMT 200, 400 GRoss_Amt, Week_no 5, Gross_qty 20, 1000 dm_adj_total double
    UNion all
    Select month_no 2, "wk6" week, DM_AMT 200, 400 GRoss_Amt, Week_no 5, Gross_qty 20, 1000 dm_adj_total double
    Union of all the
    Select month_no 2, "wk7" week, DM_AMT 200, 400 GRoss_Amt, Week_no 5, Gross_qty 20, 1000 dm_adj_total double
    UNion all
    Select month_no 2, "wk8" week, DM_AMT 200, 400 GRoss_Amt, Week_no 5, Gross_qty 20, 1000 dm_adj_total double
    UNion all
    Select month_no 2, "wk9" week, DM_AMT 200, 400 GRoss_Amt, Week_no 5, Gross_qty 20, 1000 dm_adj_total double
    )
    Select month_NO, GROSS_AMT
    (select
    mONTH_NO
    sum (first_value (GROSS_AMT) more (PARTITION MONTH_NO)) Gross_amt
    of table_dm
    Month_no group

    )

    get the following error

    "ORA-30483: window functions are not allowed here."

    The value of Gross_Amt must be the total of the Group month_no gross_amt (the Gross_Amt would be the first value in each month_no

    the value of Gross_Amt must therefore 700 in this case.

    Please suggest.

    AB

    Thank you very much, SY, is really a useful solution<>

  • get the error ORA-04088

    Hello

    I created a trigger to trigger the error if a trial off to enter data in a column that is attached to a number sequence.
    This trigger works, but with errors, these errors become after trying to insert values into the table.

    The errors are:

    Insert into test2 values(24,'horse','hyderabad',30); - 30 here is worth attempting to enter the column use
    Error report:
    SQL error: ORA-20101: insertion of the value to enter the not allowed... It will take the auto-numbering
    ORA-06512: at "SCOTT. TRI_UNQID', line 11
    ORA-04088: error during execution of trigger ' SCOTT. TRI_UNQID'


    My trigger is
    create or replace
    trigger tri_unqid
    before insert on test2 
    for each row
    declare
    v_number number(2);
    ins_exp exception;
    begin
    if :new.regid is not null  then
    raise ins_exp;
    else 
    select unqid.nextval into v_number from dual;
    :new.regid:=v_number;
    end if;
    exception
    when ins_exp then
    raise_application_error(-20101,'inserting the regid value not allowed.. it will take auto number');
    end tri_unqid;
    Output:
    It's the execution and throw my exception and other... I am not able to solve...
    and another point is if it is inserted successfully with errors, then it's values are inserted into the table at the front not the end of the records... How is it going...

    can any body explain

    Thank you
    Baba

    Published by: BluShadow on April 11, 2013 10:26
    fixed {noformat}
    {noformat} tags.  The "code" in the tag is enclose in "{" and "}", not "&lt;" and "&gt;"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        

    It's the execution and throw my exception and other... I am not able to solve...

    This is because there is no problem.

    Check your error message

    
    SQL Error: ORA-20101: inserting the regid value not allowed.. it will take auto number
    ORA-06512: at "SCOTT.TRI_UNQID";, line 11
    ORA-04088: error during execution of trigger 'SCOTT.TRI_UNQID' 
    

    Read from the bottom up. Oracle means

    1. a SCOTT trigger. TRI_UNQID caused an error
    2. the error occurred on line number 11
    3. the error message is ' insertion of the value to enter the not allowed... " It will take auto number.

    Why oracle has to say what trigger or procedure caused the error? Because there might be several trigger or procedure that may generate the same error if a user just need to know what is causing the error. And a line number is always helpful for debugging.

    So everything is good here. There is no problem to solve.

    and another point is if it is inserted successfully with errors, then it's values are inserted into the table at the front not the end of the records... How is it going...

    In a HEAP organized table this is SO forward or back (order of the lines is not relevant). If you want to display the records in an orderly manner use the ORDER BY Clause in the SELECT statement.

    So all is good here as well.

Maybe you are looking for