Drop squence in a trigger

i have made a statment trigger that drop a sequence and start a new one for each day:
SQL> create table b2 (n number(10),da date);
Table created.
SQL> create sequence seq_b2;
Sequence created.
1 create or replace trigger b2 before insert on emp
2 declare
3 i date;
4 begin
5 select max(da) from b2 into i
6 if sysdate > i then
7 drop sequence seq_b2;
8 create sequence seq_b2;
9 end if;
10* end;
SQL> /
Warning: Trigger created with compilation errors.
SQL> show error;
Errors for TRIGGER B2:
LINE/COL ERROR
4/1 PL/SQL: SQL Statement ignored
4/24 PL/SQL: ORA-00933: SQL command not properly ended
7/1 PLS-00103: Encountered the symbol "CREATE" when expecting one of
the following:
begin case declare end exception exit for goto if loop mod
null pragma raise return select update while with
<an identifier> <a double-quoted delimited-identifier>
<a bind variable> << close current delete fetch lock insert
open rollback savepoint set sql execute commit forall merge
<a single-quoted SQL string> pipe
so is there any suggestion(''Hint'' i am droping the
squence and recreate it becuause i want the squence to be unique only at the same day)

Mohannad,
if you REALLY want to do it
you may use nigthly started job which
will recreate you sequence.
Also one of the option would be to create cycled sequence
with large enough MAXVALUE parameter and recycle it
each night to 1:
SQL> create sequence cycled_seq start with 1
  2  increment by 1 maxvalue 10000 cycle
  3  /
&nbsp
Sequence created.
&nbsp
SQL> select cycled_seq.nextval from dual;
&nbsp
   NEXTVAL
         1
&nbsp
SQL> /
&nbsp
   NEXTVAL
         2
&nbsp
SQL> /
&nbsp
   NEXTVAL
         3
&nbsp
SQL> /* At the day end */
SQL> declare
  2   id number;
  3  begin
  4   id := 0;
  5   while(id != 10000) loop
  6     select cycled_seq.nextval into id from dual;
  7   end loop;
  8  end;
  9  /
&nbsp
PL/SQL procedure successfully completed.
&nbsp
SQL> select cycled_seq.nextval from dual;
   NEXTVAL
         1Oracle jobs description is there:
http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96612/d_job.htm#999107
But to be quite franky
there are hardly any reasonable motives
to restart sequence number
every day and to compose this complex key.
Rgds.

