DDL Triggers and Detecting sp_rename

I am trying to use DDL triggers to detect all changes to a table.
Sometimes a user directly or (more likely) through the SQL Server Management Studio GUI renames a column via sp_rename.
I can't seem to figure out how to detect such renames using a DDL trigger.  Is there any way or is this a limitation of the DDL trigger system?

You can call it a limitation
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=124493&wa=wsignin1.0
Madhu

Similar Messages

  • Triggering and reading on two HP/Agilent 34401A DMMs at same time

    Hi folks,
    I'm VERY new to LabVIEW and need some help with a measurement.  I'm using LV 8.2 with all equipment on GPIB.  I have two 34401A multimeters, triggered externally using an HP 33120A function generator.   I've downloaded the example vi's and drivers and everything works fine.  My problem is with the speed of the triggering and the synchronization between the two multimeters on the same trigger.  I've read the manual and for this multimeter, it claims it can be triggered and read over GPIB at 1kHz (display off, auto range off, delay= 0, 4.5 digits).  I'm finding it is nowhere near this speed.  The fastest I have successfully triggered and recorded the data was at 100 Hz, anything higher and it no longer stays in sync with the trigger (i.e. for 200 measurements at 100 Hz, I'm getting all 200 measurements, but over 3-5 seconds).  The trigger speed is the first problem.  The second problem is getting the two meters to take a reading at the same time.  One meter always lags the other (or vice versa) by 1 to 3 readings.  My goal is to continuously (for about 60 seconds) read both multimeters as fast as possible and at the same time (250-500 Hz would be fantastic) and write it to a file.  Can anyone give me some advice on this?  Is a software trigger the way to go?  Is there some limitation with GPIB that it cannot read/write to two devices this fast? 
    Thanks!
    P.S. I've been experimenting mostly with the example code provided by NI and a .vi posted in this forum thread (http://sine.ni.com/niforum/niforumforumDU=http://forums.ni.com/ni/board/messageboard.id=170&message....) hp34401a_-_testing.vi from Kunal.  If anyone could share some other example vi's it would be very helpful!

    Hi plasma420,
    I should have read your post more carefully - was thinking it was a 1 sec acquisition, not 1 minute!
    Getting your LabVIEW app to reliably respond to a measurement (detect/read) every 2 to 4 ms is going to be tough - especially if in a multi-tasking OS environment.  On a 2GHz box running a normal Windows XP or 2K install,  I suspect you could see an occasional "hiccup" even at 100Hz.  A bit of searching the forum turned up this old-but-still-valuable (even entertaining) post related to improving determinism of DAQ applications on a PC.
    Observation: The listed max measurement-rate of the 34401 (1000Hz) may assume the GPIB-bus is dedicated to one instrument - the requirement to read from two instruments sequentially, may necessarily increase time spent servicing each trigger - decreasing maximum theoretical throughput.
    The first rule for "high-speed" multi-sample DAQ - especially under Windows - is to make it a hardware task instead of a software loop;  the 34401 doesn't seem well suited here.  I hate to suggest this, but... have you considered purchasing one of NIs multi-channel DAQ devices?  With a $360 PCI 6010 + cable and break-out box, you could have one of the LabVIEW DAQ examples running in ~ 30 min.  The 6010 was the cheapest 16-bit board I could find, ask your sales-rep for other alternatives if you go this route...
    Cheers!
    "Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)

  • Q? Determining event in DDL Triggers

    Hi All,
    I've noticed references in the 8i documentation to DDL triggers. In the SQL reference there is mention that you can:
    CREATE TRIGGER xyz AFTER DDL
    pl/sql block
    (or something similar, I typed this my memory)
    Which is all great except that it doesn't explain how you find out what caused you to fire.
    In a DML trigger, which I am familiar with,
    you can do useful things because you have :new and :old values. Is there a :ddl that lists the statement that fired?
    Does anyone have sample code of a ddl trigger?
    Thanks in advance,
    Steven Ensslen

    AFTER DDL is just one of the possible clause that can be used. There are may ddl where you can specify the excat ddl action. When you have specified the ddl, ofcorse you know how did the tirgger fired! I am including the documentation section on ddl clause.
    Let me know if this solved your problem.
    ---Doc section---
    Specify one or more types of DDL statements that can cause the trigger to fire. You
    can create triggers for these events on DATABASE or SCHEMA unless otherwise
    noted. You can create BEFORE and AFTER triggers for these events. Oracle fires the
    trigger in the existing user transaction. The following values are valid:
    ALTER Specify ALTER to fire the trigger whenever an ALTER statement
    modifies a database object in the data dictionary.
    Restriction: The trigger will not be fired by an ALTER DATABASE
    statement.
    ANALYZE Specify ANALYZE to fire the trigger whenever Oracle collects or
    deletes statistics or validates the structure of a database object.
    ASSOCIATE
    STATISTICS
    Specify ASSOCIATE STATISTICS to fire the trigger whenever
    Oracle associates a statistics type with a database object.
    AUDIT Specify AUDIT to fire the trigger whenever Oracle tracks the
    occurrence of a SQL statement or tracks operations on a schema
    object.
    COMMENT Specify COMMENT to fire the trigger whenever a comment on a
    database object is added to the data dictionary.
    CREATE TRIGGER
    CREATE Specify CREATE to fire the trigger whenever a CREATE statement
    adds a new database object to the data dictionary.
    Restriction: The trigger will not be fired by a CREATE DATABASE
    or CREATE CONTROLFILE statement.
    DISASSOCIATE
    STATISTICS
    Specify DISASSOCIATE STATISTICS to fire the trigger whenever
    Oracle disassociates a statistics type from a database object.
    DROP Specify DROP to fire the trigger whenever a DROP statement
    removes a database object from the data dictionary.
    GRANT Specify GRANT to fire the trigger whenever a user grants system
    privileges or roles or object privileges to another user or to a role.
    NOAUDIT Specify NOAUDIT to fire the trigger whenever a NOAUDIT
    statement instructs Oracle to stop tracking a SQL statement or
    operations on a schema object.
    RENAME Specify RENAME to fire the trigger whenever a RENAME statement
    change the name of a database object.
    REVOKE Specify REVOKE to fire the trigger whenever a REVOKE statement
    removes system privileges or roles or object privileges from a user
    or role.
    TRUNCATE Specify TRUNCATE to fire the trigger whenever a TRUNCATE
    statement removes the rows from a table or cluster and resets its
    storage characteristics.
    DDL Specify DDL to fire the trigger whenever any of the preceding DDL
    statements is issued.
    Restriction: You cannot specify as a triggering event any DDL operation performed
    through a PL/SQL procedure.

  • Function and triggers and procedures

    sorry to asking this question,
    In oracle. we use the function and triggers and procedure.
    for eg:
    if we wrote an trigger for a table. it fires at a time manipulating table. (database contains table contains datas and database also contains triggers likewise function,procedure).
    but my questions?: is
    In my database I kept only tables. no triggers,no function,no procedures. and
    i dont want to kept this triggers, function, procedures in database  Instead of i want to kept this triggers, function, procedures in business logic layers(middle tier)
    is it possible? .
    if yes means, how to write or where to write? please help me, or else send the guidance documents or blog releated to it.

    Subu123,
    the +1 related to Would be great if you can take step back and see the implementation from another angle. First see why do you need DB trigger/function etc.Then check whether it is possible to implement the functionality using ADF BC + feasibility study between 2 approaches(I didn't mean to invoke DB objects from business components, instead checking the feasibility of implement the same functionality in your EntityObj/ViewObj/Service calls )Before making a decision for or against holding fuctions, triggers and procedures in the DB, you have to get the whole picture.
    Think about a trigger outside the DB. What could this be and why or for what is it used?
    All the answers are pointing to 'lets keep them in the DB'. Now there are situation where you don't have a DB or are not allows to use it. Still there can be triggers, only they are implemented in a different way.
    The same can be said for procedures and functions.
    So you have to think about the whole problem and how each sub problem you have to solve work together to resolve the whole problem.
    I'm personally tend to keep the business logic the the DB if the business logic is already there (e.g. I have to migrate an old forms app).
    If I design a new app I tend to keep the logic in java. Only sequences (for generating ids) and some other stuff which is purely db related like cleaning up tables I keep in the DB.
    Timo

  • Problem using TAPI triggers and merge statement

    Hi,
    I use Designer tapi triggers on a table. When I try to execute a merge statement, I get the following error:
    ORA-06502: PL/SQL: numeric or value error: NULL index table key value.
    Is there a restriction when using TAPI triggers and merge statements that anyone is aware of?

    No restrictions on MERGE commands that I know of. I have, however, seen the TAPI give inexplicable ORA-06502 errors. It would help to know what line in which procedure or trigger gave the error. That information should have been in the error stack.

  • How to use analog Triggering and External clock scan

    Hi, there. I want to measure the engine cylinder pressure with an PXI6070-E card and BEI encoder. I have tried using Cont Acq&Graph ExtScanClk D-Trig.vi and Cont Acq&Graph ExtScanClk Soft A-Trig.vi , but they don't work. What I did was to connect a 50HZ pulse to PFI0 (analog triggering, I changed the code from digital triggering to analog triggering), and a 100K pulse to PFI7 (startscan), and an 50 HZ analog signal to ACH0. But the code always says: timeout. If I use internal clock, it works fine. Could you please give me some help? THANKS A LOT!

    Hey Wyuan,
    I tested the Cont Acq&Graph ExtScanClk Soft A-Trig.vi and it worked fine. However, the Cont Acq&Graph ExtScanClk D-Trig.vi has a small error in its logic that will prevent the data from ever being displayed to the graph. In order to run the examples you need to connect a trigger to pin 11 and a scan clock to pin 38. A 10kHz square wave would be fine for the clock signal and just a single pulse would work for the digital trigger.
    One additional think to keep in mind is the grounding. You might need to connect you ground from your signals to a DGND pin. I am including the two programs that I used for the test.
    I hope this helps,
    Joshua
    Attachments:
    Cont_Acq&Graph_ExtScanClk_D-Trig.vi ‏121 KB
    Cont_Acq&Graph_ExtScanClk_Soft_A-Trig.vi ‏153 KB

  • Take printscreen and detect mouse/keyboard input

    hi guys,
    I'm looking a way to take printsceen and detecting mouse/keyboard input in Adobe Air app using html/ajax .. is it possible ?
    any ideas ..please

    I wrote a blog post on how to do screen capturing using Adobe AIR abnd HTML/JavaScript. Maybe it'll help you out:
    http://www.andymatthews.net/read/2009/11/05/Capture-BitmapData-with-JavaScript-AIR-applica tions
    As for detecting key input, you can add a keydown/keydown event to the document quite easily.
    document.addEventListener('keydown', function(evt){
         // do something

  • Sql query to  know the number of triggers and cursors present in a schema?

    friends,is there any way to know the number of triggers and cursors preseent in a schema.
    thanks in advance..

    what do you mean by triggers in a schema? is it the triggers owned by that schema? or the triggers applied on tables owned by that schema? remember you may own triggers applied on the tables belong to other schemas. Anyways, all this information can be extracted from oracle dictionary using a combination of all_triggers and all_tables.
    As far as cursors, please elaborate. Do you mean cursors declared in PL/SQL blocks?

  • How to track DDL Changes and source code changes

    How can I track the DDL Changes and the Source code (Functions,Procedures,Packages & views) changes made for selective schemas?.
    I mean I want to maintain the history of DDL changes and the sourcecode change history. How to do that? Please provide your guideline with some example...

    Hi,
    you could use a DDL trigger (before create)
    to maybe capture the code and do the audit as well?
    Try this:
    SQL>create table old_code
    2 as
    3 select user username, 0 version, sysdate date_changed, user_source.*
    4 from user_source
    5 where 1=0
    6 /
    Table created.
    SQL>create sequence version_seq;
    Sequence created.
    SQL> create or replace trigger create_trigger
    2 before create on schema
    3 declare
    4 l_date date := sysdate;
    5 l_ver number;
    6 begin
    7 if (ora_dict_obj_type in ( 'PACKAGE', 'PACKAGE BODY', 'PROCEDURE',
    'FUNCTION' ) )
    8 then
    9 select version_seq.nextval into l_ver from dual;
    10
    11 insert into old_code
    12 select user, l_ver, l_date, user_source.*
    13 from user_source
    14 where name = ora_dict_obj_name
    15 and type = ora_dict_obj_type;
    16 end if;
    17 end;
    18 /
    Trigger created.
    SQL> create or replace function f return number
    2 as
    3 begin
    4 return 0;
    5 end;
    6 /
    Function created.
    SQL> select * from old_code;
    no rows selected
    SQL> create or replace function f return date
    2 as
    3 begin
    4 return sysdate;
    5 end;
    6 /
    Function created.
    ops$[email protected]> select * from old_code;
    USERNAME VERSION DATE_CHAN NAME TYPE LINE TEXT
    aaaaaaaaaaa 2 17-OCT-02 F FUNCTION 1 function f return number
    aaaaaaaaaaa 2 17-OCT-02 F FUNCTION 2 as
    aaaaaaaaaaa 2 17-OCT-02 F FUNCTION 3 begin
    aaaaaaaaaaa 2 17-OCT-02 F FUNCTION 4 return 0;
    aaaaaaaaaaa 2 17-OCT-02 F FUNCTION 5 end;

  • How do I connect and detect a high frquency pulse (0-3500hz) with a variable pulse voltage (0v low,5-10v high), on a SC-2345 connected to a PCI-6224?

    How do I connect and detect a high frquency pulse (0-3500hz) with a variable pulse voltage (0v low,5-10v high),  on a SC-2345 connected to a PCI-6224?  Labview doesn't generate a waveform if I try to graph the signal, and my analog input doesn'y recognize that the signal is even pulsing, only that it has a voltage.  Some advice would be much appreciated.
    Thanks in advance,
    Garrett

    Hi Garrett,
    It sounds like you want to do Frequency Measurements of a signal that is somewhat digital.
    There are two ways you can really do this:
    Wire your signal to the counter input and use the Digital Frequency examples (Help > Find Examples > Browse > Hardware Input and Output > DAQmx > Counter Measurements > Digital Frequency)
    Continue taking analog measurements and use some sort of logic to determine where you are getting rising and falling edges.
    I would recommend doing method #1, but you must determine which one is the best for your system.
    If you want to connect to the counter pins then you will find the
    terminals located on the side of your SC-2345.  If you don't need
    to condition your signals then simply wire everything into the proper
    pins for your counter (below).
    Default NI-DAQmx Counter Terminals (Connector 0)
     Terminal 
     Counter Context (Default) 
     Motion Encoder Context 
     Signal Name 
    37
    CTR 0 SRC
    CTR 0 A
    PFI 8
    3
    CTR 0 GATE
    CTR 0 Z
    PFI 9
    45
    CTR 0 AUX
    CTR 0 B
    PFI 10
    2
    CTR 0 OUT
    PFI 12
    42
    CTR 1 SRC
    CTR 1 A
    PFI 3
    41
    CTR 1 GATE
    CTR 1 Z
    PFI 4
    46
    CTR 1 AUX
    CTR 1 B
    PFI 11
    40
    CTR 1 OUT
    PFI 13
    Otis
    Training and Certification
    Product Support Engineer
    National Instruments

  • Trigger, triggers and more triggers

    I've been given theenviable task of reviewing the triggers on a legacy application, as an example a typical table will have between 1 and 10 before insert triggers and I've been asked to validate the logic in the triggers.
    Does anyone know if there are any tools available to help with this, so far having looked at the first table (I was asked to loko at this specifically because someone wants to add yet another trigger) I'm starting to lose the will to live, 4 of the triggers currently in place alter similar fields makeing the results indeterminate. I have a nasty feeling the only way to be certain is to cross check every trigger and compile some kind of cross reference I'd really like some kind of toolset to make this easier.
    So far my analysis is the logic is horribly broken and really the whole shambles should be ripped out an re-wrtten properly this time, preferably fixing the problems in the front end rather than trying to bandage the data using triggers..

    You may have to look into dba_triggers and dba_dependenices too see how may triggers and if all depned on same object,
    This is why Tom kyte recommands using inline code instead of triggers.
    Good luck,

  • Time bound policy :: CPSC Server down :: Re-triggering and Notification

    I have some Service Requests which are triggered by Time bound policy that execute, say for eg; Power Up some servers. But during a scenario of CPSC server being down during the time of Time bound Service request triggering, none of the requests are triggered  and also after the CPSC server is up again after few minutes past the triggering time. Is there a way to get notified if a Time bound policy is not triggered, like receiving an email? 
    Please let me know if there is any possible way to get notified during failure of time bound policy request triggering.
    Thanks,
    Anish

    Hi,
    According to event log, Winlogon process takes a long time to handle logoff event. That's to say winlogon process is waiting for response to logoff.  
    According to your description after, this problem is most probably caused by Avecto. You can try to disable or uninstall it temporarily for test.
    To make further troubleshoot with this problem, you can try to use WPT (Windows Performance Tool) to make troubleshoot.
    http://blogs.technet.com/b/askpfeplat/archive/2013/03/22/troubleshooting-windows-performance-issues-using-the-windows-performance-recorder.aspx
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • How to install and detect ie9 shockwave?

    hello I tried to install and detect shockwave for ie9 and it does neither.  please advise.  I followed instructions for active x prompts and still no go.  For ie9 cannot detect, for Chrome it works.

    What do you mean by
    movie detection.
    When you navigate IE9 to the Welcome movie, what do you see?

  • Syntax of DDL options and related (table) column names

    Hi,
    where can I find something like a mapping between DDL options and related table column names?
    For example I do have the table options PCTFREE, FREELISTS and NOCOMPRESS. The related table columns out of user_tables are PCT_FREE, FREELIST and COMPRESS.
    PCT(_)FREE wins an Underscore, FREELIST(S) wins an "S" and it is "NOCOMPRESS" if COMPRESS has a value "Y(es)".
    Hope somebody can help.

    So far I didn't find any information that is not in
    the DDL script gernerated from
    DBMS_METADATA.get_DDL.Alright, I give you an example:
    I create a table with the following DDL:
    "CREATE TABLE IntBuch (
    int_bunr integer NOT NULL,
    int_sdat double precision NOT NULL,
    int_hblz char(8) NOT NULL,
    int_hkto char(7) NOT NULL,
    int_hdat double precision NOT NULL,
    KtoNr char(7) NOT NULL,
    BLZ char(8) NOT NULL,
    CONSTRAINT PK_IntBuch PRIMARY KEY (int_bunr)
    USING INDEX
    PCTFREE 10
    STORAGE (
    INITIAL 1000
    NEXT 500
    PCTINCREASE 0
    MINEXTENTS 1
    MAXEXTENTS 4096
    PCTFREE 20
    LOGGING
    CREATE UNIQUE INDEX intid
    ON IntBuch (int_bunr DESC)
    CREATE INDEX hkto
    ON IntBuch (int_hblz,int_hkto)
    COMMENT ON TABLE IntBuch
    IS 'Kommentar zu DB-Tabelle InBuch'
    COMMENT ON COLUMN IntBuch.int_sdat IS 'Kommentar zu DB-Spalte int_sdat'
    ALTER TABLE IntBuch
    ADD CONSTRAINT Gutschrift FOREIGN KEY (int_hkto,int_hblz) REFERENCES Konto
    ON DELETE CASCADE
    ADD FOREIGN KEY (KtoNr,BLZ) REFERENCES Konto
    ADD FOREIGN KEY (int_bunr) REFERENCES Buchung
    ON DELETE CASCADE
    After that I read the DDL with DBMS_METADATA.get_DDL and I get
    " CREATE TABLE "UOENDE"."INTBUCH"
    (     "INT_BUNR" NUMBER(*,0) NOT NULL ENABLE,
         "INT_SDAT" FLOAT(126) NOT NULL ENABLE,
         "INT_HBLZ" CHAR(8) NOT NULL ENABLE,
         "INT_HKTO" CHAR(7) NOT NULL ENABLE,
         "INT_HDAT" FLOAT(126) NOT NULL ENABLE,
         "KTONR" CHAR(7) NOT NULL ENABLE,
         "BLZ" CHAR(8) NOT NULL ENABLE,
         CONSTRAINT "PK_INTBUCH" PRIMARY KEY ("INT_BUNR")
    USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
    STORAGE(INITIAL 16384 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "USERS" ENABLE,
         CONSTRAINT "GUTSCHRIFT" FOREIGN KEY ("INT_HKTO", "INT_HBLZ")
         REFERENCES "UOENDE"."KONTO" ("KTONR", "BLZ") ON DELETE CASCADE ENABLE,
         FOREIGN KEY ("KTONR", "BLZ")
         REFERENCES "UOENDE"."KONTO" ("KTONR", "BLZ") ENABLE,
         FOREIGN KEY ("INT_BUNR")
         REFERENCES "UOENDE"."BUCHUNG" ("BU_NR") ON DELETE CASCADE ENABLE
    ) PCTFREE 20 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "USERS"
    If there are no more DDLOptions possible than that, it is fine for me. If not, but all kinds of options are to find in only one or two tables of the database ( user_tables for table options, dba_constraints and dba_segments for column options, primary and foreign keys, user_indexes and user_segments for indexes ...), that is fine for me, too. (As long as I get to know which tables are "sufficient" for that.) If it is different than both of that, that's bad.
    However if you want to use defaults instead of
    absolut values, it is better to remove certain parts,
    like the storage clause, from the generated output.I understand this, but I am more interested to have all and not leaving out some of them in order to have the defaults in the database after running the DDL.
    A totally different approach could be to
    a) create a database link from one DB to another.
    b) create table <new_table> as select * from
    <old_table@dbLink> where 1=2;I keep that in mind, thanks for that hint.

  • Fork : triggering and terminating event ?

    Hi Experts,
    I am a begginer in  Workflow ..
    I just want to know how Fork can be used for paralled processing with triggering and  terminating event.
    It would be appreciated if provided with some scenarion in detailed steps.
    Thanks in advance.
    Ganesh..

    Mike,
    It would be HELPFUL for me if i get my problem solved as earlier so i can concentrate on other my commited topics..thats why expecting info., from the experts.
    Anyway , you  triggered me to read SAP help..thanks for the indirect motivation..
    Let me start reading the SAP help information!!!
    Thanks .
    Ganesh

Maybe you are looking for

  • Thin Black Border on Video in Interactive PDF (Adobe Acrobat 8 Professional)

    Hi I am having issues with embedded video in an interactive pdf (currently using Adobe Acrobat 8 Professional). I have placed my media mp4 file in the pdf. I would like the video to have no border, so I proceeded to Multimedia Properties to edit the

  • Remote desktop broken after 10.9.3 update

    After the 10.9.3 update, remote desktop is completely broken... The ard status monitor display : Apple Remote Desktop is disabled. I try a clean install (app + system library coreservice remote management + user library pref ans aap support deleted.

  • Stop Animation

    G.E, I am having the hardest time understanding layers and the Timeline. While I understand the goodness of code (HTML / CSS) I am just catching onto A.S In the meantime, being new to Flash here is my dilemma: I have 2 layers - the 1st layer being "I

  • Lost data while using a car charger,

    i had a podcast -personal from a company- and i plugged it into the car charger and i had all sorts of problems with it, i used the original ipod cord with the usb car charger a/c adapter, i lost the data and is there any way of getting it back witho

  • Moving registered timedata for an employee

    Hi We use R/3 v 4.7 I'm having a problem with ESS. An employee's time and travel date flow. Travel data is sent to the linemanager but time data does not come the same way? Why is that? I know there is a way to move/dump time data to another inbox in