Help on alter sequence

hi friends needed help immediately can we use the statement to alter a sequence value
ssss is a variable
EXECUTE IMMEDIATE 'ALTER SEQUENCE abcd_SEQ MAXVALUE '||ssss||'';
very urgently

EXECUTE IMMEDIATE 'ALTER SEQUENCE abcd_SEQ MAXVALUE
'||ssss||'';Why did you put quote after variable?
It'll work if you create statement like:
  EXECUTE IMMEDIATE 'ALTER SEQUENCE abcd_SEQ MAXVALUE ' || ssss;

Similar Messages

  • Changing the nextval of a sequence using alter sequence

    Hello experts,
    Is there any option to modify the nextval of a sequence using alter sequece command?
    Thanks in advance.
    J.Prakash

    Hi
    I do not think so there is any direct way to modify the nextval of a sequence, only workaround i can think of is firing two DDL
    alter sequence dumm increment by 10
    alter sequence dumm increment by 1Where first alter command would increment the nextval to (currentvalue + incement value) and second alter command would reset the increment to its original value in my case 1
    Regards

  • Patch 3480000 install - Failed worker   ALTER SEQUENCE

    Dear All,
    I am in the process of installing Patch 3480000 (11.5.10.2) and during the running workers 1,3 fail and this the part of worker 1 log :
    The sequence IEM_ACCOUNT_TAG_KEYS_S1 in the database is defined as:
    MINVALUE = 1 MAXVALUE = 2000000000 INCREMENT BY = 1
    CYCLE = NO ORDER = NO CACHE = 20
    which should be defined as:
    MINVALUE = 10000 MAXVALUE = 2000000000 INCREMENT BY = 1
    CYCLE = NO ORDER = NO CACHE = 20
    Alter the sequence with :
    Start time for statement below is: Fri Apr 29 2011 14:51:14
    ALTER SEQUENCE IEM.IEM_ACCOUNT_TAG_KEYS_S1 MINVALUE 10000
    AD Worker error:
    The following ORACLE error:
    ORA-04007: MINVALUE cannot be made to exceed the current value
    occurred while executing the SQL statement:
    ALTER SEQUENCE IEM.IEM_ACCOUNT_TAG_KEYS_S1 MINVALUE 10000
    AD Worker error:
    Unable to compare or correct sequences
    *     because of the error above*
    Thanks&BR
    Tarek

    Hussein
    _ this  I did:_*
    **SQL> select IEM.IEM_TAG_KEYS_S1 .nextval from dual;**
    **NEXTVAL**
    **10001**
    **SQL> alter sequence IEM.IEM_TAG_KEYS_S1 increment by 1000;**
    **Sequence altered.**
    **SQL>**
    and this part from screen out put:_+
    **ATTENTION: All workers either have failed or are waiting:**
    **FAILED: file iemsvrp.odf on worker 1.**
    **ATTENTION: Please fix the above failed worker(s) so the manager can continue.**
    **Fixed: file iemsvrp.odf on worker 1 for product iem username IEM.**
    **Restarted: file iemsvrp.odf on worker 1 for product iem username IEM.**
    **FAILED: file iemsvrp.odf on worker 1 for product iem username IEM.**
    **ATTENTION: All workers either have failed or are waiting:**
    **FAILED: file iemsvrp.odf on worker 1.**
    **ATTENTION: Please fix the above failed worker(s) so the manager can continue.**
    and this from log file:+_
    **The sequence IEM_ENCRYPTED_TAG_DTLS_S1 in the database is defined as:**
    **MINVALUE = 1 MAXVALUE = 2000000000 INCREMENT BY = 1**
    **CYCLE = NO ORDER = NO CACHE = 20**
    **which should be defined as:**
    **MINVALUE = 10000 MAXVALUE = 2000000000 INCREMENT BY = 1**
    **CYCLE = NO ORDER = NO CACHE = 20**
    **Alter the sequence with :**
    **Start time for statement below is: Fri Apr 29 2011 17:10:15**
    **ALTER SEQUENCE IEM.IEM_ENCRYPTED_TAG_DTLS_S1 MINVALUE 10000**
    **AD Worker error:**
    **The following ORACLE error:**
    **ORA-04007: MINVALUE cannot be made to exceed the current value**
    **occurred while executing the SQL statement:**
    **ALTER SEQUENCE IEM.IEM_ENCRYPTED_TAG_DTLS_S1 MINVALUE 10000**
    **AD Worker error:**
    **Unable to compare or correct sequences**
    **     because of the error above**
    Thanks hussein
    please advise
    Tarek
    Edited by: user11973469 on Apr 29, 2011 5:17 PM
    Edited by: user11973469 on Apr 29, 2011 5:18 PM

  • ALTER SEQUENCE on a busy server results in unexpected very high values

    Our sequence was at 782,393,232 or so, when I bumped it up by 30,000. Here's the commands I used:
    alter sequence OUR_SEQ increment by 30000;
    select OUR_SEQ.nextval from dual;
    alter sequence OUR_SEQ increment by 1;
    commit;
    When I queried the sequence's nextval a few minutes later, it had jumped to over 8 billion !?! I quickly reset down to 783 million or so, and it behaved propertly after that. I've seen a couple of posts on the net that infer that resetting a sequence while it is being heavily used can cause "unpredictable results". Has anyone else experienced this or is there a known bug ?
    I'm running :
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit, RAC system.
    PL/SQL Release 10.2.0.4.0 - Production
    "CORE     10.2.0.4.0     Production"
    TNS for Linux: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production

    Justin Cave wrote:
    Sven,
    I'm not sure that I understand what you're clarifying...
    In a RAC cluster, a sequence with a cache has a separate cache in each node of the cluster. If the cache was set to 20 (the default), and the increment was set to 30,000, each node would cache 20 values each separated by 30,000. And the caches would be non-overlapping (i.e. node A would get the 20 values from 1 - 570,001, node B would get the 20 values from 600,001 - 1,170,001). I don't see that this is at odds with what I posted.
    Obviously, the presence of a cache creates a bit of a wrinkle with when, exactly, you say that a sequence is incremented. The NEXT_VALUE in DBA_SEQUENCES is incremented by cache*interval when any node exhausts its cache. The NEXTVAL of a sequence for connections that are hitting a particular node will increase by interval each time some other session gets the NEXTVAL of a sequence. The NEXTVAL of a sequence for connections on a different node is unaffected by what is happening on the current node. Is that the clarification you're making? If so, I agree.
    user11300030,
    The discussion on sequence caching may provide some insight into why none of the rows are between 780 million and 1 billion. It's entirely possible that those values were cached on a node other than the node where the inserts were run. Had the caches not been flushed when you altered the sequence, inserts run on those other nodes might have used the values from that range.
    JustinWe do have two nodes and the sequence cache size was 100, so what you suggested in your last paragraph makes sense.
    Also, I just ran an AWR report and noted that "select our_seq.nextval from dual" was called 280K times (Hibernate is a hungry beast).

  • How to alter sequence?

    hello gurus,
    i have a sequence like this
    CREATE SEQUENCE  seq_idea
      START WITH 6
      MAXVALUE 9999999999
      MINVALUE 1
      NOCYCLE
      NOCACHE
      NOORDER;i want to change the start with as 100 ,can any one tell me how to alter sequence
    regards,
    friend

    most wanted!!!! wrote:
    hello gurus,
    i have a sequence like this
    CREATE SEQUENCE  seq_idea
    START WITH 6
    MAXVALUE 9999999999
    MINVALUE 1
    NOCYCLE
    NOCACHE
    NOORDER;i want to change the start with as 100 ,can any one tell me how to alter sequence
    regards,
    friendDrop it and recreate it with the appropriate start with value.

  • How to alter sequence next number

    Can we alter sequence next number. I want to start it from minval.

    To restart the sequence at a different number, you must drop and re-create it.
    If you change the INCREMENT BY value before the first invocation of NEXTVAL, some sequence numbers will be skipped. Therefore, if you want to retain the original START WITH value, you must drop the sequence and re-create it with the original START WITH value and the new INCREMENT BY value.
    Oracle Database performs some validations. For example, a new MAXVALUE cannot be imposed that is less than the current sequence number.

  • Altering sequence to start from 0

    I have a sequence for auto-incrementing a value. Each day I want that sequence to restart, meaning to start from 0 again. So I did a job in which I tried deleting the sequence and re-creating it. Someone told me that instead of deleting-recreating a sequence I can use alter sequence to make the sequence start from 0 again but as I read, the alter sequence cannot do that. as I read:
    ALTER SEQUENCE [schema.]sequence
    [INCREMENT BY integer]
    [MAXVALUE integer | NOMAXVALUE]
    [MINVALUE integer | NOMINVALUE]
    [CYCLE | NOCYCLE]
    [CACHE integer | NOCACHE]
    [ORDER | NOORDER]
    there is no option to change start from.
    Does anyone knows if that can be actually done?
    As I figured it's not possible to alter the sequence to start from 0 again I can do a job in oracle to delete and create the sequence again. The thing it it's not working. If I do a job and say:
    execute immediate 'drop sequence name_seq'; and execute it, it works, it deletes the squence but if I further write:
    execute immediate 'create sequence name_seq ' ||
    'start with 1 ' ||
    'increment by 1 ' ||
    'nomaxvalue ';
    it doesn't do it anymore. I get no errors but the sequence is not created. can anyone give me a hand here? 10x a lot in advance

    there is no option to change start from.
    Does anyone knows if that can be actually done?ensure that noone other works with sequence and:
    alter sequence seq increment by -(current_value);
    select seq.nextval from dual;
    alter sequence seq increment by 1;
    execute immediate 'drop sequence name_seq'; and
    execute it, it works, it deletes the squence but if I
    further write:
    execute immediate 'create sequence name_seq ' ||
    'start with 1 ' ||
    'increment by 1 ' ||
    'nomaxvalue '; Looks OK, can you do that from jus SQL prompt?
    >
    it doesn't do it anymore. So it did a while ago? What has been changed?
    Gints Plivna
    http://www.gplivna.eu

  • Alter sequence value

    Hai all.,
    im trying to import data from one database table(A) to other database table(B)
    and almost all the fields in the two tables are same.
    if i try to import the data from A to B.Im gettin problem with sequence
    Can anybody help me on this....
    Note :Table B has some values before importing values from A to B
    and both the tables have sequences.
    Thanks In Advance...

    im trying to import data from one database table(A) to other database table(B)You are not being clear. Are you using the import utility to bring data from one insatnce of a table into another instance of the same table (i.e. t1 @a.world vs [email protected])? Or are you trying to run a SQL insert statement to bring data from one table into a different table within the same database instance?
    The fixes are different in each case.
    Cheers, APC
    Blog : http://radiofreetooting.blogspot.com/

  • Help with Sort sequence and reset preferences

    Hi,
    I have checked the "sort" checkboxes and the "sort sequence" in my first 5 columns of the sql report. The sequence are straight 1,2,3,4,5.
    I have also create two buttons. The first one that will trigger a pl/sql that would execute RESET_USER_PREFERENCES built-in package, and a second button that just submit. The page submit to itself by default.
    It appears that the Reset Preferences does not follow the "sort sequences". Take a look at: http://htmldb.oracle.com/pls/otn/f?p=15031:2:
    Check what happen with the second column OBJECT NAME: I expect to see CUSTOM_AUTH first and then CUSTOM_HASH second once you Reset User Preferences. Interesting is that when I just press the refresh button, then i get what I want, but i think that is just coincidence as there is not guarantee that the data are going to be displayed in that order once you start deleting and inserting in the middle.
    Any help in order to understand the "sort sequences" concept is appreciated.
    Thanks

    Anybody?

  • Cs3- Help with Image sequence *ghosting* ?

    Hi guys- newbie here that needs a little help. 
    Check out the attached screenshot of a paused .mov I put together.  What type of things/settings can cause this?  How do I make an exported image sequence play as a smooth succession of sharp and CLEAR images?
    Thanks for your insights/time!
    Mike

    Here is an illustration of what might be happening. This is shown as it would appear on separate Video Tracks, in A-B Roll editing, as an example.
    If the Duration of a set of Clips is shorter than the Duration of a Transition, then PrPro will have to "create" frames to allow for the Handles of the Transition(s).
    If your Transitions are a full one sec. and your FPS = 24, the Transitions will take up 12 Frames per Clip. As each Clip has half of two Transitions, the Clip needs to be slightly longer than the 2 halves of the Transitions. Since you cannot edit to less than a single Frame, the Clips need to be at least 24 Frames and I'd look at 25 Frames long, or PrPro will create extra Frames from the first and the last Frames in the Clip - in your case the still frames that are repeated.
    Hope that this helps and also cures your problem,
    Hunt

  • Help creating browse sequences that work and deleting sync TOC

    Hi,
    I'm using the latest version of the TCS with RH 9.0. I'm trying to create WebHelp Pro output
    for a book produced originally in Framemaker. I've been following Rick's Skinny on skins
    guide to tailor the look and feel, but am having real problems getting my browse sequence
    to work. I've used Tools> Browse Sequence Editor and then Auto-create using Frame TOC,
    selected the TOC from the drop-down list and chosen 4  as the depth that I want to browse.
    The TOC that appears in Browse sequences  is strange and doesn't represent the Frame TOC that
    appears in the html, I left this 'as is'. Once I've generated the ouput the sequence browsing works
    for the equivalent of top-level heading only. What am I doing wrong and what should I
    be editing to make this fully functional?
    I would also like to delete the Sync TOC from the toolbar, and it seems to be possible to
    delete the image but not the entire field. I know it can be done, because Peter Grainge's
    RH site doesn't have it. Between Peter and Rick I will somehow achieve this website for
    my company...
    Many thanks in advance for any ideas and help.
    Best wishes,
    Karen

    Hi all
    @Jeff - In WebHelp output a Browse Sequence is presented using the arrows that sit in the Navigation Mini-Toolbar. I've documented some of it at the link below:
    Click here to view
    @Karen - Are you wanting one single sequence that works to allow the user to traverse the TOC from top to bottom or bottom to top? If so, the way you do this is by creating one very long sequence in the Browse Sequence Editor. You might begin by specifying 0 as the level to use when auto creating. Normally that will be sufficient. However, it depends on your TOC as to how well that may actually work.
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7, 8 or 9 within the day!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • Help on counter (Sequence number generation)

    Hi all,
    Need to ask smething about the counter to generate the sequence numbers and pass it to the target field.
    If we use the Global containers, then say if the app server goes down, the current count will also vanish. Am I correct?
    So thats the case, then we should use the DB lookup for the same?
    Also, the INDEX function in the Statistics part in the GUI of Message Mapping, how much that is helpful?
    Respond back at the earliest possible.
    Thanks in advance.
    Neetesh

    Hi,
    just one point about your sentence: <i>If we use the Global containers, then say if the app server goes down, the current count will also vanish. Am I correct?</i>
    For me you are wrong, if your application server shut down during your mapping execution, then you will <b>NOT</b> have an inbound message for your target system, because your system is stopped. And you will have a red flag inside SXI_MONITOR.
    Mickael
    one question: what is the direction/sense of your flow? "XI -> ZZ" or "ZZ -> XI" ?
    Message was edited by: Mickael Huchet

  • Help me in sequence number generation

    hi
    i had written a JSP which reads and displays the all the directories in that pertucular folder
    when i click on a perticular folder it should read each and every file in that folder and it should rename it with a sequence number
    i.e file0001,file0002,file0003 etc....
    the sequence should be reset for each folder and if i add some new files in to diretory it should remember last sequence number and it should assign next number onwards to those files.
    at any point of time i may move or deete any file
    but each and every foler i should keep track of last sequence number assigned so that next onwards i can reame new files from that number
    another constraint is i may delete the files in that directory
    i am new to java
    so PLZ help me how effeciantly i can write a program
    if so PLZ provide me an example
    thanks in advance

    when i click on a perticular folder it should read
    each and every file in that folder and it should
    rename it with a sequence numberShould the files in the underlying file system be renamed or is this "renaming" just an abstraction layer you maintain yourself? In that case you can use JTree of Swing to maintain an own file structure on top of the OS. You just map "your" filenames to the real file names underneath.

  • Need Help with Clip/Sequence Settings

    Okay so I have a video with three or four sequences and all the clips are from the same tape and camera. The only problem is that about 2 or 3 clips in one sequences have black bars on the top and bottom of them (letterboxed?), only when they are on that sequence. So, I could take these clips that are i letterboxed in sequence 2, put them in sequence 1, and they are normal, no longer letterboxed. Please help, I have no idea what to do, and have been trying to fix it for hours.

    Okay I just fixed it by going to that clip in the browser and un-checking anamorphic, even though every other clip has it checked?
    Maybe someone could clear this up?
    Thanks

  • Help importing PNG sequence

    So I believe I have successfully accomplished importing PNG
    sequences before more than once. However, this time around, I'm
    losing my mind. I just successfully rendered a PNG sequence out of
    Adobe After Effects CS3, roughly 130 images, and I'm attempting to
    import all of them as a sequence to FlashCS3. However, when I do
    this, every image is duplicated with a graphic, and the graphics
    are about 50x larger than the original PNG size. I cannot figure
    out what I am doing wrong, I've never come across this problem. If
    anyone has any advice, please let me know; it will be greatly
    appreciated.
    I also wanted to know how to move the position of images or
    movie clips on multiple key frames at one time. If that makes
    sense. As this PNG sequence for example.... If I don't like the
    position of the sequence, I have to manually click each key frame,
    and move the selected position... any help.
    Thank you
    Austin
    [email protected]

    Please disregard this post... I have found a solution. Thanks
    for taking the time to read this post.

Maybe you are looking for

  • Importing animated gif into layout

    I have a regular FW layout that I exported as an HTML to open up in Dreamweaver, and use as a homepage. Everything works fine. But now I would like to add an animated GIF that I created in FW, to the page, but I'm not really sure if it is possible. I

  • Message no. KO104

    i am entering the incoming invoice under vender number 1016. and when i enter the costs on the car05. order.but in the FB60 when i select variant Z_WITH COST CENTER i acnnot find the"Order", so when i finished fill other blanks without "Order" and se

  • Planning question metadata set vs. group

    Trying to figure out if I should just stay with a single metadata set and then multiple metadata groups. For example, say there are two different assets b-roll and finished shows. (neither are uploaded from projects but one at a time as single clips)

  • Window automatically opens when I log in - don't want it to.

    When I log into my admin account on my 2009 iMac, almost always my home folder opens up. What setting, either in the Finder preferences or the System preferences (or for that matter anywhere elsc) can I change to NOT have the window (or for that matt

  • SRM RFC users for ERP , what are the profile/roles should be used?

    Hi All, I have integrated SRM and ERP systems using config wizard. Multiple rfc accounts were created automatically by the wizard but what i did was i skipped on the profile and role field because i don't know what to put. Now, I am battling on what