PL/SQL procedure for database activity monitoring

Can anyone help me in writing a procedure which will help me in monitoring the database, i.e. if anybody changes something inside a table say add, update or delete then this procedure will tell me about every operation on that table??

This has nothing to do with forms whatsoever, and also is already invented. Search the documentation for "audit" or take a look at this: http://www.oracle-base.com/articles/10g/auditing-10gr2.php
cheers

Similar Messages

  • Need to wite pl sql procedure for dynamic select statement

    Need pl sql procedure for a Dynamic select statement which will drop tables older than 45 days
    select 'Drop table'||' ' ||STG_TBL_NAME||'_DTL_STG;' from IG_SESSION_LOG where substr(DTTM_STAMP, 1, 9) < current_date - 45 and INTF_STATUS=0 order by DTTM_STAMP desc;

    I used this to subtract any data older than 2 years, adjustments can be made so that it fits for forty five days, you can see how I changed it from the originaln dd-mon-yyyy to a "monyy", this way it doesn't become confused with the Static data in the in Oracle, and call back to the previous year when unnecessary:
    TO_NUMBER(TO_CHAR(A.MV_DATE,'YYMM')) >= TO_NUMBER(TO_CHAR(SYSDATE - 365, 'YYMM'))

  • Using cron-job to call the PL/SQL procedure for every 5 min

    Hi All,
    i wrote one procedure. using cron-job to call this PL/SQL procedure for every 5 min. i don't have any idea about cron job & what is thescript file formate .where can i place that script file. what are the details we placed in that script

    Really appreciate you. I like this approach .
    please give me advice for the below thing
    job_action =>an i give my procedure name under this?
    BEGIN
    -- Job defined entirely by the CREATE JOB procedure.
    DBMS_SCHEDULER.create_job (
    job_name => 'Job_schedule_update',
    job_type => 'PLSQL_BLOCK',
    job_action => 'BEGIN Schedule_update; END;',
    start_date => SYSTIMESTAMP,
    repeat_interval => 'FREQ=HOURLY;BYMINUTE=5',
    end_date => NULL,
    enabled => TRUE,
    comments => 'Job defined entirely by the CREATE JOB procedure.');
    END;

  • SQL Procedures for dimension maintenance?

    I can't seem to find any stored procedures for refreshing dimensions & measures in 10.2. Looking at version 10.1 of the OLAP reference lists procedures such as:
    execute dbms_awm.refresh_awdimension ('MYSCHEMA', 'MYAW', 'AW_PROD');Is there an equivalent in 10.2.0.3? The OLAP reference docs have changed quite significantly from 10.1 to 10.2, so I'd assume so too has the database and the methods it uses to refresh structure. Docs for 10.2 don't appear to mention refreshing structure anywhere.
    Can anyone point me in the right direction? We're essentially looking for the same functionality as is provided in AWM's Maintain Dimension/Measure wizards, only called from our own application.
    Thanks,
    Aaron

    Hi,
    Have you tried having AWM creating a maintenance script for you?
    In the end of the maintenance wizard theres an option for selecting "create to script" or something similar.
    This will generate an anonymous PL/SQL block you can put into whatever procedure or application you want as long as it can run PL/SQL.
    Ragnar

  • Need link for database performance monitoring tool

    Hi,
    Can anybody give link to a download free database performance monitoring tool.
    Thanks

    i am using oracle 10.1.0
    and any link which can told what thing need to check
    to make sure good performance.
    Thanks
    Message was edited by:
    Umesh Sharma

  • Pl/sql procedure for match-merge operator

    I have used the match-merge operator in OWB. I want to implement the same match-merge operation using a pl/sql procedure. Please help.

    Yes sure. Lets say, we have a table tab1, which has the following structure and data:
    First_name Last_name Address City
    JACK ANDREWS XYZ NY
    ANDREWS JACK NY
    Now, i want to write a procedure which matches and merges the above two records, into a single record.The matching is done with the help of the first_name and last_name columns.

  • Optimizing Pl/SQL procedure for fast execution

    Hi All,
    What are the tips that we must take care while writing pl/sql procedure or function, that it execute smoothly without any strains or resources.
    And if any of the procedure or function is not running fast enough is there any DBMS package or something like EXPLAIN PLAN to see the execution path used by optimizer or to analyze the code in that procedure or function to establish what causing the problem ?
    Any help will be highly appriciated.
    Thanking you and best regards.

    And if any of the procedure or function is not running fast enough is there any DBMS package or something like EXPLAIN PLAN to see the execution path used by optimizer or to analyze the code in that procedure or function to establish what causing the problem ?
    Yes it is. :)
    Read this:
    http://download-uk.oracle.com/docs/cd/B14117_01/server.101/b10752/toc.htm
    Peter D.

  • Problem calling PL/SQL procedures from Function Activity Issue

    Hi,
    I am working with Oracle Workflow and I have found some problems adding a function activity in the process diagram. This function only updates some registers on the data base, or at least it should do that.
    I have been looking through the items in this forum and I have found similar things but not the right one. Of course I am a learner in all this and maybe the answer in there.
    I will try to show you my problem:
    When the procedure is supposed to be called, it doesnt´t do that and instead I found the following error:
    Wf_Engine_Util.Function_Call(usuario.WF_FIN_TG.FINTG1, FLUJO1, 092S0087, 588782, RUN) ORA-01403: no data found
    I have tested all the queries from TOAD and SAL Server, and all of them return some results.
    I have tried to take out all the queries from the procedure as the following to try to avoid or change the error but it continues as "ORA-01403: no data found":
    PROCEDURE FINTG1(
    p_itemtype IN VARCHAR2,
    p_itemkey IN VARCHAR2,
    p_actid IN NUMBER,
    p_funcmode IN VARCHAR2,
    p_resultado IN OUT VARCHAR2
    ) IS
    flujo VARCHAR2(;
    p_resultado :=1;
    END FINTG1;
    It seems as the workflow engine try to search something before executing my procedure.
    Has anybody any idea about how to solve this problem? Thanks a lot.

    WF_ENGINE_UTIL.Function_Call is the lowest level procedure executed by the engine before it executes the procedure associated with the function activity. I am not sure if this procedure would throw ORA 1403 since this does not have a query or a collection.
    Please note that ORA 1403 could occur from a SQL query or a collection.
    Looking at your code, p_resultado :=1;
    The function activity should return a resultout that the workflow engine understands. The valid results from the function activities as per the workflow guide are,
    wf_engine.eng_completed - 'COMPLETE'; -- Normal completion
    wf_engine.eng_active - 'ACTIVE'; -- Activity running
    wf_engine.eng_waiting - 'WAITING'; -- Activity waiting to run
    wf_engine.eng_notified - 'NOTIFIED'; -- Notification open
    wf_engine.eng_suspended - 'SUSPEND'; -- Activity suspended
    wf_engine.eng_deferred - 'DEFERRED'; -- Activity deferred
    wf_engine.eng_error - 'ERROR'; -- Completed with error
    You would normally use COMPLETE or ERRORED within your activity. Please change your code to use a valid resultout and try again.
    Hope this helps.
    Thanks

  • It there a way to enable debugging to view SQL details for database adapter

    The adapter guide seems to allude to the possibility with the following statement:
    "To monitor performance, you can enable debug logging and then watch the SQL for various inputs."
    There is no information, however, to indicate how to enable this feature. It would be nice to be able to view details in domain.log.
    Thanks,
    RM

    The switch to tab feature is only available when you are typing in the Location (a.k.a. Awesome) bar. Clicking on a bookmark will always open the bookmarked page in either the current tab or a new tab.

  • Need PL/SQL procedure for file transfer local system to server location

    Hi Experts,
    The requirement is one file ex: text file,excel file is there in Local system suppose c:newfolder/test.txt.
    once run the concurrent program for this particular file in the local system should transfer into server location for the mentioned path.
    is it possible to do in PL/SQL or shell script.
    can you please share the code.
    Thanks
    Meher

    Meher Irk wrote:
    The requirement is one file ex: text file,excel file is there in Local system suppose c:newfolder/test.txt.
    once run the concurrent program for this particular file in the local system should transfer into server location for the mentioned path.Why do you want to copy a local file from the local client file system, via the Oracle database server, to a remote directory on the server?
    Why is the Oracle database server to be used? For what purpose?
    There are standard secure methods for a client to copy a file to a server. Such as sftp and scp. No complex Oracle database server layer needed in-between.
    So why do you want to use the Oracle database to act as the copy mechanism for you?
    It will only make sense if the local file is copied into the database (as a LOB or securefile) and managed by the database. I fail to see why Oracle should be acting as the go-between for the client file system copy process to the server file system. This introduces another moving part in the copy process. Adds more security issues. Adds more authentication issues. And what for?

  • PL/SQL procedure for deleting rows

    We have to delete rows from a table by initiating parallel processes depending on no of connections, and also variable commit frequency. The procedure has to start by itself in case of failure of 1 or more parallel processes, by identifying the position where it stopped. Please some one help me what would be th elogic needed to write the [rocedure.
    Thanks in Advance
    Edited by: 864979 on Jun 9, 2011 10:02 PM

    Be careful of how this is designed and coded. It is very easy to do it horribly wrong, causing contention and problems.
    Have a look at DBMS_PARALLE_EXECUTE.
    If the package is not available on your Oracle version, then look at {message:id=1534900} for a manual approach.

  • SQL Query for Database Connections

    What would be the proper syntax or DBA table to query and find out how many database connections there are currently? Thanks for all of your help!!
    Marlan

    select * from v$session;Some entries in this view are dynamic processes (type = 'BACKGROUND') and you may want to exclude those depending on your requirements.

  • SQL syntax for querying Active Directory group membership

    Post Author: cantrejj
    CA Forum: Data Connectivity and SQL
    I've established a connection to Active Directory through Crystal Reports XI. Now I need to write an SQL select statement to return all computer accounts and their group memberships. My statement returns all the computer accounts in the target OU, but when I add the memberOf field to my report everything goes blank. What am I doing wrong? I've included below my query statement and would welcome any suggestions...******************************************Select CN, memberOfFrom 'LDAP://OU=Managed Accounts, OU=Central Valley Service Area, DC= root, DC=sutterhealth, DC=org'where ObjectClass='computer'********************************************

    No ERRORs, no PANICs:
    # grep -i error /var/log/samba/log.smbd
    # grep -i panic /var/log/samba/log.smbd
    # grep -i error /var/log/samba/log.smbd.old
    # grep -i panic /var/log/samba/log.smbd.old
    #

  • Procedure for subcontracting activity in our premises by external agency

    Dear all,
    Please provide the process in SAP for the sub contracting activity getting completed in our premises itself by a outsourcing agency.
    Example:
    Our requirement is grinding of valve body.
    Instead of sending the valve body to sub contract vendor,the vendor is coming to our premises with his equipments like grinding machine & completing the grinding activity in our end.
    Regards
    Mahalingam Sarathi
    9962817120

    Hi,
    If it is a maintenance activity, then you can follow the route of PM wherein a maintenance order shall be created and the cost can be booked as expence or capitalized as the case may be.
    The equipments which the vendor brings in the premices shall be captured using Returnable Gate Passes.
    As for creation of PO is concerned, you can go either ways by service or by sub contracting, however since the valves are going for repair you can use refurbishment so that you can bring the valves in inventory, if you dont want to bring them in inventory then Account assigned PO in Ref to PM Order can be made.

  • Any 3rd party Database Activity Monitoring products that read Archive Logs?

    I've been doing lots of research to find auditing-related 3rd party software products that read Oracle's archive log files. Many products are available for 'log' monitoring for security etc., but so far I've not found any that read the actual archive log files themselves. LogMiner is useful, but need to know if other products exist.
    Any info is appreciated! Thanks.....

    Thanks for your reply, Satish

Maybe you are looking for