How to reset all sequence to 0 or 1 at time?

Friends,
OS: RHEL AS 3
DB: 9iR2
I have some 187 sequences. i want to reset all the sequences to "0" or "1" at a time.
how can i do that?
i its a single sequence, then i will do the below...
for example if i have the x.nextval is 4
alter sequence x increment by -4;
alter sequence x increment by 1;
the above is only for x but i have x,y,z,.......upto 187 sequences...
how can i do that?
any triggers or procedures? or any quick method.
thanks

A similar situation: there are tables having a group_column with group_column_values having each it's own sequence to feed a sequence_column
Adding data requires the sequences to be reset to new maximum values (it's our development environment not production)
procedure reset_sequences(p_table_name in varchar2) is
/* sequence names are like: table_name || '_' || to_char(group_column_value)
  name_for_sequence varchar2(30) := upper(substr(p_table_name,instr(p_table_name,'.') + 1)) || '_';
  sql_for_sequence_max varchar2(250) := 'select group_column,max(sequence_column) the_max from ' || p_table || ' group by group_column';
  the_result sys_refcursor;
  local_group number;
  local_max number;
begin
  for the_row in (select sequence_name
                    from user_sequences
                   where sequence_name like name_for_sequence || '%')
    loop
      execute immediate 'drop sequence ' || the_row.sequence_name;
    end loop;
  open the_result for sql_for_sequence_max;
  loop
    fetch the_result into local_group,local_max;
    exit when the_result%notfound;
    execute immediate 'create sequence ' || name_for_sequence || to_char(local_group) ||
                      ' start with ' || to_char(local_max + 1) || ' nocache';
  end loop;
  close the_result;
end reset_sequences;Regards
Etbin

Similar Messages

  • How to reset all the entries wo exiting the program

    Hi How to reset all the entries from the third and last wrong entry and back to first entry wo closing program. It works with the first and second wrong entry, not for third wrong entry.
    Attachments:
    access.vi ‏59 KB

    The reset button does not work because when anything is entered in the operator field, and you press "reset", two events occur (1) a change is detected in the operator field and (2), a change in the reset is detected. Event (1) occurs first stopping the loop. The reset case is thus never reached.
    One solution would be to sense the reset state in the "operator" event. You need to keep the loop running if reset is pressed. (See attached modification.)
    Some other suggestions: Notice that I also made a data dependency between the case structure and the while loop. Without this, there is no guarantee that the case structure executes before the while loop and you might generate a race condition with unexpected results. I also re
    moved the timeout event, it doesn't seem to do anything. The three text fields should be set to "limit to single line" in this application so fields can be finished by hitting the enter key).
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    accessMOD.vi ‏65 KB

  • How to reset All users and delete their table?

    Hi,
    i want to know How to reset All users and delete their tables with username- system and password-manager.
    thanks

    Hi
    Here delete means truncate or drop?????
    If drop use the following statement to generate the script:
    select 'drop table ' || Owner || '.' || Table_Name || ';' from Dba_tables
    where owner in (<All_the_users_you_want_to_reset>);
    But before firing the above statement extract the DDL's to create all the users and put it in a file and just run that file to re-create the users.
    if its truncate then:
    select 'truncate table ' || Owner || '.' || Table_Name || ';' from Dba_tables
    where owner in (<All_the_users_you_want_to_reset>);
    Hope this Helps
    Regards

  • How to reset all data in BIApps 7.9.6.4

    Hi experts,
    I would to know how to reset the following data by using DAC 11g.
    1. OBAW.
    2. Change Capture Shema on Siebel DB.
    Best regards,
    Keita

    Using DAC->Tools->ETL Management->Reset Data source

  • How to reset all ldap users locale in ep7

    Hi all:
       We have ep7. Our ep7 ume is connected to Windows Active Directory.   However, all users's locale is empty. Can I reset all these user's locale to en, is there any place for configure the default locale in UME LDAP ?

    Hi
              Please check SAP Note Number: 684741.
    Cheers.
    Please award points for helpful answers.

  • How to reset all the indicators after the first run?

    I have quite a large application consists of several subvis, now I want to reset alll the output indicators after each run, how would I do that?

    On the Application Control palette, select Invoke Node. right click on it and select 'Select Class>VI Server>VI>VI'. Right click on it again and select 'Methods>Default Values>Reinitialize All to Default'.
    Message Edited by Dennis Knutson on 03-29-2008 10:28 AM
    Attachments:
    Reinit All.PNG ‏1 KB

  • How to reset all feeds in webbrowser?

    Hi.
    having an E51 with firmware 400.34.011 i have a few RSS-feeds added in the webbrowser, this worked very well until recentrly when i lost the internet connection  during feed update. the phone hang and i removed the battery.
    that was apparenty not a brilliant idea, now i cannot open feeds, they all say (translated): it is not possible to open this feed.
    Updating does not help, nor does it help to remove and add the feed, since the feed link is cached somewhere and picked up again  as soon as it is added (even under a different name).
    Question is, where is this information stored and how can i remove or reset it?

    Double click the text labels.

  • How to show all sequences in project folder in CC 2014?

    In previous CC version of premiere you could search the project folder for the term "Sequence" and if you were in list view all the sequences in the project would show in the folder they were in. This was great for finding a sequence created by dragging a clip into the timeline then forgetting to move the sequence where I normally store sequences in a "Sequence" folder.
    Now when I search for "Sequence" in CC 2014 nothing happens. Is there a new way to display all your sequences in the project?

    Ok yeah, I quit and restarted premiere and now it seems to be working again. Thx Ann

  • How to reset all Internet Explorer 8 settings for a different user profile?

    Sometimes users on locked down PCs that need their IE settings reset to resolved issues such as improper/old cached credentials stored in the browser after a password change etc.  These issues can be resolved by opening
    Internet Options, Advanced tab, Reset, Delete All, Reset.
    The users cannot do this because the Advanced Tab is hidden by policy.  If an administrator logs in with a different account, of course, anything they change is in their profile and not the user's profile.
    Is there some way for an administrator user to log in and access Internet Control Panel settings for a different user's Internet Options so they can reset the browser for a limited user?
    We need a more streamlined way to do this instead of needing to either blow away the user's entire Windows profile or else go through the convoluted process of getting the GPO admins to undo the group policy for one user to unhide the tab, have the help
    desk reset the browser for the user and then have the GPO admins reapply the original policy.

    You can try the following script
    Reset Internet Explorer all Setting to default using PowerShell Script
    http://gallery.technet.microsoft.com/scriptcenter/Reset-Internet-Explorer-20f838e7
    but this script still launches an interactive interface, you can ask in this form to improve the script to achieve an totally unattended process.
    The Official Scripting Guys Forum!
    http://social.technet.microsoft.com/Forums/scriptcenter/en-US/home?forum=ITCG
    You can create a task schedule to trigger the process. When computer starts or
     IE open , the script launches itself automatically.
    Schedule a task
    http://windows.microsoft.com/en-au/windows/schedule-task#1TC=windows-7
    Regards
    Yolanda
    TechNet Community Support

  • How to reset all items in a cluster

    I have bunch of items in a cluster that I would like to reset to "" (for
    strings) and 0 for numerics.
    Equivalent to memset in C.
    vishi

    Ok, I understand. The faster way of doing this is to define all the inputs such that the cleared value is also the default. You can then use an invoke node to call the "Reinitialize All To Default" method.
    Note that like property nodes, if you don't provide a vi reference to an invoke node it assumes you mean the vi it's installed in.
    To create an invoke node to do this: right-click on free-space somewhere in the diagram and select an invoke node from the function menu (look under "Application Control").
    After placing the invoke node on the diagram, right-click on the yellow part of it and select "Select VI Server Class>>VI". Finally, right click on the white part of the invoke node and select "Methods>>Reinitialize All To Default".
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • How to reset all setting on my iphone 4s? when i have done procedure for reseting my screen has gone and showing only apple logo and i taking very long time i cant off or on?

    i am trying to reset my iphone 4s with all original seting when i have done all procedure it has gone blank and showing only apple logo and i cannt off or on and not getting start.please advise/

    try holding the home and power buttons at the same time for about a minute!

  • How to reset all the icon spacing etc in Finder back to default?

    I have tried to set back to the default values but it's still isn't quite the same as before -- the horizontal spacing is correct but not the vertical one. Is there a way to reset the icon spacing as default?
    Thank you.

    John Guo wrote:
    Try this... Go to User Name>Library>Preferences. Locate the "com.apple.finder.plist" file. Trash that. Press optionesc. That brings out the force quit icon. Restart Finder. See if anything changes.
    Your not done... That will set the user defined defaults back to the Apple defined defaults. To get your folders to use the Apple defined defaults, open up a folder showing the wrong spacing and press Command-J to bring up the View Options window. At the bottom of the View Options window there is a button that says "Use as Defaults". Press the Option Key and the "Use as Defaults" button will change to "Restore to Defaults". Click the "Restore to Defaults" button and the folder will go back to the Apple defined default settings. You might need to Control-click on the window for the folder and select "Clean Up" to get things lined up. Good luck...

  • How to reset all the calendar events?!

    Hi everyone, two days ago i signed in into my iCloud account using a friend's mac computer, at tha sametime all my friend's iniformation was transfered to my iCloud account, now the problem is that i signed out and deleted my account of his computer and my iPhone still has all his information, including all his calendar events!!! and now i can't delete the events in my iPhone even if i use my iCloud account, i don't want to delete each event one by one. Please help me!!!

    Of course it transferred his data - what did you expect, it's a syncing service.
    If it has added separate calendars then you can control-click (Mac) the calendar and choose 'delete' or delete it on the iCloud website (select the calendar and click the delete button which appears).
    If there are cases where he has a calendar the same name as one of yours and the events have therefore been merged into that calendar you can only delete them one by one.
    The only other option arises if you have Time Machine and can restore iCal to a pre-mess stage. You will need to delete all the calendars off iCloud first, and when you restore them you will find the sync process promptly deletes them again, so you will need to follow the procedure outlined in this page:
    http://www.wilmut.webspace.virginmedia.com/notes/icloudtm.html
    Please follow the instructions absolutely exactly. All this will of course remove any events you've added yourself since the TM backup you are using.

  • How do I uninstall 178,210 personas that my daughter installed, I have no idea how she did this or how to undo all this mess. One at a time may take me several years, have any suggestions for more than one. Thanks

    My daughter has an addiction to computer and I thought she couldn't get thru my FoxFilter, never thought there was something she could mess up on Firefox itself. Every time I start my computer it runs and runs, and takes forever for anything to download. I understand why. I just don't know how to fix it. Since there are 178,210 of these personas been added to firefox. Thanks for your help.
    == This happened ==
    Not sure how often
    == Maybe alot was done on 7/30 or 7/31/10

    Did she install the Personas Plus extension (Tools > Add-ons > Extensions)?
    Firefox only keeps the last 8 installed personas by default.
    See [[Troubleshooting extensions and themes]]

  • How to get all changes from directory beginning from some time?

     

    Hi,
    If you make change one time means you can get old information by Restore method.More than one time means you can't get the info from the directory server.By better practice to take a backup for every day.

Maybe you are looking for