The lines where him deleted using the databases from backup triggers

Hi all

1) CREATE TABLE student1

  (

     no    NUMBER,

     name  VARCHAR2(10 byte),

     marks NUMBER

  )


I inserted the 10 records (1,2,3...10)


(2) Created student1_history Table create table student1_history in select * from student1.

(3) removal of Student 1

When n = 10

4) CREATE OR replace TRIGGER after_student1

  AFTER DELETE ON student1

  FOR EACH ROW

START

INSERT IN student1_history

                (no,

                 name ,

                 marks )

    VALUES      (:old. no ,

                 :old . name ,

                 :old . brands of );

END ;


(5) select * from student1_history

no row is returned.


I have 2 tables as indicated above, I deleted a row in the table of Student 1 and I compile the trigger, I want store the deleted row in the Table student1_history


Can you please help


Hello

Have you tried using the delete trigger BEFORE? Please try if you do not have

Warm greetings,

Jjun

Tags: Database

Similar Questions

  • Cannot open the database from backup

    Hello

    I use Oracle Database 10 g on Lunix and have a physical database ensures.

    I was check on the primary it shows

    Primary

    SQL > archive logs list;
    Database log mode Archive Mode
    Active AutoArchive
    Archive destination /database/oraapps/PROD/db/tech_st/10.2.0/dbs/arch
    More old sequence of journal online 568
    Log sequence archive 569
    Current log sequence 569


    Sleep mode


    SQL > list of archive logs
    Database log mode Archive Mode
    Active AutoArchive
    Archive destination /database/oraapps/PROD/db/tech_st/10.2.0/dbs/arch
    More old sequence of journal online 568
    Log sequence to archive 0
    Current log sequence 569

    Whenever I run

    alter system switch logfile, that is happening, but when I try to open the database of Eve I get error like below;

    SQL > ALTER DATABASE OPEN;
    ALTER DATABASE OPEN
    *+
    ERROR on line 1:
    ORA-16004: backup database requires recovery
    ORA-01152: 1 no file has been restored from a sufficiently old backup
    ORA-01110: data file 1: ' / database/oraapps/PROD/db/apps_st/dddd/system01.dbf'

    Please advice.

    Thank you.

    Published by: user8676543 on October 16, 2012 03:55

    recreate your Eve yet once, you did something wrong in creation.

    http://oracleinstance.blogspot.com/2010/01/step-by-step-document-for-creating.html

  • Bounce the database from backup

    Hello

    I use oracle10g with database pending. Here is the version of database.

    Oracle Database 10 g Enterprise Edition release 10.2.0.3.0 - 64bi
    PL/SQL version 10.2.0.3.0 - Production
    CORE Production 10.2.0.3.0
    AMT for Linux: release 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production

    Now, I want to increase the number of processes in the primary database. Primary needs downtime. But in this case, do I bounce the day before?

    Let me ask my questions here.

    1 should I I bounce the day before to this scenario?

    2 here are the commands and the sequence of steps to stop and start the database. Please correct me if I'm wrong...

    2 (a) stop of the standby database first. (run this command at the secondary level)

    Connect / as sysdba
    SQL > ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
    SQL > shutdown immediate


    2 (b) primary stop (run this command in the primary)

    SQL > ALTER SYSTEM SET PROCESSES = 999 SOPE = spfile;
    SQL > SHUTDOWN IMMEDIATE

    2 c) primary startup

    SQL > STARTUP

    beginning 2d) the secondary database

    Connect / as sysdba
    startup nomount
    ALTER DATABASE MOUNT STANDBY DATABASE;
    ALTER DATABASE RECOVER MANAGED STANDBY BASE DISCONNECT FROM THE SESSION.


    (3) after starting the database, how can I make sure, primary is on sale the archivelog in high school?



    Any help is appreciated...

    The backup database can be upward as you restart the primary database - which is not a problem.

    Just compare V$ MANAGED_STANDBY standby with V$ log primary: sequence # process MRP with APPLYING_LOG status must be equal or close to the sequence # who is CURRENT in V$ LOG of primary.

    You must also set the parameter to the eve with scope database = spfile. So after a failover or a passage, the setting is the same on your new primary database.

    Kind regards
    Uwe Hesse

    http://uhesse.WordPress.com

  • Export the database from another pc - problem EXP-00056

    Hi all,

    I have a pc (called PC1) with installed Oracle11gR2. I want to export the database from another pc (called PC2) which is connect with PC1 with a LAN.
    I have connected PC2 to PC1 so:
    $ ssh oracle@IP_of_PC1

    and as the user oracle, I tried export then:
    index of the_user/the_pass exp = y subsidies forced is y = y line is my_dump.dmp log = my_log.log

    but he said to me:
    Export: Release 11.2.0.1.0 - Production on Tue 7 Sep 14:44:13 2010

    Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
    EXP-00056: ORACLE error 1034
    ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Linux-x86_64 error: 2: no such file or directory
    EXP-00005: all authorized logon attempts failed
    EXP-00000: export completed unsuccessfully

    Why it does not work?

    Thank you much in advance.

    Run this and show me where exactly you run

    index italia/italia@dbSID exp = y subsidies forced is y = y line is dump070910italia.dmp

  • What happens when the database in backup Mode?

    Hello

    What happens when we kept the database in backup mode, by using the command "Alter database Begin Backup" means;


    Thank you...
    ASIT

    OK, now my query is whether Oracle freeze the data file header and information is stored in the log file of restoration by progression. So if my backup job continues for 30 min and at the same time someone did some update of database, then how these updates to the information written back to the data file after "Alter Database End Backup'.»

    Oracle only blocks data file headers, no body. Modified blocks will be stored in data files (at control points) even in backup mode.
    If checkpoint has not arrived yet after this update and validation, and DB has decreased, then when it will start it will redo-log automated recovery.

    Published by: user11181920 on Sep 21, 2012 11:54

  • Migrate the database from standard edition to enterprise edition.

    Hello

    We use oracle 10.2.0.4 on AIX 5.3.

    We lack some databases on the standard edition, now we need to migrate these databases to enterprise edition,

    What are the steps to do it?


    Thank you.

    Salvation;

    Please find below the doc:
    How to convert the database from Standard to Enterprise Edition? [117048.1 ID]

    Respect of
    HELIOS

  • recreate the database from an existing database script

    Hi Experts,

    I need script to re-create the database from an existing database. I tried to find in Web sites, im not able to get it.

    Please help me do this,

    Thanks in advance.

    concerning
    Sundar

    Loo in the metalink Doc ID: Note: 211905.1

  • everything except the tablespace from backup system

    Is there a way to everything except the tablespace from backup system without having to specify each individual tablespace?

    version is 10.1.0.5 on HP - UX itanium.

    The reason is the database has been updated since 7.3.4-> 8i - > 10.1.0.5 and we now migrate with RMAN to instead of the user managed backups however, we met a bug when save the index blocks in the system tablesapce this only impacts backupsets compressed so if I can exclude the system tablespace I can run two backups one uncompressed which captures the system tablespace , then another that captures everything. I would really avoid specifying storage space in a script that she then introduced the possibility of a tablespace is added and is not included in the backup.

    Unfortunately, if you want to do a full database backup, you will not be able to exclude the SYSTEM tablespace. With this in mind, you will have left with specifying the tablespace backups.

  • How do I delete the database and backup of the ASM

    Hi all

    Oracle 11.2.0.3 database
    OEL 5.7

    We have a host for restore purposes.
    Run us monthly or quarterly operations to verify that I am able to restore a subset data in the given duration or for other purposes of restoration.
    I have an automated script to clone the database, but the database Clone to remove former base ASM before starting this process. I want to delete only the database files and keep the configuration (for example oratab/network/ocr and so on).

    Question: There is an easy way to delete these files without logging on ASM or using DBCA?

    Appreciate any help.

    user12028775 wrote:
    Hi all

    Oracle 11.2.0.3 database
    OEL 5.7

    We have a host for restore purposes.
    Run us monthly or quarterly operations to verify that I am able to restore a subset data in the given duration or for other purposes of restoration.
    I have an automated script to clone the database, but the database Clone to remove former base ASM before starting this process. I want to delete only the database files and keep the configuration (for example oratab/network/ocr and so on).

    Question: There is an easy way to delete these files without logging on ASM or using DBCA?

    Yes, there is a simple way. Use the DROP DATABASE command.

    Use the DROP DATABASE command to remove the database target and, if RMAN is connected to a recovery catalog, unregister it. RMAN removes all the data files, online redo logs and control belonging to the target database files. By default, RMAN prompts.

    Put this command in your script before clone your database:

    RMAN> CONNECT TARGET SYS@test1
    
    RMAN> STARTUP FORCE MOUNT
    RMAN> SQL 'ALTER SYSTEM ENABLE RESTRICTED SESSION';
    RMAN> DROP DATABASE INCLUDING BACKUPS NOPROMPT;
    

    Kind regards
    Levi Pereira

  • Improvement of the database from 9i to 11.2.0.4

    Hi all

    I want to upgrade a database independent 9i to 11.2.0.4. Please suggest prerequisites and post the steps of the task to the high-gradation or share a link.

    Can I directly go from 9i to 11.2.0.4?

    Import/Export or Rman which will be better please suggest?


    Please let us know the steps in the import/export method?


    Thank you and best regards,


    Arya


    Arya,

    If you chose to export / import method, you might need to know what is the disadvantage and advantage. If you do the fragmentation of import/export segment will be deleted (it is good), that once we offer the downtime and run two tasks (1.upgrade 2) Fragmentation), but you will need to spend time to complete the upgrade of database.

    You may need to consider your database size and the total downtime you get?

    We will be able to parallelize export and import and finish faster. example, you can split the table export and import / diagram of first level (if you have a PK/FK relationship you need to retain the same).

    Here are the questions in my mind.

    (1) 9i database runs in Server A, you want to upgrade this database on the same server? If so have you checked OS and RDBMS software certification?

    (2) If you want to be updated on the same server by using export / import, then you have enough space to create the new database and to import?

    (3) If you perform import on 11 g that is created on the same server (SERVER A), then you have RAM / CPU to speed up the process?

    (4) you can consider database upgrade (on the same server) using the manual upgrade or DBUA, which has no more than space and your upgrade will of--> current in 9.2.0.8 to 11.2.0.4 version

    (5) manual / DBUA may take time depends on component installed in this database and the invalid invalid objects (if you have very less upgrade then total until 11.2.0.4 can take 2 hours max).

    If you think that you must upgrade the database to the new server, then you may need to review below.

    (a) how the data will be moved to the new server? is where your network speed is good?

    (b) will pass it data before the upgrade? OR after the upgrade to upgrade?

    (c) you can generate waiting for the current version--> that will move data before the end of the upgrade, if once graceful failover you can upgrade of database using DBUA / manual (described in point 5)

    (c) If you want to move the database after upgrade--> you can upgrade the database and build the day before for this in the new database on the new server (this may not be a good option)

    (d) If you want to move database during the upgrade--> you can export and import (this also takes time and your networks in question).

    In my opinion, export and import in a good option if you are very good to have the right amount of downtime and if you want to achieve upgrade and fragmentation at the same time.

    Post your question if you have

    Thank you

  • How to activate the database from Enterprise Manager Grid 12 c EBS 12.2.5

    Hello

    I have a question how do I activate the enterprise Grid Control on the 12 c database manager.

    Now, I was demanding to activate the database of EM 12 c on EBS 12.2.5 grid control. Already tried to emca, but showed nothing to configure?

    Please help me how to activate this feature?

    Thank you

    Andreas Kuncoro

    Hi Christophe,

    Thanks for your info. I already activate.

    Thank you.

    for retail, the step:

    Enable Enterprise Manager on Oracle E-Business Suite with database 12.1.0.2

    Concern about the listener and the database only.

    1. check the listener

    $ cd $ORACLE_HOME/network/admin/VIS2_miiexa01 /.

    $ more tnsnames.ora

    ###############################################################

    #

    # Do not change the settings in this file manually. They are managed

    # automatically and will be overwritten when executing automatic configuration.

    # For more information about automatic configuration, see the Oracle

    # E Business Suite Installation Guide.

    #

    $Header #: NetServiceHandler.java 120.28.12020000.6 2014-05-14 07:55:23 mmanku ship $

    #

    ###############################################################

    VIS2 =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = tcp (PORT = 1529))(HOST=miiexa01.vision.co.id))

    (CONNECT_DATA =

    (SERVICE_NAME = VIS2)

    (INSTANCE_NAME = VIS2)

    )

    )

    VIS2_FO =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = tcp (PORT = 1529))(HOST=miiexa01.vision.co.id))

    (CONNECT_DATA =

    (SERVICE_NAME = VIS2)

    (INSTANCE_NAME = VIS2)

    )

    )

    VIS2_LOCAL =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = tcp (PORT = 1529))(HOST=miiexa01.vision.co.id))

    )

    VIS2_BALANCE =

    (DESCRIPTION =

    (ADDRESS_LIST =

    (LOAD_BALANCE = YES)

    (FAILOVER = YES)

    (ADDRESS = (PROTOCOL = tcp (PORT = 1529))(HOST=miiexa01.vision.co.id))

    )

    (CONNECT_DATA =

    (SERVICE_NAME = VIS2)

    )

    )

    VIS2_REMOTE =

    (DESCRIPTION =

    (ADDRESS_LIST =

    (ADDRESS = (PROTOCOL = tcp (PORT = 1529))(HOST=miiexa01.vision.co.id))

    )

    )

    VIS2XDB =

    (DESCRIPTION =

    (ADDRESS =

    (PROTOCOL = tcp)

    (HOST = miiexa01.vision.co.id)

    (PORT = 1529)

    )

    (CONNECT_DATA =

    (SERVICE_NAME = orcl12XDB)

    )

    )

    extproc_connection_data =

    (DESCRIPTION =

    (ADDRESS_LIST =

    (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROCVIS2))

    )

    (CONNECT_DATA =

    (SID = PLSExtProc)

    (PRESENTATION = RO)

    ) )

    IFile=/Home/VIS2/12.1.0/Network/admin/VIS2_miiexa01/VIS2_miiexa01_ifile.ora

    2. check the database

    $ sqlplus / as sysdba

    check port https already set to EM

    SQL > SELECT 'https://'|| SYS_CONTEXT ('USERENV', 'SERVER_HOST') |'. ' || SYS_CONTEXT ('USERENV', 'DB_DOMAIN') |': ' | dbms_xdb_config.gethttpsport () | "/em/' double.

    SQL > SELECT 'https://'|| SYS_CONTEXT ('USERENV', 'SERVER_HOST') |': ' | dbms_xdb_config.gethttpsport () | "/em/' double.

    using the https protocol to open a session on EM

    SQL > exec dbms_xdb_config.sethttpsport (5500);

    Changeinit .ora

    $ viinit .ora

    Add the new line oninit .ora

    Dispatchers = "(Protocol=TCP) (SERVICE =XDB)" "

    Restart the database for changes in the init.ora file take effect.

    SQL > show the extreme setting

    VALUE OF TYPE NAME

    ------------------------------------ ----------- ------------------------------

    chain of dispatchers (PROTOCOL = TCP)(SERVICE=VIS2XDB)

    whole MAX_DISPATCHERS

    SQL > exit

    Thank you

    Andreas Kuncoro

  • Migrate the database from SE to EE

    Hi guys!

    Could you please is it possible to pass Oracle Standard edition 11.2.0.1 a Enterprise edition 11.2.0.3database? I've found so far only how to migrate the same versions but I am interested in how to handle this when a version lower than EA.

    Thank you

    MetaLink Doc ID 117048.1

    google = https://www.google.az/search?q=Migrate+database+from+SE+to+EE&oq=Migrate+database+from+SE+to+EE&aqs=chrome..69i57j69i61.627j0j7&sourceid=chrome&espv=210&es_sm=93&ie=UTF-8#es_sm=93&espv=210&q=oracle+Upgrade+database+from+SE+to+EE

    No problem)))

    Going from Standard edition to Enterprise edition

    If you use the Oracle database Standard edition and want to upgrade to the Enterprise Edition, then proceed as follows:

    1. Make sure that the version number of your Standard Edition Server software is the same version as the Enterprise Edition Server software. For example, if your Standard Edition Server software is version 10.2.0 then you should go to release Enterprise Edition 10.2.0.
    2. Stop your database.
    3. If your operating system is Windows, then stop all services Oracle, including the OracleService SID Oracle service, where SID is the name of the instance.
    4. Uninstall the Server Standard Edition software.
    5. Install the software from the Enterprise Edition Server using the Oracle Universal Installer.Select the same Oracle home that has been used for the uninstalled Standard edition. When installing, be sure to select the Enterprise edition. When you are prompted, choose software only in the database Configuration screen.
    6. Start up of your database.

    Your database is now upgraded to the Enterprise edition.

    ----

    Ramin Hashimzade

  • Create the database from the backup file

    Hello

    Is it possible to create server Oracle 9i on another server just by using the production DB backup file?

    Thanks in advance

    user4426754 wrote:
    Thanks for your reply, yet one thing I want to know, if disaster, where I lost all database and now I only backup DB file, I can still create new database using this backupfile using duplicate?

    My friend, take the time and read the link that I gave to you, which you seem to have not checked so far. If you have a good backup, you're good to go.

    HTH
    Aman...

  • is it possible to return a figure to the database from a web service

    I have a REST web services configuration that has 4 values

    Is it possible to use a db call to enter these 4 values that can be used in an insert in the database?

    Thank you

    Yes it is available: [url http://docs.oracle.com/cd/B19306_01/appdev.102/b14258/t_dburi.htm#i1007928] 10.2 documentation packages and Types.

    You must copy my blog instead: my answer was typo with a T too much ;-)

    Edit: Fixed the URL

    Published by: Kim Berg Hansen on October 19, 2012 10:00

  • Creating a database from backups of the production test

    Hello Experts,

    I'm a newbie with a lot new in Oracle. I got the backup inc0 (which includes even backup controlfile) (PROD) production base taken by RMAN and asked to create a new test database (TEST) by using the backup. Can someone please give me the steps on how to restore and create the new database?

    The 10.2.0.4 basic version
    I am aware of the concept of duplicated with RMAN database, but I was asked to do not connect to the target (PROD) database while duplicating. So, I need to create the test database using the prod database backup without being connected to the PROD database. Please guide me.

    Refer
    http://arjudba.blogspot.in/2008/05/restore-and-recover-database-to-new.html
    RMAN restore database from another backup of the different database name

    When you perform a restore using backup of the production database, the db_name would be same on the auxiliary database. Once you restore and recover the database in your test server, you can change the prod db_name to test by recreating the controlfile

