SSIS Auditing on Table

Hi 
I need to record insert & update changes made to a SQL 2005 table with no primary key, is this possible? The logging events in SSIS seem related purely to validation, execution and errors.
Thanks

you can use a LOOKUP transformation to separate records that are going to be INSERTED from the records that are going to be UPDATED.
after the lookup you would have a no-match output (you should configure that in the lookup) and a match output. after each output add a MULTICAST transformation. this transformation creates another copy of your data stream. pass one copy (one output) to
your logging table destination, and the other output of multicast to the your main destination (for insert) or to the other component (for update)
Consider that this method would add extra data in memory at the time of execution the package. so if you are dealing with large number of records, then you would face performance issues.
Regards,
Reza
SQL Server MVP
Blog:  
http://rad.pasfu.com  Twitter:
  LinkedIn:
SQL Server Integration Services 2012 Tutorial Videos:
http://www.radacad.com/CoursePlan.aspx?course=1

Similar Messages

  • Audit multiple tables using PLSQL

    Hi
    I need to audit multiple tables. I need to delete everything from 14 related tables and insert it into one denormalized audit table each time a service is not active anymore(when that field in inserted into the table).
    Do I need to have just one 'ON DELETE trigger' on the master table and it would insert everything from the master table and child tables into the audit table... do I need a 'where statement' in the trigger for inserting each child record?
    enclosing a part of code:
    CREATE OR REPLACE TRIGGER vbnsServiceAudit
    BEFORE DELETE ON mciw_vbns_service_t
    BEGIN
    INSERT INTO service_audit
    (service_id, Datetime, User, contract_term, contract_exp_date, pricing_plan_type, subscription_type)
    VALUES
    (service_audit.service_id, SYSDATE, USER, service_audit.contract_exp_date,
    service_audit.pricing_plan_type,
    service_audit.subscription_type);
    INSERT INTO service_audit
    (disconnect_req_date, disconnect_prov_date)
    VALUES
    (srvc_disconnect.disconnect_req_date,
    srvc_disconnect.disconnect_prov_date);
    END vbnsServiceAudit;
    Any help with the code will be much appreciated as I am new doing DBA stuff.
    Thanks
    null

    You can use JDBC from within the bean managed persistence EJB

  • Statement AUDIT SELECT TABLE also audits update, delete and inserts

    Hi,
    Database Oracle 11g.
    After turning on AUDIT with these 2 statements:
    SQL> ALTER SYSTEM SET audit_trail = "DB_EXTENDED" SCOPE=SPFILE;
    SQL> AUDIT SELECT TABLE BY ACCESS;
    then insert, update and delete statements are recorded in sys.aud$ as well as select statements.
    My expectation was to see only select statements in sys.aud$.
    Please clarify :-)
    Best regards
    Erik

    it should not record other action apart from select,can you crosscheck audit configuration by
    select * from DBA_OBJ_AUDIT_OPTS;
    SELECT * FROM ALL_DEF_AUDIT_OPTS;

  • Audit data Tables

    Hi All,
    Can you tell me the names of the table where Audit data is stored in Microsoft platform.
    I think there are two tables ie Audit Activity table and Audit data table .
    Thank you
    Kind Regards
    Abhinav Sona

    Hi Sona,
    these are the table names:
    AuditDtsLog
    AuditActivityDetail<Appset>
    AuditActivityDetail<Appset>Archive
    AuditActivityHdr<Appset>
    AuditActivityHdr<Appset>Archive
    for each application:
    AuditActivityDetail<Application>
    AuditActivityDetail<Application>Archive
    AuditActivityHdr<Application>
    AuditActivityHdr<Application>Archive
    AuditData<Application>
    AuditData<Application>Archive
    AuditDataTmp<Application>
    AuditHdr<Application>
    AuditHdr<Application>Archive
    Comment<Application>Archive
    Kind regards
    Roberto
    Edited by: Roberto Vidotti on Dec 13, 2011 10:34 AM

  • Fine grained auditing on table, but I don't want it on view

    I have a table which contains sensitive information, and I want to audit all queries on it except the web account 'EJBUSER', so I created the below policy:
    begin
    dbms_fga.add_policy( policy_name => 'STAFF_LOGON_QRY_POLICY'',
    object_schema => 'CPY',
    object_name => 'STAFF_LOGON',
    statement_types => 'SELECT',
    audit_condition => 'SYS_CONTEXT(''USERENV'',''SESSION_USER'') != ''EJBUSER'' ');
    end;
    This does exactly what I want, but I also have a view off this STAFF_LOGON table (below) which users can query to see their own details.
    create or replace view CPY.V_STAFF_LOGON
    as
    select * from cpy.staff_logon
    where user_name = user;
    When a user queries this view, it also writes an entry to the dba_fga_audit_trail, but I only want to see queries against the base table, not the view.
    Is it possible to fga audit the base table only, and not the view?
    Edited by: stuartu on Feb 17, 2010 11:36 AM
    Edited by: stuartu on Feb 17, 2010 12:01 PM

    But does this delete the whole account from the cloud, or just from my device. I must make sure my husband doesn't loose all his business contacts which are in the iCloud device. Thanks.

  • Setting up auditing for tables

    Hi Gurus,
    Could some one help me in setting up an auditing process for few tables on one of the schema say scott.
    auditing on insert,update,select and delete .
    I have 4 tables say for example
    emp, dept,org,ssn

    790072 wrote:
    Hi Gurus,
    Could some one help me in setting up an auditing process for few tables on one of the schema say scott.
    auditing on insert,update,select and delete .
    I have 4 tables say for example
    emp, dept,org,ssnwhen all else fails Read The Fine Manual
    http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/statements_4007.htm#i2059073
    why do you prefer to read answer here rather than from original source as URL above?

  • Audit Log - Table Log

    Hi everyone,
    Can anyone tell me if i activate table logging on a table (not customizing table) like MARC table, what information is saved in the system?.
    Can I check or know, previous the audit log activation over this table, what fields or what information is recorded?
    thanks,
    HEPC

    This is table logging for customizing type entries in not necessarily what you are looking for.
    For master data you need to use the application change documents (table CDHDR etc) which is a different concept (I would use that route and protect the object S_ARCHIVE).
    What you are actually looking for (and waiting for) is [the package concept at runtime|http://forums.sdn.sap.com/click.jspa?searchID=58483939&messageID=4675719] which developers can already see as warnings. It also means that the package which the table is assigned to must have a complete set of APIs.
    I would personally not look for workarounds with performance impacts, but rather clean up the code to make it package concept conform, and then use the application change documents and not the table change records.
    This is a better design - more sustainable, less hassles and auditable (via where-used-lists).
    My 2 cents,
    Julius

  • Ssis - Copy all tables exists in a DB to Destination flatfiles

    could anyone help me out with this task-
    Copy all tables exists in a DB to Destination flatfiles.
    Condition 1) Name of flat file should be name of the Table
                      ex-   Employee.Txt
                  2) Flat files should be created in run time and should not create prior.

    Hi nikhila.k,
    According to your description, you want to export data from multiple SQL tables to multiple text files, and the file name should be the name of the corresponding table name.
    To achieve this requirement, we can refer to the reply post by user756519 in the following similar thread:
    http://stackoverflow.com/questions/6216486/exporting-data-from-multiple-sql-tables-to-different-flat-files-using-ssis-script
    Please modify the first step with below:
    Create a table named TablesList with the code below in SQL Server Management Studio (Ps: we can also change the FilePath to other place you want to put those text files):
    USE database_name
    GO
    SELECT IDENTITY(INT,1,1) as Id, name as TableName,'C:\Temp\' + name + '.txt' as FilePath
    INTO TablesList FROM sys.Tables
    WHERE name <> 'TablesList'
    GO
    Then we can refer to the other steps in the reply.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • SSIS Excel Create Table

    I am using a Create Table script to add a worksheet to a excel destination in SSIS.  Everything works great except when I try to include a space in the "table name".  The space gets replace with an underscore.
    CREATE TABLE [Excel Destination] (
    [Col1] Varchar(15),
    [Col2] LongText,
    [Col3] Double
    The worksheet is named "Excel_Destination" and not "Excel Destination"
    Is there any way to work around this without using a script task?

    As far as I know there is no workaround for this nuance.
    Arthur My Blog

  • Change Control Wizard - Audit rule tables

    Hi All,
    New forum member here, and I have a question regarding the setup of audit rules using the Change Control Wizard in PCG. The first rule we are setting up is to track changes to supplier files, and when we generated the audit rule we were expecting the audit table to be LA_AC_APXVDMVD, but instead the table it created was SQLAP.AP_SUPPLIER_SITES_ALL. I am not sure why this occurred, but it appears that we may have configured the rule incorrectly. Any insight you can provide would be greatly appreciated.
    Thanks,
    Marc

    I am not sure what you want to do with the table name.
    However, just to answer the query the table is correct. Since you created the rule for the supplier master files it picked the underlying supplier table
    SQLAP.AP_SUPPLIER_SITES_ALL.

  • SSIS - Updating a table with a OLE DB Command

    I need to translate the next SQL Query in SSIS: (Each table belong to a different source - SQL Server & ORACLE)
    update A
    set
    A.col1 = B.col1
    A.col2 = B.col1
    from
    table A inner join table B B on A.col3 = B.Col3
    where
    A.col4 = value 1 and
    A.col5 = value2 and
    B.col4 = value 3;
    As you can see, source and destination corresponds to the same source: table A. This is the work flow I have created:
    After the conditional split I have used a Derived Column in order to copy the column B.Col1 to use it on the OLE DB Command to update
    the columns of table A After that, I have write the next piece of query in the OLE DB Command task:
    update Table A
    set
    col1 = ?
    col2 = ?where A.col4 = 5 and
    A.col5 = 5 andA.col3 = ? and -- for the join ? = 11;
    These are the values
    I used to prove the query:
    Clarifications: The code is just a schema, so I do not need correction about it, that is not my doubt (in case I have made a mistake).
    I was asked to make this translation without modifying the sql query.
    I can not create staging areas.
    If you need to know more to give help, please ask, but be polite.
    Regards

    Hi dj2907,
    According to your description, I create a sample package in my environment. Based on my test, I can upgrade the table A correctly.
    The following screenshots are for your references:
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Regarding ssis - Joining two tables

    I have 2 tables..
    CITY & SALES
    CITY SALES
    CID CNAME                        CID SALES
    1 Delhi                                 1 100
    2 Hyde                                  2 200
    OUTPUT
    CNAME SALES
    Delhi 100
    Hyde 200

    Hi,
      I need to get by using ssis
    There are multple ways
    1. Use a data Flow Task and inside it have two OLEDB Sources linking to two tables and then add a Merge Join transform joining the inputs. Inside Merge Join choose operation as INNER JOIN and then add the required columns in output (NAME,SALES). Also make
    sure you sort inputs by using ORDER BY in both select statements from source tables and set IsSorted property to true in input
    2. Using Lookup Task. Add a OLEDB Source connecting to first table CITY. Then add a lookup task to get data from SALES table and do join on CID field. The select required fields in  output (NAME,SALES) and link the Lookup Match output to your destination.
    3. Another MUCH SIMPLER method is to use a Execute SQL Task and use join statement as
    SELECT c.CName, s.Sales
    FROM City c
    INNER JOIN Sales s
    ON c.CID = s.CID
    Provided both the tables are in same or different dbs in the same server 
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Audit a table in Oracle

    Hi All,
    I want to log all activities on a specific table in my schema.
    I want to log all insert/update/delete done on the table.
    Is there any way to do it without using a Trigger/Audit?
    Thanks,
    Anu

    I think what you asked was a perfectly good question.
    If you explained the whole reasoning someone else on the board
    would probably have said why did you bore us with the details!The original poster asked how to accomplish this without using triggers or using Oracle's auditing mechanisms. Those are the two technologies that would generally be most appropriate for this sort of task. Since he didn't want to use those approaches, we're going to need to know more details about the requirements and environmental constraints in order to determine what alternatives might be appropriate.
    I'm not saying it has never happened, but I can't recall the last time a poster provided too much detail about the requirements in a question...
    I don't have off the top of my head how you get the User name in the Trigger. You'd use the USER function, which you already seem to be using in your sample. Assuming, of course, that you are trying to capture the Oracle user name rather than an application user name.
    Justin

  • Comment creer un trigger pour auditer une table scott.emp

    Bonjour j aimerais savoir comment creer un trigger pour auditer delete update on scott.emp

    DROP TABLE EMP;
    CREATE TABLE EMP(C NUMBER);
    DROP TABLE AUDIT_T;
    CREATE TABLE AUDIT_T
              time DATE
              ,who VARCHAR2(100)
              ,what VARCHAR2(100)
    DROP PROCEDURE AUDIT_EMP;
    CREATE OR REPLACE
    PROCEDURE AUDIT_EMP(p_what IN AUDIT_T.what%TYPE) IS
         PRAGMA AUTONOMOUS_TRANSACTION;
    BEGIN
         INSERT INTO AUDIT_T VALUES
                   SYSDATE
                   ,TRIM(SYS_CONTEXT('USERENV', 'HOST')) || '.' ||
                        TRIM(SYS_CONTEXT('USERENV', 'OS_USER')) || '.' ||
                        TRIM(SYS_CONTEXT('USERENV', 'SESSIONID'))
                   ,p_what
         COMMIT;
    END;
    CREATE OR REPLACE TRIGGER EMP_BDUR
         BEFORE DELETE OR UPDATE
         ON EMP
         FOR EACH ROW
    DECLARE
         l_what VARCHAR2(100);
    BEGIN
         IF UPDATING THEN
              l_what := 'Updating EMP';
         ELSE
              l_what := 'Deleting from EMP';
         END IF;
         AUDIT_EMP(l_what);
    END EMP_BDUR;
    INSERT INTO EMP(SELECT ROWNUM FROM USER_OBJECTS WHERE ROWNUM <= 10);
    DELETE FROM EMP WHERE C IN (2,3);
    UPDATE EMP SET C = C + 3 WHERE C IN (5,6);
    COLUMN who FOR A40
    COLUMN what FOR A20
    SELECT * FROM AUDIT_T;
    TIME WHO WHAT
    11.05.2006 10:52:40 host\osuser..27953 Deleting from EMP
    11.05.2006 10:52:40 host\osuser..27953 Deleting from EMP
    11.05.2006 10:53:27 host\osuser..27953 Updating EMP
    11.05.2006 10:53:27 host\osuser..27953 Updating EMP

  • Audit DB Table Transactions

    We know the audit capability of generating/creating DB Triggers to insert changes (Update/Delete) on a table in to a separate audit table.
    Are there any other recommendations to achieve the same? Does Oracle DB Standard edition provide such functionality without writing DB triggers?

    Workspace Manager is one option here. Basically, it allows you to version-enable a table, automatically tracking changes into a history table. Lots of cool features where you can tell a session to pretend that it's an arbitrary point in time an return results as if you'd run the query at that instant.
    The Developer's Guide for Workspace Manager is here
    http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96628/toc.htm
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

Maybe you are looking for