Similar Messages

  • Drop-down list to trigger instance manager

    I may have bitten off more than I can chew with this one, but I have two pages. One comprises a checklist of Y/N/NA drop-downs; the other page has a repeating table row.
    If the drop-down selection is N I want the Instance Manager to trigger a new row on the second page and populate one of the textboxes within it with the caption value of that drop-down.
    If anyone has an idea as to whether this can be done or, even better, how I could actually do it, do please let me know. I'm no programmer unfortunately so the best I can manage is to tweak other scripts.
    Thanks in advance

    Hi Manuel,
    You will find your answer, with diagrams, in section 3.4 Model Advanced Input Fields in the following document:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/07134c67-0b01-0010-0493-b89287cf330f
    Be sure that within the Entry List tab, your list scope is dynamic for 0CALYEAR, then just map the fields.
    Failing that, make sure you have values against 0CALYEAR in your source system.
    Regards,
    Chet.

  • Drag and Drop - Application not responding

    Hello,
    I have a problem regarding Drag and Drop in Mavericks (but probably all versions):
    This is especially concerning Drag and Drop from Mail or Microsoft Outlook to another application (in this case a Java Application).
    I know that it's only possible to drag mails to the desktop, where they are saved as an eml file.
    My idea was to use the Drag and Drop mechanism as a trigger for calling an Apple Script (out of my Java Application) which saves the selected mail(s) as eml, for my application later picking them up in an defined folder. Basically this works just fine BUT Mail as well as Outlook does not respond to the tell statement of my Apple Script until the dragged mail snaps back to the source application after about 20 seconds. While the Apple Script waits for the mail application to respond, both applications (mail application as well as my own application) show "Application not responding" in dock.
    Does anybody have an idea how I can get the mail applications get to respond earlier? Probably a second instance, killing of the drag/drop event or anything else?
    Regards
    Benjamin

    Hi
    I am also facing the same problem. Did u find any solution for this problem. If yes, can u post the solution.
    Thanx.

  • Squence of events triggered in reports

    Hi all,
               Please specify squence of events trigger. When top-of-page event triggers? When end of selection event triggers
    venkraa

    When u start the Report:
    LOAD-OF-PROGRAM
    INITIALIZATION
    Before displayins Selection Screen:
    AT SELECTION-SCREEN OUTPUT.
    Before leaving Selection Screen:
    AT SELECTION-SCREEN.
    After processing Selection Screen when the List starts:
    START-OF-SELECTION.
    Before displaying the List .. After completing START-OF-SELECTION.
    END-OF-SELECTION.
    For Every page:
    TOP-OF-PAGE .
    END-OF-PAGE.
    For more details check this link -
    Events in Report
    the top of page can put any where in the program..
    end of selection is after selecting data means the population of data is done in the start-of-selection and no data is selected in the end of selection if you write select after the end of selection ...is of no use..
    regards,
    venkat
    regards,
    venkat .

  • Disconnected from DB when attempting to create trigger.

    I receive an ORA-03113: end-of-file on communication channel when creating this trigger. Could it be that the user that I'm logged in as does not have privileges to create triggers or something else?
    CREATE OR REPLACE TRIGGER SLEA_TRANSACTION_TR
      BEFORE INSERT OR UPDATE OR DELETE ON tb_slea_transaction
      FOR EACH ROW   
    BEGIN
      IF INSERTING THEN
      INSERT INTO tb_slea_transaction_audit (audit_timestamp,
                                             slea_year,
                                             empid,
                                             trans_date,
                                             sum_sort,
                                             dtl_sort,
                                             record_type,
                                             online_ind,
                                             paid_status,
                                             trans_amt,
                                             trans_id,
                                             updated_date,
                                             updated_by,
                                             comments,
                                             orig_trans_date,
                                             split_ind)
            VALUES (SYSTIMESTAMP,
                    :new.slea_year
                    :new.empid,
                    :new.trans_date,
                    :new.sum_sort,
                    :new.dtl_sort,
                    :new.record_type,
                    :new.online_ind,
                    :new.paid_status,
                    :new.trans_amt,
                    :new.trans_id,
                    :new.updated_date,
                    :new.updated_by,
                    :new.comments,
                    :new.orig_trans_date,
                    :new.split_ind); 
      ELSE
        INSERT INTO tb_slea_transaction_audit (audit_timestamp,
                                             slea_year,
                                             empid,
                                             trans_date,
                                             sum_sort,
                                             dtl_sort,
                                             record_type,
                                             online_ind,
                                             paid_status,
                                             trans_amt,
                                             trans_id,
                                             updated_date,
                                             updated_by,
                                             comments,
                                             orig_trans_date,
                                             split_ind)
            VALUES (SYSTIMESTAMP,
                    :OLD.slea_year
                    :OLD.empid,
                    :OLD.trans_date,
                    :OLD.sum_sort,
                    :OLD.dtl_sort,
                    :OLD.record_type,
                    :OLD.online_ind,
                    :OLD.paid_status,
                    :OLD.trans_amt,
                    :OLD.trans_id,
                    :OLD.updated_date,
                    :OLD.updated_by,
                    :OLD.comments,
                    :OLD.orig_trans_date,
                    :OLD.split_ind); 
       END IF;
    END SLEA_TRANSACTION_TR;

    Are you trying to create or recreate the trigger?
    To turn on the debug you must:
    1) Create the trigger a first time
    2) Turn on the debug: "alter trigger trigger_name compile debug";
    3) Recreate the trigger (create or replace trigger_name ...) -- BUG
    The bug on 9i happens step 3, when you try to Recreate the trigger.
    If you don't know about the debug, try to drop and create the trigger.
    You can take a look on the NoteId 2256092 in Metalink.
    Hope its help,
    Paulo.

  • Can a Photoshop button be used as a Lightbox trigger?

    I've brought in a layered PSD file as a button with different states, but instead of the button linking to another page or similar, I'd like it to trigger a lightbox image that triggers a different hero image. Or, thinking about it in another way, can a lightbox thumbnail be replaced with not only a different image than the hero, but also has normal, rollover and down states?
    Is this possible?

    Hello,
    You can achieve this by using the Lighbox widget under "Compositions" option in widget.
    First indert the Lighbox widget (from Compositions catagory in Widgets)
    To insert the Photoshop button, Go to File>Place Photoshot button.
    Select the PSD file and place it on the page.
    Now click on the Photoshop button on the page and drag and drop it inside the Trigger of the Widget (Make sure the mouse pointer is inside the trigger and then release the mouse click to make sure it gets placed inside the trigger).
    And you can add a different image/content for target container as well.
    One quick tip : Click on "Hide all initially" option in Lightox widget properties (Which comes up when you click on small white arrow in blue circle when any Widget item is selected) to make sure all the states/layers of the button works.
    Hope this helps.
    Regards,
    Sachin

  • Error when dropping users

    I accidently created several users that have an apostrophe attatched to the end of the user name.
    The database versions are 10.2.0.2 and 10.2.0.3.0
    The way I initially created the users was in SQLPLUS like : create user "SCOTT'";
    Now, when I go to try to drop the user fro the database, I receive the following error:
    ERROR at line 1:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01740: missing double quote in identifier
    ORA-06512: at line 7
    I have also tried to drop the users in Enterprise Manager Console and received the same error.
    Any ideas how else I can drop these users?
    Thanks!
    Edited by: 897877 on Aug 20, 2012 3:33 PM

    Thank you. I can reproduce the problem in 10.2.0.1.0 on Windows.
    A search indicates this is a known bug and I found this article that gives an explanation and shows a way around it.
    http://mikesmithers.wordpress.com/2010/02/17/dropping-quoted-users-%E2%80%93-why-sometimes-oracle-cant-bear-to-say-goodbye/
    This query
    SELECT owner, trigger_name, trigger_type  
    FROM dba_triggers  
    WHERE base_object_type LIKE 'DATABASE%'  shows three triggers owned by MDSYS and after the author disabled the triggers the user could be dropped.
    SDO_DROP_USER, SDO_DROP_USER_BEFORE, SDO_GEOR_DROP_USER
    Edited to add the commands needed - but you should read the post
    ALTER TRIGGER mdsys.sdo_drop_user disable;  
    ALTER TRIGGER mdsys.sdo_drop_user_before disable;  
    drop user "SCOTT'";
    ALTER TRIGGER mdsys.sdo_drop_user enable;  
    ALTER TRIGGER mdsys.sdo_drop_user_before enable;  

  • Can't disconnect from database connection

    Hello,
    One of our application has been running for over a year on a client network, a windows desktop executable connected to an Oracle Standard One Edition, rel. 10.1.0.2., on a Linux server. Now the executable hangs when the users exit the app. It is build using Oracle Objects For OLE and the culprit is the close method of the ODatabase object. Strangely however, we found out that other applications can’t disconnect anymore:
    Both SQL*Plus and Toad will hang when exiting.
    Also, doing a connection test with the Net Manager hangs when a valid login is used. If I put an non-existing user or a locked one (scott/tiger for example), the server does report the problem.
    I've enabled local client tracing on a user desktop but there are no errors reported, which makes sense since it seems like nothing is coming back.
    The network admin over there swears nothing has change on the network config. So I’m hunting possible cause for this. There are several logs file cluttering up disk space in various folders and this file:
    /home/oracle/OraHome_1/sqlnet.log is now up to 3.1 Mb. I believe I can safely delete this one from other messages I found in various newsgroup. I would be surprise however that disk space is the problem since the windows app works fine, doing query in SQL*Plus works fine. (I only tried Toad to check the disconnect “feature”, not familiar with this tool, but it was showing the schema correctly)
    As a developper, I am however curious on whats happening when a disconnect is sent to the server and what are the expected responses, which don’t seem to be coming back anymore. It really looks like some packets are lost on their way back.
    Thanks in advance,
    Eric

    Many thanks! You hit the problem right on!
    Oddly, I can't even drop or disablee the trigger, SQL*Plus freeze. The network admin will perform a shutdown tonite when nobody is using the software. I'll see if I can drop it then.
    Regards,
    Eric

  • Error while executing the .sql file

    Hello,
    Every time when i execute the below plsql it's keep throwing the error message as show in below output, this happens even when i manually create the trigger before executing the .sql file of all the below statements, can you please correct me what i am doing wrong here. Thank you.
    DROP TABLE FCSDWH.REF_DATA_MASTER;
    CREATE TABLE FCSDWH.REF_DATA_MASTER
    REF_DATA_MASTER_ID                      NUMBER PRIMARY KEY,
    DESCRIPTION                                     VARCHAR2(255 CHAR),
    CREATE_ID                                       VARCHAR2(10 CHAR),
    CREATE_DT                                       DATE,
    LST_UPD_ID                                      VARCHAR2(10 CHAR),
    LST_UPD_DT                                      DATE,
    ACT_STRT_DT                                     DATE,
    ACT_END_DT                                      DATE
    TABLESPACE FCSDWH
    STORAGE(INITIAL 50K);
    DROP SEQUENCE FCSDWH.REF_DATA_MASTER_SEQ;
    CREATE SEQUENCE FCSDWH.REF_DATA_MASTER_SEQ START WITH 1 INCREMENT BY 1;
    DROP TRIGGER "FCSDWH.REF_DATA_MASTER_TRG";
    CREATE OR REPLACE TRIGGER FCSDWH.REF_DATA_MASTER_TRG
    BEFORE INSERT ON FCSDWH.REF_DATA_MASTER
    FOR EACH ROW
    BEGIN
    SELECT FCSDWH.REF_DATA_MASTER_SEQ.NEXTVAL INTO :NEW.REF_DATA_MASTER_ID FROM DUAL;
    END;
    /Output:
    SQL> @/home/smadala/REF_DATA_MASTER.SQL
    Table dropped.
    Table created.
    Sequence dropped.
    Sequence created.
    DROP TRIGGER "FCSDWH.REF_DATA_MASTER_TRG"
    ERROR at line 1:
    ORA-04080: trigger 'FCSDWH.REF_DATA_MASTER_TRG' does not exist
    Trigger created.
    SQL>

    The trigger is "attached" to the table so when you drop the table the trigger goes as well.
    John

  • Using spry to filter age or date range?

    I'm trying to create a spry filter to filter between age or date ranges. I can get the code to filter an age if it's greater or below a number, but not a range between numbers. How can I modify the following code to filter between a  range of numbers? I would prefer to use drop down for age range choices so the user can choose each age from a drop down menu but I wasn't having much luck with it whereas the checkbox was somewhat working for me. If someone has a drop down method to select ages and have spry filter between the values I would be very grateful. Many thanks in advance!
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Multiple Filters Sample</title>
    <link href="http://labs.adobe.com/technologies/spry/css/samples.css" rel="stylesheet" type="text/css" />
    <script language="JavaScript" type="text/javascript" src="http://labs.adobe.com/technologies/spry/includes/xpath.js"></script>
    <script language="JavaScript" type="text/javascript" src="http://labs.adobe.com/technologies/spry/includes/SpryData.js"></script>
    <script language="JavaScript" type="text/javascript" src="http://labs.adobe.com/technologies/spry/includes/SpryDataExtensions.js"></script>
    <script type="text/javascript">
    <!--
    var dsStates = new Spry.Data.XMLDataSet("states.xml", "states/state");
    dsStates.setColumnType("name", "number");
    function ff15(ds, row, index){ var c = row.name; return c >= '6' && c <= '100' ? null : row; };
    function ffIP(ds, row, index){ var c = row.name; return c >= '11' && c <= '100' ? null : row; };
    function ffQZ(ds, row, index){ var c = row.name; return c >= '0' && c <= '10' ? null : row; };
    function ToggleFilter(enable, f)
         if (enable)
              dsStates.addFilter(f, true);
         else
              dsStates.removeFilter(f, true);
    function RemoveAllFilters()
         document.forms[0]["f15"].checked = false;
         document.forms[0]["fIP"].checked = false;
         document.forms[0]["fQZ"].checked = false;
         dsStates.removeAllFilters(true);
    -->
    </script>
    </head>
    <body>
    <div class="liveSample" style="float: left; margin-bottom: 4px;">
         <form action="">
         <label>Show '1' - '5': <input name="f15" type="checkbox" value="" onclick="ToggleFilter(this.checked, ff15);" /></label><br />
         <label>Show '6' - '10': <input name="fIP" type="checkbox" value="" onclick="ToggleFilter(this.checked, ffIP);" /></label><br />
         <label>Show '11' - '20': <input name="fQZ" type="checkbox" value="" onclick="ToggleFilter(this.checked, ffQZ);" /></label><br />
         <input type="button" value="Remove All Filters" onclick="RemoveAllFilters();" />
         </form>
         <div spry:region="dsStates" spry:repeatchildren="dsStates">
              <span>{name}</span>
         </div>
    </div>
    </body>
    </html>
    <states>
         <state>
              <name>1</name>
         </state>
         <state>
              <name>2</name>
         </state>
         <state>
              <name>3</name>
         </state>
         <state>
              <name>4</name>
         </state>
         <state>
              <name>5</name>
         </state>
    etc. etc.
    </states>

    The syntax for the xml file along with the rest of the source was provided in the original post. Here's the modified html file. How do I concactenate if (cat = 2) if (cat = 3) etc. into the function? Thanks in advance.
    Also as you can see from my modified html source, I want two separate drop downs: one for MINage and one for MAx age. From looking at my provided source I have a feeling that when a user clicks on one or the other drop downs it will trigger the function for that selection and cancel the other filter out, which is undesired. So I am wondering how to have two drop downs work to filter between min and max age where if a user clicks on one drop down it doesn't cancel the function of the previous filter selection.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Multiple Filters Sample</title>
    <link href="http://labs.adobe.com/technologies/spry/css/samples.css" rel="stylesheet" type="text/css" />
    <script language="JavaScript" type="text/javascript" src="http://labs.adobe.com/technologies/spry/includes/xpath.js"></script>
    <script language="JavaScript" type="text/javascript" src="http://labs.adobe.com/technologies/spry/includes/SpryData.js"></script>
    <script language="JavaScript" type="text/javascript" src="http://labs.adobe.com/technologies/spry/includes/SpryDataExtensions.js"></script>
    <script type="text/javascript">
    <!--
    var dsStates = new Spry.Data.XMLDataSet("states.xml", "states/state");
    dsStates.setColumnType("name", "number");
    function MINage(cat){
         if (cat = 1)
           dsStates.setXPath('states/state[name > 0]');
         dsStates.loadData();
    function MAXage(cat){
         if (cat = 10)
           dsStates.setXPath('states/state[name < 10]');
         dsStates.loadData();
    -->
    </script>
    <style type="text/css">
    <!--
    .badge {
         float: left;
         margin: 4px;
         padding: 4px;
         text-align: center;
         background-color: #FFCC99;
         border-top: solid 1px #999999;
         border-left: solid 1px #999999;
         border-bottom: solid 1px #CCCCCC;
         border-right: solid 1px #CCCCCC;
    label {
         font-weight: bold;
    -->
    </style>
    </head>
    <body>
    <h3>Multiple Filters Sample</h3>
    <div class="liveSample" style="float: left; margin-bottom: 4px;">
    <form action="">
    <select name="ageCat" onchange="MINage(this.value)">
        <option value="1">1</option>
        <option value="2">2</option>
        <option value="3">3</option>
        <option value="4">4</option>
        <option value="5">5</option>
        <option value="6">6</option>
        <option value="7">7</option>
        <option value="8">8</option>
        <option value="9">9</option>
        <option value="10">10</option>
        <option value="11">11</option>
        <option value="12">12</option>
        <option value="13">13</option>
        <option value="14">14</option>
        <option value="15">15</option>
        <option value="16">16</option>
        <option value="17">17</option>
        <option value="18">18</option>
        <option value="19">19</option>
        <option value="20">20</option>
        <option value="21">21</option>
        <option value="22">22</option>
        <option value="23">23</option>
        <option value="24">24</option>
        <option value="25">25</option>
        <option value="26">26</option>
        <option value="27">27</option>
        <option value="28">28</option>
        <option value="29">29</option>
        <option value="30">30</option>
        <option value="31">31</option>
        <option value="32">32</option>
        <option value="33">33</option>
        <option value="34">34</option>
        <option value="35">35</option>
        <option value="36">36</option>
        <option value="37">37</option>
        <option value="38">38</option>
        <option value="39">39</option>
        <option value="40">40</option>
        <option value="41">41</option>
        <option value="42">42</option>
        <option value="43">43</option>
        <option value="44">44</option>
        <option value="45">45</option>
        <option value="46">46</option>
        <option value="47">47</option>
        <option value="48">48</option>
        <option value="49">49</option>
        <option value="50">50</option>
        <option value="51">51</option>
        <option value="52">52</option>
        <option value="53">53</option>
        <option value="54">54</option>
        <option value="55">55</option>
        <option value="56">56</option>
        <option value="57">57</option>
        <option value="58">58</option>
        <option value="59">59</option>
        <option value="60">60</option>
        <option value="61">61</option>
        <option value="62">62</option>
        <option value="63">63</option>
        <option value="64">64</option>
        <option value="65">65</option>
        <option value="66">66</option>
        <option value="67">67</option>
        <option value="68">68</option>
        <option value="69">69</option>
        <option value="70">70</option>
        <option value="71">71</option>
        <option value="72">72</option>
        <option value="73">73</option>
        <option value="74">74</option>
        <option value="75">75</option>
        <option value="76">76</option>
        <option value="77">77</option>
        <option value="78">78</option>
        <option value="79">79</option>
        <option value="80">80</option>
        <option value="81">81</option>
        <option value="82">82</option>
        <option value="83">83</option>
        <option value="84">84</option>
        <option value="85">85</option>
        <option value="86">86</option>
        <option value="87">87</option>
        <option value="88">88</option>
        <option value="89">89</option>
        <option value="90">90</option>
        <option value="91">91</option>
        <option value="92">92</option>
        <option value="93">93</option>
        <option value="94">94</option>
        <option value="95">95</option>
        <option value="96">96</option>
        <option value="97">97</option>
        <option value="98">98</option>
        <option value="99">99</option>
      </select>
    <select name="ageCat" onchange="MAXage(this.value)">
        <option value="1">1</option>
        <option value="2">2</option>
        <option value="3">3</option>
        <option value="4">4</option>
        <option value="5">5</option>
        <option value="6">6</option>
        <option value="7">7</option>
        <option value="8">8</option>
        <option value="9">9</option>
        <option value="10">10</option>
        <option value="11">11</option>
        <option value="12">12</option>
        <option value="13">13</option>
        <option value="14">14</option>
        <option value="15">15</option>
        <option value="16">16</option>
        <option value="17">17</option>
        <option value="18">18</option>
        <option value="19">19</option>
        <option value="20">20</option>
        <option value="21">21</option>
        <option value="22">22</option>
        <option value="23">23</option>
        <option value="24">24</option>
        <option value="25">25</option>
        <option value="26">26</option>
        <option value="27">27</option>
        <option value="28">28</option>
        <option value="29">29</option>
        <option value="30">30</option>
        <option value="31">31</option>
        <option value="32">32</option>
        <option value="33">33</option>
        <option value="34">34</option>
        <option value="35">35</option>
        <option value="36">36</option>
        <option value="37">37</option>
        <option value="38">38</option>
        <option value="39">39</option>
        <option value="40">40</option>
        <option value="41">41</option>
        <option value="42">42</option>
        <option value="43">43</option>
        <option value="44">44</option>
        <option value="45">45</option>
        <option value="46">46</option>
        <option value="47">47</option>
        <option value="48">48</option>
        <option value="49">49</option>
        <option value="50">50</option>
        <option value="51">51</option>
        <option value="52">52</option>
        <option value="53">53</option>
        <option value="54">54</option>
        <option value="55">55</option>
        <option value="56">56</option>
        <option value="57">57</option>
        <option value="58">58</option>
        <option value="59">59</option>
        <option value="60">60</option>
        <option value="61">61</option>
        <option value="62">62</option>
        <option value="63">63</option>
        <option value="64">64</option>
        <option value="65">65</option>
        <option value="66">66</option>
        <option value="67">67</option>
        <option value="68">68</option>
        <option value="69">69</option>
        <option value="70">70</option>
        <option value="71">71</option>
        <option value="72">72</option>
        <option value="73">73</option>
        <option value="74">74</option>
        <option value="75">75</option>
        <option value="76">76</option>
        <option value="77">77</option>
        <option value="78">78</option>
        <option value="79">79</option>
        <option value="80">80</option>
        <option value="81">81</option>
        <option value="82">82</option>
        <option value="83">83</option>
        <option value="84">84</option>
        <option value="85">85</option>
        <option value="86">86</option>
        <option value="87">87</option>
        <option value="88">88</option>
        <option value="89">89</option>
        <option value="90">90</option>
        <option value="91">91</option>
        <option value="92">92</option>
        <option value="93">93</option>
        <option value="94">94</option>
        <option value="95">95</option>
        <option value="96">96</option>
        <option value="97">97</option>
        <option value="98">98</option>
        <option value="99">99</option>
      </select>
         </form>
         <div spry:region="dsStates" spry:repeatchildren="dsStates">
              <span class="badge">{name}</span>
         </div>
    </div>
    <p><br style="clear: both;" />
    </p>
    </body>
    </html>
    Thanks!

  • Triggers on every table in schema

    Hi All,
    I want to know every details that whenever someone performs a DML in schema A on any tables to logged into a table.
    I have attempted these:
    -Create log table
    CREATE TABLE audit_rst(
    user_id VARCHAR2(30),
    session_id NUMBER,
    host varchar2(30),
    ip_add varchar2(30),
    action CHAR(3),
    date_executed DATE);
    --Create a row based trigger for every tabel available
    --this exampel shows only one table
    CREATE OR REPLACE TRIGGER AUDIT_cc_2008
    AFTER INSERT OR DELETE OR UPDATE ON cc_2008 FOR EACH ROW
    DECLARE
    v_operation VARCHAR2(10) := NULL;
    BEGIN
    IF INSERTING THEN
       v_operation := 'I';
    ELSIF UPDATING THEN
       v_operation := 'U';
    ELSE
       v_operation := 'D';
    END IF;
    IF INSERTING OR UPDATING THEN
      INSERT INTO audit_rst(
      USER_ID,
      SESSION_ID,
      HOST,
      ACTION,
      DATE_EXECUTED)
      VALUES (
      user,
      sys_context('USERENV','SESSIONID'),
      sys_context('USERENV','HOST'),
      SYS_CONTEXT('USERENV', 'IP_ADDRESS', 15)
      v_operation, SYSDATE);
    ELSE
      INSERT INTO audit_rst (
      USER_ID,
      SESSION_ID,
      HOST,
      ACTION,
      DATE_EXECUTED)
      VALUES (
      user,
      sys_context('USERENV','SESSIONID'),
      sys_context('USERENV','HOST'),
      v_operation, SYSDATE);
    END IF;
    END;Do I need to create this trigger for every table available in teh schema...or is tehre a schema level trigger that can scan through the schema and pick up any dml changes to any table and log it into teh audit_rst table?

    fyi
    Schema-Level Events for Trigger Definitions Event
    SERVERERROR : Oracle fires the trigger whenever a server error message is logged.
    LOGON : Oracle fires the trigger after a client application logs on to the database successfully.
    LOGOFF : Oracle fires the trigger before a client application logs off the database.
    CREATE : Oracle fires the trigger whenever a CREATE statement adds a new database object to the schema.
    DROP : Oracle fires the trigger whenever a DROP statement removes an existing database object from the
    schema.
    ALTER : Oracle fires the trigger whenever an ALTER statement modifies an existing database object in the
    schema.

  • Archival of tables

    I am having some 50 tables in my applications. Now i want to archive the data which are older than specified time (say 3 years..) in each of the tables with some specified query. Sme 20 of my tables are of huge size with Millions of data in it. I am using Oracle 8i database.
    I thought of using Export utility with the Query option in Oracle 8i, but that option will not support complex joins....Also deleting the records (may be very huge in size) after the export from the tables will also be dangerous because of rollback segment problems..
    Another option i thought is that Partioning all the datas to be archived to a another partion and export that whole partion(how to do this...????) to dump file and then drop the partion...
    Is there any other nice idea to implement.....
    Thanks in advance..
    sankar

    Hi,
    consider this solution:
    You move only the VALID records to a new table using CTAS or better PCTAS.
    There are several consideration to do before using this solution:
    1) You can use the Paralle Query Option
    2) The service downtime for the user is limited to the time of creating the new table
    3) You can use the NOLOGGING option to speed-up the execution and theswitch the table to LOGGING
    4) You will not have any problem with the rollback segments
    5) You won't have any hole in the segment due to deletion
    6) if You use the order clause You slow-down the creation process, but, at the end, You'll get a table phisically ordered by it's primary key
    The steps involved are, supposing that Your table is called TABLE_A
    - use a CREATE AS SELECT instruction to transfer only the VALID records:
    CREATE TABLE table_b
    "STORAGE CLAUSES"
    "PARALLEL CLAUSE" (if PQ intalled)
    AS SELECT
    /*+ PARALLEL(t, 4) */ (if PQ intalled)
    FROM table_a
    WHERE "where condition for valid records"
    ORDER BY "primary kye fields"- drop any index, constraint, trigger on table_a that need to be recreated with the same name
    - RENAME table_a TO table_old
    - RENAME table_b TO table_a
    - rebuld indexes, constraints and triggers
    After this operation You may reopen the service to the users and the backup the table table_old.
    I hope this will be usefull for You
    Max

  • Capturing old VHS tapes

    Hello.
    Can anyone out there tell me the best way to capture old VHS tapes on to my imac? i.e. what software is best to use? What format is best? Best way to clean up the tapes/ machine before playing them? Basically any little tip and tricks for a good result.
    I have searched and googled but cannot find information relavent to my set up. I have already imported quite a few tapes and the results vary from not too bad to terrible.
    I would say that I have about 30 tapes that I want to go through and take bits from and am willing to give up a lot of time but only if the results are worth it. So far that has not been the case.
    The set up I have at the moment is:
    Hitachi VHS recorder (good one at the time)
    Canopus advc-55
    27" imac i7.
    Also have Final Cut Express installed but find the capture/ achiving far easier in imovie.
    Any help appreciated,
    Pat.

    Hi
    Canopus advc-55 - should work OK
    I use a Canopus ADVC-300 as this has two important (to me) features
    • TimeBase correction - mend's small drop outs
    The Capture doesn't halt
    Audio is keept in sync - even when drop out frames
    • Picture enhanzing
    Then I prefer to use
    • iMovie HD6 - and this set to Capture NOT in a cut up version as then drop out frames will trigger new clips (called save as individual clips in iMovie HD6 pref - I turn it off)
    Else I don't need anything else.
    Capturing in FinalCut Express or Pro - is more problematic to me as they are much more sencitive and halt's Import much easier. (Much more baby-sittings) - my notes on this following.
    Analog to Mac/Digital
    From
    • S-VHS, VHS, VHS-C - Camera or VCR (VHS-C needs adaptor cassette - SVHS/VCR in such cases)
    • Video 8, Hi8 ...........................................( Camera / Digital8 Camera or special VCR-player )
    Can be done via
    • Camera and tape or video trough (if present) (miniDV or Digital8)
    • A/D-box
        Several brands (Must be FireWire)
            Canopus ADVC-55 (now Grass Valley ADVC-55) - (only on way)
            Canopus ADVC-110 (now Grass Valley ADVC-110) - (two ways)
            Canopus ADVC-300 (now Grass Valley ADVC-300) - (Timebase/code-correction)
            EyeTV
    • VCR --> DVD (result needs conversion to be of use)
    Captured/Imported by
    • iMovie 1 to HD6
    • iMovie’08 & 09 & 11
    • FinalCut Express or Pro
    • Final Cut Pro - X ( iMovie’11 Pro? )
    • QuickTime Pro
    • iDVD
    SCART - Must use an SCART-adaptor with in and out switch. The one that came with Camera is one way. Camera ----> VCR/TV - not other way around.
    RCA - Connect right way around
    USING the S-Video out than RGB-video (Composite) from SCART will give a significantly better result !
    Why
    • Want to do a  DVDs
    • Want to edit
    Connect VCR to A/D-box via SCART---RCA (EU) or via RCA---RCA (US) and set SCART switch to out (if used). The A/D-box may have an in resp. out side. Connect to in-side. Set A/D-box Input selector to Analog in.
    My ADVC-300 has two sets of dip-switches on bottom - for PAL they are set to
    Left one number 6 is set to on - all others in off state.
    If 6 in off state then it is NTSC
    From A/D-box via FireWire 6-pin to 6-pin or 9-pin end to Mac FW port.
    Now turn A/D-box or Camera ON
    Start iMovie or QT or FinalCut
    Select Import or Capture
    Re-wind tape in VCR or Camera
    Start - Play on VCR or Camera
    Import or Capture Now
    See that the saved movie is collected on a hard disk with sufficient space
    1 hour needs 13.5Gb
    8 hour needs 105-110Gb (e.g. a 240VHS tape recorded in LP-mode)
    How to store the material
    • As is - Icon with a Star on it (iMovie HD6)
    • As a set of DVDs
    • Collected in a folder - FinalCuts Scratch folders + Movie document on an external/second hard disk
    • As DiskImages
    • Back to miniDV tapes
    Do not use LP-mode with miniDV tapes. Two major problems.
    a. When Camera dies - so does the tapes - Can’t be play-backed securely on other Camera even if
    brand and type number is the same - the tolerances are to small
    b. Audio goes out of sync due to 12-bit recording and/or drop outs in video makes video and audio
    not walk in pace / parallel. Resulting in a very tough re-sync problem.
    Yours Bengt W

  • Debug the procedure of "REVOKE" object privilege

    I creates two procedures, one for "GRANT ... on object" and other for "REVOKE.. from object".
    # for GRANT
    CREATE or REPLACE PROCEDURE grant_proc AS
    own VARCHAR2(30);
    nam VARCHAR2(30);
    v_cur INTEGER;
    cursor pkgs is
    select ora_dict_obj_owner, ora_dict_obj_name from SYS.event_table;
    begin
    open pkgs;
    loop
    fetch pkgs into own, nam;
    exit when pkgs%notfound;
    v_cur := dbms_sql.open_cursor;
    dbms_sql.parse(v_cur, 'GRANT SELECT ON ' || own || '.' ||nam|| ' to READ_BAANDB', dbms_sql.native);
    dbms_sql.close_cursor(v_cur);
    commit;
    delete from sys.event_table;
    commit;
    end loop;
    end;
    # for REVOKE
    CREATE or REPLACE PROCEDURE revoke_proc AS
    own VARCHAR2(30);
    nam VARCHAR2(30);
    v_cur INTEGER;
    cursor pkgs is
    select ora_dict_obj_owner, ora_dict_obj_name from SYS.event_table;
    begin
    open pkgs;
    loop
    fetch pkgs into own, nam;
    exit when pkgs%notfound;
    v_cur := dbms_sql.open_cursor;
    dbms_sql.parse(v_cur, 'REVOKE SELECT ON ' || own || '.' ||nam|| ' from READ_BAANDB', dbms_sql.native);
    dbms_sql.close_cursor(v_cur);
    commit;
    delete from sys.event_table;
    commit;
    end loop;
    end;
    The problem is at the "delete from sys.event_table". The GRANT procedure works fine, but the same syntax in REVOKE procedure did not execute, despite the "REVOKE SELECT..." run ok. So how can I debug / write out any error from the step in the procedure?

    It took me a while to remember how to write out the result of a query.
    As you can see from the metalink note example which "GRANT SELECT... to user" when I created a table in the schema. And I added DROP event in the trigger and wrote my "REVOKE SELECT..from user" procedure similar to that of GRANT. So everytime when a table was CREATED or DROPPED from schema, system would return 1 rowcount of the event_table before the GRANT or REVOKE process run.
    I also checked the total row count before and after both GRANT and REVOKE procedures in either trigger and in grant_job procedure, the total row count return from before and after is always 1 no matter whether is GRANT or REVOKE process. The end of trigger commits everything. However, only the GRANT commits completely, ie delete from sys.event_table; not the REVOKE section.
    SQL> set serveroutput on
    SQL> create table a1 (c number);
    row count before: 1
    row count after: 1
    Table created.
    SQL> select * from sys.event_table;
    no rows selected
    SQL> drop table a1;
    row count before: 1
    row count after: 1
    Table dropped.
    SQL> select * from sys.event_table;
    ORA_DICT_OBJ_OWNER ORA_DICT_OBJ_NAME
    BAANDB A1
    Message was edited by:
    CIATECPCV

  • Acquire and save images at high frame rates

    I am attempting to acquire and save images at a rate of 3000 fps for approximately 100 ms using a JAI 6740GE GigE camera, LabView 2011, and IMAQdx.  I can acquire the images at the necessary rates, but am dropping images when I try to save them.  The current test program I am working with contains a producer loop for acquiring the images, converting them into an array, and putting them into a queue, and a consumer loop to write the arrays to a TDMS file.  Currently I can acquire and save the images at a rate of approximately 1200 fps before I begin losing a few frames.  The code is attached below.  I would appreciate any ideas to be able to save the images without dropping frames.
    Attachments:
    Trigger Image to AVI faster.vi ‏38 KB

    Hi Rox,
    How are you verifying that you are loosing the frames during the saving and not during the acquisition? Are you able to determine where you are dropping frames? Is it at the beginning, the end or randomly? Thank you!
    Regards,
    Kira T