Maybe you are looking for

  • Red brand and burning sensation on the wrist band sport - Apple Watch

    After all 3-4 months to have Apple Watch and wear while exercising, I have developed a small red mark and burning inside the wrist. Anyone with problems and tips on how to combat this similar problem. Do not wear the watch is not an option for me.

  • Restore backup possible without upgrade?

    So, there's the simple question to which I was not able to find an unequivocal answer: Can I restore my iPhone without having to upgrade to the latest IOS? It seems that when restoring the iphone tent/applications updated. I don't know if you can can

  • Reformat my laptop to its original factory State

    Product: Pavilion DV6-1220TX Operating system: Windows Vista - Home Premium (32 bit) Hello Above are the details of my laptop, and I would like to know the steps to format my computer laptop, as shown in the topic above. I enter the Manager recovery

  • HP Officejet J6480: HP Officejet J6480

    I have an Acer aspire computer laptop, Windows 8 V and HP Officejet J6480 all in one. I downloaded the drivers but I can't find an option that allows me to scan mulltiple pages in a single file. Unfortunately, my driver wants to continue so I can't f

  • Fatal blue screen need help

    Hello to the members of my community, I was literately at my wits end with this problem without fatal end of the SCREEN as well as ongoing nightmares with crashing, missing files, spyware and the inability to run a boot image and own factory installa