Fundamental question on DBMS_SCHEDULER

DB Version:10gR2
I need to run a stored procedure called PROCESS_SHIP_TRK every 5 minutes. How can i do this using DBMS_SCHEDULER?

Hi,
Take help from this.
begin
dbms_scheduler.create_schedule(
schedule_name => 'DEMO_SCHEDULE'
, start_date => '01/01/2006 22:00:00'
, repeat_interval => 'FREQ=WEEKLY'
, comments => 'Weekly at 22:00');
END;
WIth repeat interval you can use byminute clause of Job scheduler.
For more information see the following link.
http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28419/d_sched.htm#CIHDJEEB

Similar Messages

  • Fundamental question: disable the GUI while RMI is communicating?

    Good afternoon,
    I'm using RMI in a swing application and i have fundamental question:
    I have a jlist with categories and another jlist which displays the items of the selected category. When a user selects a category rmi is used to get the items of the selected category from the server (internet).
    Should i disable the whole application while rmi is communicating with the server? For example with a glasspane with a cancel button.
    What is the best practice in this case?
    Best regards,
    James

    I found a really nice solution, now i call my remote methods like:
    taskManager.executeAction(new ITaskResult(){
          public void done(Object result) {
            Collections.sort(rpcs, new RpcComperator());
            fireContentsChanged(this, 0, getSize());
          public void failed(Exception e) {
            WindowUtils.showErrorDialog(owner, "Could not change server");
        }, new IAction(){
          public Object action() throws DBException, AccessException {
            return taskManager.getBasic().changeRpc(rpc);
        }, true);The first parameter of executeAction() is a object which gets notified when a task completes (done()) or fails (failed()). The second parameter is a object which indicates which remote functions should be called. And finally the third parameter defines if the user should wait until the remote function completes.
    If the user should wait the executeAction() function shows a nice modal dialog with a progressbar and a cancel button. If the user doesn't have to wait it takes the progressbar on the statusbar to indicate the system is busy.
    Much rewriting was needed, but i think it is quite simple and it is fully swing thread save. But it wonders me that such a thing wasn't available.

  • Fundamental questions before starting next project

    Last project I put together received scathing criticism - and I have to say that I did not put any effort at all to clean the code up or optimize it. The reason is I started with small projects and within couple of months it just grew out of hand with requirements matrix gradually increasing.
    So this time around I want to take advice from you guys on architecture issues before I jump into programming. The two fundamental questions:
    1) I always thought that SubVi is like a method in C++. If I need to use that code multiple times, then I better put it in a SubVi. But after going through some of the posts on this forum it seems that people use SubVis to reduce # of wires,blocks,etc. on the main Vi too. Is this a standard practice?
    2) If I want to have more than 1 VI in the software, what is the best way to send data from one VI to the other VI? SubVI has input and output wires. So it is easy. But VIs do not. Basically I want to have Main VI where I get all the information from the use through a front panel and then go off doing my data acquisition. I want to keep the Main VI as clean as possible. There will be some operations which will need only 1 input and will have only 1 output. But this operation will be used only once in the who operation. So can I have this operation all in a VI and then call it in the Main VI?
    3) If I have 3 different VIs in my application, and I define something (say an array) in the Main VI or for that matter second_VI.vi in my application, will that be available in the third_VI.vi ?
    Thanks in advance.

    labview_beginner wrote:
    1) I always thought that SubVi is like a method in C++. If I need to use that code multiple times, then I better put it in a SubVi. But after going through some of the posts on this forum it seems that people use SubVis to reduce # of wires,blocks,etc. on the main Vi too. Is this a standard practice?
    You could call it similar to a method.  I would say a subroutine or function is a better terminology since the term method is more applicable to object oriented based programming.  Basically any way to encapsulate a portion of code, particularly if you use it over and over.  It might have input and/or outputs, or neither.
    2) If I want to have more than 1 VI in the software, what is the best way to send data from one VI to the other VI? SubVI has input and output wires. So it is easy. But VIs do not. Basically I want to have Main VI where I get all the information from the use through a front panel and then go off doing my data acquisition. I want to keep the Main VI as clean as possible. There will be some operations which will need only 1 input and will have only 1 output. But this operation will be used only once in the who operation. So can I have this operation all in a VI and then call it in the Main VI?
    There is no difference between a VI and a subVI other than semantics.  Both are completely independent excecutable portions of code.  Your main or top-level VI can have inputs and outputs as well.  You could execute it stand alone, or it could become a subVI of an even higher portion of code in your hierarchy.  The only difference between the two is that a subVI is just a term to distinguish it as being a portion of a higher level of code.  There are multiple ways of passing data between VI's.  One is wires.  When a subVI ends, the data on its indicator that is connected to the panel is available to travel down the wire to another portion of code.  Another is global or shared variables which stores data to be used by multiple locations.  Another is a function global variable, a LV2 style variable, or action engine.  All of these use special characteristics of uninitialized shift registers to store data between calls of that subVI.  Other methods of sharing data are on the Synchronization pallette such as queues and notifiers to store and pass data.
    Using a subVI, even it used in only 1 location can help keep a portion of your block diagram clear.  It gives you the ability to hide some details such as a complicated algorithm.  You can write an algorithm as a subVI and it gives you the ability to test the inputs and outpus as a standalone.  Once you have that. You can drop it in and use it even if it is only at 1 location.  If you need to change it, you can modify the subVI and test it without risking the corruption of the rest of your main VI
    3) If I have 3 different VIs in my application, and I define something (say an array) in the Main VI or for that matter second_VI.vi in my application, will that be available in the third_VI.vi ?
    Possibly, it all depends on which of the methods listed in number 2 you would like to use.
    Thanks in advance.

  • Fundamental question on EJB, JNDI and client jars

    Hi,
    This is a very fundamental question on EJBs and their clients - what
    all should go into the client jar of an ejb?
    I know for sure that just the remote and home interface classes of the
    ejb are sufficient on the client's classpath to work with an EJB on a
    totally different server, but I dont understand the logic behind it.
    If the client has to pass its object parameters over the network to
    the server where the ejb bean is located, should the container
    generated stub not be present on the client's classpath? After the
    client does the JNDI lookup of the ejb home on the server, how does it
    serialize and pass the parameters over the network if the container
    generated stub is not present?
    Any help would be greatly appreciated. Pointers to material on the
    internet which explain this/related things in detail would be a great
    help.
    Thank you,
    Anoushka

    hello,
    well, the process is fairly simple actually.. The client needn't necessarily have
    the container generated stub. as a client u could contact what is known as a boot-strap
    service to download the stub over the wire.. infact one of the advantages of RMI
    is precisely that. and since RMI is the underlying architecture of EJBs, it all
    becomes rather simple. when u 'lookup' a bean, what u are in essence doing is
    asking the server to send down the stub to your JVM. well.. right now this is
    what i got time for..i will try to post a lengthier explanation in a couple of
    days at leisure..
    Vijay
    "Anoushka" <[email protected]> wrote:
    >
    Hi,
    This is a very fundamental question on EJBs and their clients - what
    all should go into the client jar of an ejb?
    I know for sure that just the remote and home interface classes of the
    ejb are sufficient on the client's classpath to work with an EJB on a
    totally different server, but I dont understand the logic behind it.
    If the client has to pass its object parameters over the network to
    the server where the ejb bean is located, should the container
    generated stub not be present on the client's classpath? After the
    client does the JNDI lookup of the ejb home on the server, how does it
    serialize and pass the parameters over the network if the container
    generated stub is not present?
    Any help would be greatly appreciated. Pointers to material on the
    internet which explain this/related things in detail would be a great
    help.
    Thank you,
    Anoushka

  • Solution Manager - v3.2 - Fundamental Question

    Hi
    I have a fundamental SAP / SM question which I cant seem to actually clarify....
    Do ALL SAP servers in a SAP Infrastructure have to have a servername of 13 Characters?...
    When revieing the OSS it mentioned HOSTNAME...and it seems to use this interchangably with Computer Name...
    So, for example...
    Can I have a Solutions Manager server with a Netbios name of "SOLUTIONSMANAGE"  - 15 CHARACTERS and a SAP ECC Server with a server name also with 15 Characters......?
    The OSS and all the documentation refers to SAP Prereq of 13 Characters for the Host...but what is the host defininition in this case?..What does the 13 Character limit apply to? How do companies with Naming conventions longer than 13 Characters implement the landscape?
    Many Thanks!
    J

    Hi Oliver,
    Check out these URL's
    <u><b>Solution manager</b></u>
    http://help.sap.com/saphelp_sm32/helpdata/en/index.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.logon.redirect
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/biw/how to integrate bex web applications into sap solution manager.pdf
    http://www.sap.com/services/pdf/BWP_SB_SAP_Solution_Manager.pdf
    http://www.sapinfo.net/index.php4?ACTION=noframe&url=http://www.sapinfo.net/public/en/print.php4/article/Article-220903dbfa95a95bd1/en
    https://service.sap.com/solutionmanager
    http://www.sapinsideronline.com/spijsp/article.jsp?article_id=41229&volume_id=5577
    http://service.sap.com/roasmaps
    Regards,
    RK

  • Two Fundamental questions on UPGRADE/Patch

    Question 1.
    If i upgrade from 10.2.0.1.0 to 10.2.0.3.0, should i call this as an Upgrade or Patching?
    Question 2.
    If i upgrade(or patch) from 10.2.0.1.0 to 10.2.0.3.0, can i reverse theses changes and go back to 10.2.0.1.0?

    james_p wrote:
    You cannot downgrade the instance/databaseThanks Maran. But according to the following link (which Ying has suggested) 10gR2 can be downgraded back to 9.2.0.6.0
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14238/downgrade.htm#i1010243
    Just for clarification: You can only downgrade your database (without using a backup) if your COMPATIBLE setting is less than the default of "10.2". If it has been set to "10.2" there is no way of downgrading directly, then you need to restore from backup.
    If the COMPATIBLE parameter is still e.g. "9.2" then you can follow the instructions and basically - after performing the described steps - open the same physical database using a 9.2 instance.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Fundamental question on etherchannel hashing.

    Folks,
    I had some very basic questions on the way hashing takes place on Cisco switches connected to each other over a port channel.
    Considering that 2 links are used between the switch, namely port Gi 0/1 and Gi 0/2.
    1) By default I understand that this could be a L2 etherchannel or L3 etherchannel, the default mode of hashing is still the Source and destination MAC id, am I correct?
    2) So now if the source IP of 1.1.1.1 needs to reach to 1.1.1.2 how would the hashing calculation take place? Again I understand that this is on the basis of the last 3 bits from the IP address field. 001 and 010 come to 011 which is 3. So based on the number of ports it will select which interface to assign.
    I still do not understand what has the below output got to do with the selection:
    Core-01#sh interfaces port-channel 40 etherchannel
    Age of the Port-channel   = 204d:07h:40m:10s
    Logical slot/port   = 14/3          Number of ports = 2
    GC                  = 0x00000000      HotStandBy port = null
    Passive port list   = Te1/4 Te2/4
    Port state          = Port-channel L3-Ag Ag-Inuse
    Protocol            =    -
    Port security       = Disabled
    Fast-switchover     = disabled
    Fast-switchover Dampening = disabled
    Load share deferral = disabled
    Ports in the Port-channel:
    Index   Load      Port          EC state       No of bits
    ------+------+------------+------------------+-----------
     0      E4            Te1/4                 On   4
     1      1B            Te2/4                 On   4
    Time since last port bundled:    204d:07h:19m:44s    Te2/4
    Time since last port Un-bundled: 204d:07h:19m:54s    Te1/4
    Core-01#
    What does that load-value mean? and how is that calculated? and does that have a role to play in the selection of the port?
    Thanks,
    Nik

    Disclaimer
    The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.
    Liability Disclaimer
    In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.
    Posting
    So it looks like how to divide the bits is decided by the switch.
    Ah, yea, reread my original post for answer to your second question.  ;)
    An actual hashing algorithm can be rather complicated.  What they try to do is to "fairly" divide the input value across the number of hash buckets.  For example, if you have two Etherchannel links, they will try to hash the hash attribute such that 50% goes to one link and 50% to the other link.
    For example, assuming you hash on source IP, how do you hash 192.168.1.1, .2, .3 and .4?  A very simple hash algorithm could just go "odd"/"even", but what if your IPs were .2, .4, .6 and .8?  A more complex algorithm would try to still hash these IPs equally across your two links.
    Again, hashing algorithms can get complex, search the Internet on the subject, and you may better appreciate this.
    Because of the possibility of such complexity, one vendor's hashing might be better than another vendor's, so they often will keep their actual algorithm secret.
    No matter, though, how good a hashing algorithm might be, they all will hash the same attribute to the same bucket.  For example, if you're still using source IP, and only source IP, as your hash attribute, all traffic from the same host is going to use the same link.  This is why what attributes are used are important.  Choices vary per Cisco platform.  Normally, you want the hash attributes to differ between every different traffic flow.
    Etherchannel does not analyze actual link loading.  If there are only two active flows, and both hash to the same link, that link might become saturated, while another link is completely idle.
    Short term Etherchannel usage, unless you're dealing with lots of flows, is often not very balanced.  Longer term Etherchannel usage, should be almost balanced.  If not, most likely you're not using the optimal hash attributes for your traffic.

  • Fundamental questions on redo logs and rollbacks

    Hi all,
    Some basic questions, I really want to understand it very clearly.
    Suppose that we have updated few records in a table. We know that the blocks to be updated will be fetched into buffer cache, they will be updated with new value and commited eventually. The questions I have are ,
    1) What exact information will go to redo log ? is it a copy of the block before change and copy of the block after change ?
    2) What exactly goes to rollback segment? is it copy of block before change (for update) and just the rowid for inserted row and the copy of block for a deleted row ?
    3) Whatever we do, is it the whole block that goes to redo or rollback ? Means if there are 10 rows in the block and we update one of them, still whole block goes to redo or rollback ?
    4) If we rollback, what goes where ? Is there anything that goes to redo if we rollback ?
    Please explain.
    Thanks.

    Redo stores changes made in the database, and undo/rollback stores the reverse of those changes. Data blocks may be changed prior to a commit, and recorded in both locations.
    So, when a database is recovered, redo is applied to the backup datafiles, rolling every change forward, and then undo is applied to reverse any uncomitted transactions.
    Undo/rollback can also be used simply to roll back a transaction in an active instance. Redo is only used during instance recovery.
    I don't know if this is tracked via the storage of block images, or if it just stores the change itself.
    -cf

  • Nobody knows this fundamental question - CMP, CMT, BMP, BMT. Surprised !!

    Hello,
    I've talked to many experts and read books on EJB but none of them gave me a clear cut answers. What are the definitions of CMP, CMT, BMP and BMT? No one could explain "Persistent" from "Transaction" properly. No books clearly define them at all. Some say BMP means BMT and CMP means CMT. Some others say they are totally different concept. Others even say different stories. Actually, when we create EJBs (in Visual Cafe as an example), we can tell whether the bean is CMP or BMP but there os no place where we can define the transaction mode (BMT or CMT). How come do so many people get confused about this fundamental concept? Can anybody explain them clearly please?

    CMP = Container Managed Persistence
    This means that the container (part of the EJB Server) automatically handles persisting your bean to a DB. So if you have an Entity Bean, for example, that has some properties (like name, size) and a table in the database with the fields name (as a varchar), size (as an integer), then when you set the bean's properties to "Joe" and "14", you can then look in your database and those values will be there. You (the developer) do not have to write any code to put those values into the DB.
    BMP = Bean Managed Persistence
    This means that (in the above example of an EJB with properties name, size), if you set your bean's name to "joe" and size to 14, those values will NOT go into the DB unless you (the developer) put them there.
    CMT = Container Managed Transactions
    A transaction is really either one statement (or action) or a bunch of them that are grouped together. If it is a group, then for any one of them to be executed / committed, they must all execute successfully. If even just one of the actions / statements fails, they all fail (or are all "rolled back", i.e. un-done)
    CMT means that the container (EJB Server) will handle making sure that all the actions or statements from a transaction (i.e. a particular context of actions kicked off when an EJB is called) are completed successfully. If they are, the container will commit (execute) all the statements and return "success". If any one of them fails, the container will handle rolling back (un-doing) all the statements. This is VERY useful, as you do not need any special if statements or try-catches, the container does it for you.
    BMT = Bean Managed Transaction
    This means that you (the developer) will have to logically group together all that actions that you consider for a transaction. If any one of them fails, you will need to make sure all of them are rolled back and that "failure" is returned to the caller. If they are all successful, you will have to return success.
    You can do this by using the below code:
    (in all the code below, they may wrap from one line to the next, just pay attention to where the ";" is)
    //import Transaction
    import javax.transaction.UserTransaction
    //make a new transaction:
    UserTransaction userTran = ( UserTransaction ) initialContext.lookup("java:comp/UserTransaction");
    try
    //And then marking the beginning of the transaction:
    userTran.begin();
    //Then Do your stuff (i.e. the actions)
    myPersonalBusinessMethods();
    //commit the transaction cause it's all ok
    userTran.commit();
    catch (Exception e)
    //rollback (un-do) all the stuff cause error occurred
    userTran.rollback();
    Hope all this helped and finally explained it! Feel free to throw some duke dollars my way if it did! ;P
    Robert

  • Few fundamental Question- Project IMG and BBPs

    Dear All
    I have few basic question and will appreciate answers ,. points will be awarded as well.
    1. Is there any difference between Enterprise IMG and Project IMG ( or is there any thing such as Enterprise IMG exists in Solman).
    2. Can scope of project IMG be changed once it has been creted and saved. ( if yes then Steps plz)
    3.How to create BBP nodes in Solar02 based on Project IMG.
    Regards

    Hi Nayab,
    1. In simple terms, Project IMG is a sub-set of Enterprise IMG, based on what you scope in. It can also be a mirror image of Enterprise IMG (meaning - all entries can be included in Project IMG). If you go to SPRO transaction in the given satellite system (R/3, CRM ...), you'll find different icons in front of each IMG node, under Project IMG - that is to let you 'document' your activities. Enterprise IMG is the core or reference IMG that SAP provides out of the box.
    2. Yes. it can be changed. But, I am unable to list steps here
    3. By BBP nodes in SOLAR02, what did you mean ? I have heard the term BPP (Business Process Procedure) or BB (Business Blueprint). Can you elaborate please.
    Also, the whole topic of Project IMG Vs. Enterprise IMG is about the satellite system involved  and not on SolMan's own configuration.
    Regards,
    Srini

  • Fundamental Question...How does my Mac book pro choose an AP?

    Hi all,
    Setup: I have an n-type Airport extreme connected to my cable modem. I have it set to allow it to be extended and be b/g compatible. I then have 3 additional airport devices, all n-type, extending the network. These devices are ....
    Airport express
    Airport Extreme (second base station)
    Time Capsule
    Ok, so here comes my question. I can identify on my laptop which airpot mac address I am connected to. When I am sitting right on top of the time capsule, the laptop chooses one of the base stations half way across the house, with a fairly low RSSI. I have renewed the DHCP lease on the computer but it will not choose the Time Capsule..any one know why? Maybe there is a setting that I am missing specific to the Time Capsule?
    Thanks in advance
    Darnelld
    Message was edited by: darnelld

    Ok, so here comes my question. I can identify on my laptop which airpot mac address I am connected to. When I am sitting right on top of the time capsule, the laptop chooses one of the base stations half way across the house, with a fairly low RSSI. I have renewed the DHCP lease on the computer but it will not choose the Time Capsule..any one know why? Maybe there is a setting that I am missing specific to the Time Capsule?
    No, you're not missing any specific settings on your Time Capsule. The algorithm that Apple employs for a wireless client to "decide" which base station to connect to, as far as I know, has never been published to the general public so it would be hard to offer you any explanations to the rhyme or reason that they connect as they do. Logic would lead you to believe that the client would try to connect to either the nearest or the station with the strongest signal ... but as you can see, it doesn't always work that way.

  • One fundamental question: When users gets ceated in IDM from trusted recon

    I have a very basic question which I am not able to understand.
    When user accounts gets created in IDM from trusted recon, then the trusted recon resource object is not displayed in resource profile page of the user account. If we want to see whether the user account was created through trusted source or by manually by admin, then where can we see that?
    This information is stored anywhere in IDM DB which will distinguish user accounts created through trusted recon and those created manually in IDM?
    Please let me know if you are not able to understand my question.
    Thanks,
    Kalpana.

    You may be able to use the USR_CREATEBY field in the database. For an admin created user this should contain the USR_KEY value of the admin who created the user. I think for a reconciliation created user it may contain the USR_KEY of the OIMINTERNAL user.

  • Very simple question about DBMS_SCHEDULER jobs

    Hi,
    I have a scheduled job and its repeat interval is every 30 min for all hours.
    And also assume that my job is started at 11 am but it couldnt be completed till 11.30 am and it is finished at 11.45 am.
    What will be the scheduled execution on 11.30 am? It will start just after previous one finished?

    Create a table for testing:
    SQL> create table scheduler (starttime date, endtime date);
    Table created.
    SQL>
    Create a testing procedure:
    SQL> !cat wait_a_while.sql
    create or replace procedure wait_a_while(waittime IN int)as
      l_starttime date;
    begin
      select sysdate into l_starttime from dual;
      insert into scheduler (starttime) values(l_starttime);
      dbms_lock.sleep(waittime);
      update scheduler set endtime =(select sysdate from dual) where starttime=l_starttime;
      commit;
    end;
    SQL>
    Schedule a job every minute:
    begin
       dbms_scheduler.create_job(job_name=>'wait_a_while_job',
                                 job_type=>'PLSQL_BLOCK',
                                 job_action=>'begin
                                                martijn.wait_a_while(120);
                                              end;',
                                 start_date=>sysdate+1/(24*60),
                                 repeat_interval=>'FREQ=minutely;interval=1');
       dbms_scheduler.enable('wait_a_while_job');
       commit;
    end;
    Let this go for a while, and query the table:
    SQL> select * from scheduler order by starttime;
    STARTTIME            ENDTIME
    2013-DEC-14 14:59:59 2013-DEC-14 15:00:02
    2013-DEC-14 15:00:24 2013-DEC-14 15:01:24
    2013-DEC-14 15:33:09 2013-DEC-14 15:33:10
    2013-DEC-14 15:36:40 2013-DEC-14 15:38:40
    2013-DEC-14 15:38:40 2013-DEC-14 15:40:40
    2013-DEC-14 15:40:40 2013-DEC-14 15:42:40
    2013-DEC-14 15:42:40 2013-DEC-14 15:44:40
    2013-DEC-14 15:44:40 2013-DEC-14 15:46:40
    8 rows selected.
    SQL>
    So.....play around a little.
    But I would say that the next job waits until the first job finished.

  • Fundamental Question about Lightroom and saving images

    I have to laugh as I get ready to pose this question because I've been working with the program for two weeks with Scott Kelby's book and with Lynda.com, and I'm still profoundly confused about what is happening to the photo. To wit: I open a camera raw file in lightroom and start playing with it, even taking snapshots at various stages along the way. If I don't export the photo to Photoshop and save it there, what becomes of these changes? Do they stay with the photo always? Do they disappear when I shut down the program? There's no SAVE button with Lightroom which just plain flummoxes me! Can anyone 'splain this to me, please? Thanks.

    To clarify. Nothing happens to your originals. Lightroom stores the edits in a database (and if you wish alongside the original in a xmp sidecar file) as a set of instructions that the program uses to recreate the end product by following the instructions. These instructions are changed in the database while you're changing parameter values in Lightroom, so there is no need to save. Also, Lightroom stores a history of changes you did, so you can always go back. Both Lightroom and Adobe's camera raw plugin for photoshop can be used to follow the set if instructions. This way, you always get the highest fidelity image and you can always go back to your development choices without loosing any quality or having to dig up backups. Because of this, you can create multiple virtual copies with different development approaches without having to make a copy of the original and therefore saving you gobs and gobs of disk space. When you need a file for consumption such as a jpeg for a web page, simply export a copy, which burns in your development changes in a developed copy (just like printing a negative would have in the olden days) and trash the copy when you're done with it. You can always recreate it very quickly. This is a radically different approach than you're probably used to.

  • Four fundamental questions on Sequences

    DB version:11G
    Question *1* and *2*:
    To determine the current value of a Sequence i try
    SQL> SELECT  SEQ_SHP_HDR.CURRVAL FROM DUAL;
    SELECT  SEQ_SHP_HDR.CURRVAL FROM DUAL
    ERROR at line 1:
    ORA-08002: sequence SEQ_SHP_HDR.CURRVAL is not yet defined in this
    sessionI know that if i use
    SELECT  SEQ_SHP_HDR.NEXTVAL FROM DUAL;i can get CURRVAL from the sequence. But that will increment the sequence.
    So I tried looking at user_sequences.last_number . But user_sequences.last_number was showing 552 when the actual currval was 545 !
    Why am i getting the above error (SEQ_SHP_HDR.CURRVAL is not yet defined in this session) and how can one accurately determine
    the currval of a sequence without incrementing it using NEXTVAL?
    Question *3*.
    To Increment a sequence, one should use
    alter sequence <sequencename> increment by n ;Right?
    Do you guys use
    SELECT  <sequencename>.NEXTVAL FROM DUAL;to increment SEQUENCES?
    Question *4*.
    I was trying to increment a sequence. After the ALTER statement, the sequence didn't get incremented. I had to issue a NEXTVAL call to actually get this reflected. Why is this happening?
    SQL> select * from v$version where rownum=1;
    BANNER
    Oracle Database 11g Release 11.1.0.7.0 - 64bit Production
    SQL> CREATE SEQUENCE myseq
      2    START WITH 1
      3    NOMAXVALUE;
    Sequence created.
    SQL> select myseq.nextval from dual;
       NEXTVAL
             1
    SQL> alter sequence myseq increment by 7;
    Sequence altered.
    SQL> select myseq.currval from dual;
       CURRVAL
             1
    SQL> select myseq.nextval from dual;
       NEXTVAL
             8
    SQL> select myseq.currval from dual;
       CURRVAL
             8
            

    Steve_74 wrote:
    DB version:11G
    Question *1* and *2*:
    To determine the current value of a Sequence i try
    SQL> SELECT  SEQ_SHP_HDR.CURRVAL FROM DUAL;
    SELECT  SEQ_SHP_HDR.CURRVAL FROM DUAL
    ERROR at line 1:
    ORA-08002: sequence SEQ_SHP_HDR.CURRVAL is not yet defined in this
    sessionI know that if i use
    SELECT  SEQ_SHP_HDR.NEXTVAL FROM DUAL;i can get CURRVAL from the sequence. But that will increment the sequence.
    So I tried looking at user_sequences.last_number . But user_sequences.last_number was showing 552 when the actual currval was 545 !
    Why am i getting the above error (SEQ_SHP_HDR.CURRVAL is not yet defined in this session) and how can one accurately determine
    the currval of a sequence without incrementing it using NEXTVAL?You cant get the CURRVAL unless you execute the NEXTVAL alteast once in your session. And you cant use the user_sequences.last_number if the CACHE is enabled.
    Question *3*.
    To Increment a sequence, one should use
    alter sequence <sequencename> increment by n ;Right?WRONG!! You have actually altered the structure of your sequence. With ALTER comand you are actually setting the increment value. Here "n" sets the increment size. If set as 1 it will increment by 1. If set as 2 will increment by 2.
    Do you guys use
    SELECT  <sequencename>.NEXTVAL FROM DUAL;to increment SEQUENCES?YES that is the correct way to increment a sequence. Use NEXTVAL to increment a sequence.
    Question *4*.
    I was trying to increment a sequence. After the ALTER statement, the sequence didn't get incremented. I had to issue a NEXTVAL call to actually get this reflected. Why is this happening?
    SQL> select * from v$version where rownum=1;
    BANNER
    Oracle Database 11g Release 11.1.0.7.0 - 64bit Production
    SQL> CREATE SEQUENCE myseq
    2    START WITH 1
    3    NOMAXVALUE;
    Sequence created.
    SQL> select myseq.nextval from dual;
    NEXTVAL
    1
    SQL> alter sequence myseq increment by 7;
    Sequence altered.
    SQL> select myseq.currval from dual;
    CURRVAL
    1
    SQL> select myseq.nextval from dual;
    NEXTVAL
    8
    SQL> select myseq.currval from dual;
    CURRVAL
    8
    Answer for the question 3 answers this one as well!!

Maybe you are looking for

  • Chargeback 2.5 error in creating new Billing Policy

    When I attempt to create a new Billing Policy in vCenter Chargeback 2.5, I get the error "Insufficient number of resources in giving Flexible Billing Policy".  Can't find anything online about this error. Any help would be appreciated. Thanks

  • Web traffic report for one computer?

    We have a computer that is used by multiple people. The computer gets an IP via DHCP (so it can change.) Management wants a report of traffic for this computer. Is there some way to do this since we don't know what previous IPs it's had? Thanks.

  • No audio with BMCC CinemaDNG files

    Hi everybody. I'm importing my RAW footage into SpeedGrade in order to export it to an editable file (ProRes) and I have no audio. The Audio window is greyed out as well. The media has audio as I can hear it on other apps.

  • HT4527 I do not see the movie I downloaded?

    I downloaded a movie in iTunes and it is not appearing in downloaded area.

  • Bee_table element gets rendered multiple times

    Hi Everybody, i'm using a bee_table that holds a tableview an a treeview. For the tableview I implemented an iterator. Now the problem is, everytime the bee_table with its elements is rendered to string another table occurs on screen..... When i don'