check for the delete operation

Hi all

I'm a deletion of a table. How can I check if the removal of deleted rows?

Thanks in advance
BN

I'm guessing that you want to check SQL ROWCOUNT % immediately after the DELETE statement (if you are not in a PL/SQL block when you issue DELETE it, your API client probably has a different appeal for this information).

BEGIN
  DELETE FROM some_table
   WHERE some_column = some_value;

  IF( SQL%ROWCOUNT = 0 )
  THEN
    dbms_output.put_line( 'No rows were deleted' );
  ELSE
    dbms_output.put_line( 'We deleted some rows' );
  END IF;
END;

Justin

Tags: Database

Similar Questions

  • An error occurred when querying for the pending operations

    Original title: sysprep problem
    I have an acer aspire 5738Z, I use windows 7 (64 bit) I try to open sysprep.exe and it does not open, a text box appears saying "an error occurred when querying for the pending operations. What can I do to fix this?

    Hello

    Thanks for posting the request in the Microsoft community forums.
    I understand that you receive the error "an error has occurred when querying for outstanding operations" when trying to open sysprep.exe on the computer.

    You can try the solutions provide and check if it helps solve the issue.

    Method 1:
    You can scan System File Checker to fix corrupted files.
    How to use the System File Checker tool to fix the system files missing or corrupted on Windows Vista or Windows 7
    http://support.Microsoft.com/kb/929833

    Method 2:
    If the steps above fail then you can try the steps and check.

    a. run regedit by typing regedit in start search by pressing ENTER.
    b navigate to the following key:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control
    Key: RegistrySizeLimit
    Type: REG_DWORD
    Value: 0xffffff (4294967295)
    c. reset.

    If you need help with Windows, keep us informed. We will be happy to help you.

  • Windows cannot check for the error code 80070424 updates.

    I have windows vista premium x 64
    Windows Update stopped working and when I they do it manually it says windows cannot check for the error code 80070424 updates.
    I searched everywhere for an answer... Please help

    ----

  • Types of bad operand for the binary operator '! =' error

    Hello

    I get the following compilation error:

    types of bad operand for the binary operator '! =';  Firstly, type: oracle.jbo.domain.Date;  Second: null type >

    When I try to compare a Date with null object, for example:

        public static Calendar jboDateToCalendar(Date d) {
            if (d != null && d.getValue() != null) {
                Calendar c = Calendar.getInstance();
                c.setTime(d.getValue());
                return c;
            }
            return null;
        }
    

    I use JDev 12.1.3. running with Java 1.7.0_75.

    Does anyone have an idea? Ever seen this error before.

    Media do not help btw.

    Thank you

    Johannes

    I found the solution. I used only the 'Oracle BC4J areas' library to import the Houston to date data types.

    After adding "Oracle JDBC" such as the library, the errors disappeared.

  • InDesign doesn't let me place an eps file... gives an error "cannot place this file. No filter for the requested operation. »

    InDesign doesn't let me place an eps file... gives an error "cannot place this file. No filter for the requested operation. »

    This happens with a particular .eps file or many .eps files?

    • The EPS files from Illustrator? What parameters are used when files are saved?
    • Also this happens for all files created in Illustrator EPS (even one you create brand new, with just a few text and simple work in it).
    • Where are stored the EPS files that you place in InDesign?  If there is a form of corruption of files on the hard drive? (Maybe need repair file permissions?).
    • If you work on a network: can the files when they are saved as EPS files on your hard drive?

    CARI

  • Parallel logic LSI, LSI logic SAS, parallel Buslogic (not recommended for the guest operating system), vmware paravirtual

    Infrastructure:

    vSphere

    ESX 4

    Reference Dell R710 Server

    I install WIN 2003 x 64 as a virtual server on ESX 4, when I select LSI logic SAS & LSI logic parallel it does not detect the hard drive, do I need driver if so where can I download?

    For parallel bus logic (not recommended for the guest operating system) & Vmware paravirtual, do I have to select this option for my win 2003 R2 x 64 edition?

    Please help on this issue.

    ~ Rashid

    If you really want to use it for installation, you will need to extract the driver from the VMware Tools ISO and add it to a disk image.

    Dave

    VMware communities user moderator

    New book in town - Start Guide quick vSphere -http://www.yellow-bricks.com/2009/08/12/new-book-in-town-vsphere-quick-start-guide/.

    You have a system or a PCI with VMDirectPath?  Submit your specifications to the unofficial VMDirectPath HCL - http://www.vm-help.com/forum/viewforum.php?f=21.

  • Privileges of connection Page error - insufficient apps for the current operation

    Hi gurus,

    We migrated application of HP-UNIX SUN Solaris with 11.5.10.2 node and 10.2.04 database. When I try to connect as a sysadmin, got the error that you have sufficient privileges for the current operation.

    But I can't able to go with forms URL and it works. I don't see any errors on the EEA with the exception
    Fatal error in the analysis of the recording file in jserv.log device.

    Any help is appreciated.

    Thank you.

    I got the invalid objects in the APPS schema

    Could you please list these objects? At least those that begin with FND and AD %

    Thank you
    Hussein

  • How to check for the two first digits?

    Can someone please... There is demand to have a hidden field on the form that will be filled with data. It's going to be 6 digits long and could start with 02 or 04. I need to check on the DocReady event, for the first two digits. If the first two digits are 02, the presentation of the form will remain as it is. If the first two numbers are 04, I'll have to show two hidden subforms. Can someone please provide an explanation on how to check for the first two digits of field 6 digits and do some actions.

    Thank you very much

    No, only in the event: Exchange.

  • How to get a list for the IN operator in a variable

    I have a procedure that receives for one of its variables (var1) IN a list of strings comma-delimited. I output the value of var1 in one file so I know that he receives the full as string...

    "'700 calls numbers', ' 800 numbers calls, 900 number calls, ' Customer Service calls","Directory Assistance","emergency/911 calls","international calls","calls Standard,"voicemail ".

    "When you manually type a request to aid 'IN ('700 calls numbers', ' 800 calls numbers... ("Standard phone calls", "Voicemail") "the query returns three rows.

    When the procedure is a statement Select using 'IN (var1)' no row is returned. How can I make the list comma noted for the IN operator within a single variable?

    This depends on your version.

    http://tkyte.blogspot.com/2006/06/varying-in-lists.html

    Describes some methods.

  • Auditing of database to save the DELETE operation on a schema for all tables.

    Hello
    I'm using ORACLE DATABASE 11 g. I want to apply the AUDITING feature to save all DELETE operations happening on the tables in the schema.

    I did the following steps but dint got the correct output: -.

    I logged in the SYS as sysdba user and together
     alter system set audit_trail=DB,EXTENDED scope=spfile;
    then I ran this command to save the sql code that will use the privileges of DELETION
    AUDIT DELETE ANY TABLE;
    Then I bounced my DB and intended to test I created a table in the SCOTT schema and inserted 10 lines in there and then DELETE all the rows in it.

    According to the expectations, I check the view
    select * from aud$
    where spare1 like '%MACHINE1%'
    and USERID='SCOTT'
    order by ntimestamp#;
    The output I got is: -.
    34     168368     1     1          SCOTT     I-DOMAIN\MACHINE1     MACHINE1     100     0                                                                      Authenticated by: DATABASE; Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=2565))          MACHINE1                    5          21-DEC-11 07.02.58.621000 AM               0     928:5024     0000000000000000               983697018     <CLOB>     <CLOB>     
    But here I don't see the SQL that is generated in the last column.
    What I expected, it's that if I shoot a DELETE statement in the schema, it will get connected here and with the help of this point of view, I want to be able to see that what user of which machine run a DELETE statement and that the statement was?

    Please let me know what that step i have missed here.

    PS: - Watch the ACTION # 100 column, this is the DELETE action code. I have also consulted the view DBA_AUDIT_TRAIL but din't find any useful info their.

    Thanks in advance.

    Try instead:

    audit delete table;
    

    DELETE ENTIRE TABLE audit is audit use of the DELETE ANY TABLE privileges.

  • I am trying to upgrademy vista for the next operating system or even 10 if possible and I can only do what I need help please

    I'm trying to upgrade my vista to the next operating system or even 10 if possible and I can do what I need help please

    Hello

    There is no free upgrade Vista to 7, 8.1, or 10.

    Follow these steps before you buy Windows 7.

    Microsoft sells more than 7; Try Amazon.com.

    Go to your computer / computer laptop manufacturer Web site and see if Windows 7 drivers are available for your make and model computer / laptop.

    If this is not available, Windows 7 will not properly work for you.

    Run the "Windows 7 Upgrade Advisor.

    http://www.Microsoft.com/en-US/Download/details.aspx?ID=20

    Check if your specifications are compatible for Windows 7:

    "Windows 7 system requirements"

    http://Windows.Microsoft.com/en-us/Windows7/products/system-requirements

    "Windows 7 Compatibility Center" for software and hardware:

    http://www.Microsoft.com/Windows/compatibility/Windows-7/en-us/default.aspx

    Windows 7 upgrade paths:

    http://TechNet.Microsoft.com/en-us/library/dd772579 (v = ws.10) .aspx

    «Installation and reinstallation of Windows 7»

    http://Windows.Microsoft.com/en-us/Windows7/installing-and-reinstalling-Windows-7

    @@@@@@@@@@@@@@@@@@@@@@@@

    Follow these steps before buy you and upgrade (new installation) of Windows 8.1.

    Check if the manufacturer of your computer/laptop has Windows 8.1 drivers available for your model.

    If this is not available, Windows 8.1 not install and work properly for you.

    There is a lot of information in this first link from Microsoft:

    Download and run the Windows Upgrade Assistant 8.1 of to see if your machine is compatible Windows 8.1 and read the update for Windows 8.1: FAQ here

    "Update to Windows 8.1: FAQ".

    http://Windows.Microsoft.com/en-us/Windows-8/upgrade-to-Windows-8

    "8.1 for Windows system requirements.

    http://Windows.Microsoft.com/en-us/Windows-8/system-requirements

    @@@@@@@@@@@@@@@@@@@@@@@

    How to buy Windows 10:

    http://www.microsoftstore.com/store/msusa/en_US/cat/Windows/CategoryID.70036700

    But first make sure that you have the correct configuration and your computer manufacturer provides the right drivers for 10.

    https://www.Microsoft.com/en-us/Windows/Windows-10-specifications#sysreqs

    " System requirements Windows 10"

    https://www.Thurrott.com/Windows/Windows-10/3884/Windows-10-system-requirements

    Microsoft deploys Windows 10 available as free upgrade to Windows 7 features, Windows and Windows Phone 8.1 8.1 qualified. It will be available from July 29, 2015

    "FAQ Windows 10.

    http://www.Microsoft.com/en-us/Windows/Windows-10-FAQ

    See you soon.

  • My backup archivelog never becomes obsolete for the deletion

    Hello

    I am running version 11.1.0.7.0 and backup using rman and tivoli backup as media management layer.

    I make daily backups for a week, weekly full backups for a month, complete monthly full backups kept for one year and annual full backups kept for 7 years.

    My general retention policy is 30 days:

    RMAN > show all.

    using the control file of the target instead of recovery catalog database
    RMAN settings for database with db_unique_name PRODPRIM are:
    CONFIGURE RETENTION POLICY to the WINDOW of RECOVERY OF 30 DAYS; *
    CONFIGURE BACKUP OPTIMIZATION
    SET UP DEFAULT DISK DEVICE TYPE;
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO "%F" # by default
    SET UP THE DEVICE TYPE DISK PARALLELISM 8 TYPE OF BACKUP TO COMPRESSED BACKUPSET;
    CONFIGURE BACKUP OF DATA TO DISK FILE TYPE DEVICE TO 1;
    CONFIGURE BACKUP ARCHIVELOG FOR DEVICE TYPE DISK TO 1; # by default
    CONFIGURE MAXSETSIZE TO UNLIMITED;
    CONFIGURE ENCRYPTION OF DATABASE # by default
    CONFIGURE THE ENCRYPTION ALGORITHM "AES128"; # by default
    CONFIGURE COMPRESSION ALGORITHM 'BZIP2 '; # by default
    CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON ALL STANDBY;
    CONFIGURE SNAPSHOT CONTROLFILE NAME TO ' / oracle/PROD/db/tech_st/11.1.0/dbs/snapcf_PROD_PRIM.f';


    The daily backup script is as below:

    RMAN > print script prod_daily;

    printing stored script: prod_daily
    +{+
    allocate channel t1 type 'sbt_tape' parms 'ENV=(TDPO_usrFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.usr) ';
    allocate channel t2 type 'sbt_tape' parms 'ENV=(TDPO_usrFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.usr) ';
    allocate channel t3 type 'sbt_tape' parms 'ENV=(TDPO_usrFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.usr) ';
    format "prod_dailybackup_ % d_ % s_ %t" Dungeon of the database backup to the time = ' sysdate 7' newspapers. +
    backup format 'prodarchbackup_ % d_ % s_ %t' archivelog all not saved 1 time;
    cross-checking of backup;
    overlap archivelog all;
    delete noprompt obsolete;
    delete expired backup noprompt.
    delete noprompt expired archivelog all;
    outline report;
    output channel t1;
    output channel t2;
    output channel t3;
    +}+

    This line: backup format + database "prod_dailybackup_ % d_ % s_ %t" keep until time = 'sysdate-7'-newspapers; I don't expect the archivelogs compulsory to recover from that backup backups will be kept and will expire when this backup expires.

    But when I list backup of archivelogs, I find archivelogs backups that were taken as early as next January, and the archivelog backups never get deleted or obsolete:

    RMAN >

    List of backup sets
    +===================+


    Time of accomplishment time BS key size Device Type
    ------- ---------- ----------- ------------ ---------------
    + 9485 M 326.00 SBT_TAPE 00:00:10: 28 - JAN-11 +.
    BP key: 9758 situation: AVAILABLE Tablet: NO Tag: TAG20110128T201149
    Handle: prodarchbackup_PROD_927_741643910 Media:

    List of newspapers archived in defined backup 9485
    The next time that THRD Seq YVERT low low time next YVERT
    ---- ------- ---------- --------- ---------- ---------
    4266 + 1 220134037 28 JANUARY 11 220161176 28 - JAN-11 +.
    + 1 4267 220161176 28 JANUARY 11 220184892 28 - JAN-11 +.
    4268 + 1 220184892 28 JANUARY 11 220218518 28 - JAN-11 +.
    + 1 4269 220218518 28 JANUARY 11 220230438 28 - JAN-11 +.
    + 1 4270 220230438 28 JANUARY 11 220273374 28 - JAN-11 +.
    4271 + 1 220273374 28 JANUARY 11 220278622 28 - JAN-11 +.
    4272 + 1 220278622 28 JANUARY 11 220282989 28 - JAN-11 +.
    4273 + 1 220282989 28 JANUARY 11 220285629 28 - JAN-11 +.
    + 1 4274 220285629 28 JANUARY 11 220287861 28 - JAN-11 +.
    + 1 4275 220287861 28 JANUARY 11 220290432 28 - JAN-11 +.
    4276 + 1 220290432 28 JANUARY 11 220293038 28 - JAN-11 +.
    + 1 4277 220293038 28 JANUARY 11 220295570 28 - JAN-11 +.
    4278 + 1 220295570 28 JANUARY 11 220302972 28 - JAN-11 +.

    Time of accomplishment time BS key size Device Type
    ------- ---------- ----------- ------------ ---------------
    + 9486 435,25 M SBT_TAPE 00:00:13: 28 - JAN-11 +.
    BP key: 9759 situation: AVAILABLE Tablet: NO Tag: TAG20110128T201149
    Handle: prodarchbackup_PROD_925_741643910 Media:

    List of newspapers archived in defined backup 9486
    The next time that THRD Seq YVERT low low time next YVERT
    + 'archivelog.log' [read-only] 11993 lines, characters 647140 +.


    Time of accomplishment time BS key size Device Type
    ------- ---------- ----------- ------------ ---------------
    + 9486 435,25 M SBT_TAPE 00:00:13: 28 - JAN-11 +.
    BP key: 9759 situation: AVAILABLE Tablet: NO Tag: TAG20110128T201149
    Handle: prodarchbackup_PROD_925_741643910 Media:

    List of newspapers archived in defined backup 9486
    The next time that THRD Seq YVERT low low time next YVERT
    ---- ------- ---------- --------- ---------- ---------
    + 1 4254 219859033 28 JANUARY 11 219894422 28 - JAN-11 +.
    + 1 4255 219894422 28 JANUARY 11 219919680 28 - JAN-11 +.
    + 1 4256 219919680 28 JANUARY 11 219942950 28 - JAN-11 +.
    4257 + 1 219942950 28 JANUARY 11 219967656 28 - JAN-11 +.
    4258 + 1 219967656 28 JANUARY 11 219976051 28 - JAN-11 +.
    4259 + 1 219976051 28 JANUARY 11 219987397 28 - JAN-11 +.
    + 1 4260 219987397 28 JANUARY 11 220006347 28 - JAN-11 +.
    + 1 4261 220006347 28 JANUARY 11 220025985 28 - JAN-11 +.
    4262 + 1 220025985 28 JANUARY 11 220047061 28 - JAN-11 +.
    4263 + 1 220047061 28 JANUARY 11 220074802 28 - JAN-11 +.
    + 1 4264 220074802 28 JANUARY 11 220102835 28 - JAN-11 +.
    + 1 4265 220102835 28 JANUARY 11 220134037 28 - JAN-11 +.

    Time of accomplishment time BS key size Device Type
    ------- ---------- ----------- ------------ ---------------
    + 9487 427,25 SBT_TAPE 00:00:14 M 28 - JAN-11 +.
    BP key: 9760 situation: AVAILABLE Tablet: NO Tag: TAG20110128T201149
    Handle: prodarchbackup_PROD_926_741643910 Media:

    List of newspapers archived in defined backup 9487
    The next time that THRD Seq YVERT low low time next YVERT
    ---- ------- ---------- --------- ---------- ---------
    + 1 4231 218972478 28 JANUARY 11 218974637 28 - JAN-11 +.
    + 1 4232 218974637 28 JANUARY 11 218976683 28 - JAN-11 +.
    + 1 4233 218976683 28 JANUARY 11 218979456 28 - JAN-11 +.
    4234 + 1 218979456 28 JANUARY 11 218981788 28 - JAN-11 +.
    + 1 4235 218981788 28 JANUARY 11 218984100 28 - JAN-11 +.
    4236 + 1 218984100 28 JANUARY 11 218986873 28 - JAN-11 +.
    + 1 4237 218986873 28 JANUARY 11 218990404 28 - JAN-11 +.
    + 1 4238 218990404 28 JANUARY 11 218993848 28 - JAN-11 +.
    + 1 4239 218993848 28 JANUARY 11 218998167 28 - JAN-11 +.
    ---------------------------------------------------------------------------------------------


    My question is, when these archivelog backups become obsolete and are deleted?

    Dula

    Published by: user13005731 on May 19, 2011 10:10

    Published by: user13005731 on May 19, 2011 10:11

    10.2, you have to specify NEWSPAPERS.

    10.2 documentation:
    http://download.Oracle.com/docs/CD/B19306_01/backup.102/b14194/rcmsynta035.htm#sthref554

    However, 11.1 and above, it is NOT necessary and, I would say, must not be specified.
    11.1 documentation:
    http://download.Oracle.com/docs/CD/B28359_01/backup.111/b28273/rcmsubcl011.htm#i97063
    «+ An archive backup is autonomous because is contains all the files needed to restore the backup and recover in a consistent state.» "If the database is open during backup, then RMAN automatically generates and saves them archived redo logs necessary for the protection of the compatible database.

    and
    http://download.Oracle.com/docs/CD/B28359_01/backup.111/b28270/wnbradv.htm#sthref6
    "+ Long term + improved backup management.
    + You can create a backup archiving or long-term with the BACKUP... "KEEP that keeps only the required log files archived to make consistent backup.

    and
    http://download.Oracle.com/docs/CD/B28359_01/backup.111/b28270/rcmbckba.htm#CHDHAFHJ
    "+ When you specify the DUNGEON on the BACKUP command, RMAN generates multiple backup sets. ...... It automatically generates a recovery archived log backup to ensure that the backup of the database can be recovered to a consistent state. »

    You could log a SR with support of Oracle to confirm if you need the key word "LOGS" in the BACKUP... KEEP and to identify the behavior if you happen to keep this in your backup command.

    In my humble OPINION, not be specify the LOGS of the BACKUP... KEEP.
    You could test this in a test environment by doing a BACKUP... MAINTAIN a database that has a very small WINDOW of RETENTION.

    Hemant K Collette
    http://hemantoracledba.blogspot.com

    Published by: Hemant K grapple on May 20, 2011 15:21
    Quotations in italics of the documentation.

  • Check for the presence of malware

    How can I check for viruses/malware on my iMac with OS X El Capitan

    Go to http://www.etresoft.com/etrecheck , download and run EtreCheck, copy paste here the status report.  If there is any malware/adware on your system, it will appear, and then we'll tell you how to dispose of it here.

  • Additional printer drivers for the latest operating systems?

    Hello, I have a computer running Windows XP Professional with a HP Deskjet D4200 printer. I have guests who often connect to the network using their own computers. Unfortunately, often the printer share fails because they use Windows 7 or Windows Vista. When I try to add printers for these operating systems, I do not see an option. The box options is by clicking on start > printers and faxes, right click on the shared printer, click Sharing, and click additional drivers.

    1. download the files from one day to the next and save them to a USB key that you can give to your guests.

    2. take HP on their offer to sell you a CD with the driver.  If order Vista and Windows 7 and if you call rather than ordering it on the Internet, maybe you can get them to give you a break on the shipping.

    3 Variant 1: go to your local public library where there is a high speed Internet connection and download the drivers there and the record to a thumb drive.  If you do not have a library with free Internet access, you may be able to find an Internet café or FedEx/Kinko's or similar.  Even if you pay for the time, it would probably be cheaper than the CD from HP.  There are some shops with free wifi (e.g., Starbucks, Panera Bread), but you must have your own laptop.

  • I also get the error code 80070005 when you try to use Windows Update to check for the updates

    I get this error code as soon as I try to check updates. It does not even say there are updates tells me to enable updates, but when I try it gives the code. I used Microsoft Fix and now it says everything is fixed and ok but it is not. So now what?

    Hello

    1. what Microsoft fixit did you run?
    2. don't you make changes to the computer before the show?

    I suggest you try the steps from the following link:

    Error: 0x80070005 when you try to install updates by using Microsoft Update or Windows Update
    http://support.Microsoft.com/kb/968003

    Note: When you perform a virus scan Malware, you will lose data that are affected by the virus. Microsoft is not responsible for the loss of this data.

Maybe you are looking for