Maybe you are looking for

  • Applets in Jsp generates ClassNotFoundException

    hi there, I face a problem of calling applets in Jsp. The code to call applet is: <jsp:plugin type="applet" code="core.TextApplet" width="475" height="350"> </jsp:plugin> And I have a 'core' directory in source packages and TextApplet.java in core di

  • Different Purch Org & Purch Group is shown when PR is transferred to SRM

    Experts, We are facing a strange problem, A user is creating a PR in R3 under specific Purch org. We have configured to transfer the PR to SRM to carry out the sourcing activity. So that PR reaches in the sourcing cockpit but with different Purch org

  • Can't install Adobe AIR from badge installer on Windows after AIR 3.3 updated

    On Windows, the badge downloard won't install AIR. When the badge is clicked, it pops up a confirmation dialog to install Adobe AIR. When you click on "yes" button, progress bar indicate Adobe AIR is being installed but when the progress bar is compl

  • Getting the Datatype error data into a table or file

    Hi experts, I have a scenario where I need to capture the datatype mismatch records between source & target or the data length error records into a table or file. For example. 1. I have source table column of datatype varchar which is mapped to a tar

  • Lost installation disk - Creative Suite 5.5 design premium

    Hi there, I have lost my installation disk for Creative Suite 5.5 design premium. I have the product code & installation key. Can't seem to find a link to download the version of have anywhere on Adobe site. Help would be much appreciated. Thanks in