How to create rollback statements automatically

Hi People
I need to write a script which can generate the ROLLBACK statements for the IMPLEMENTATIONS(Create table, view, index, package, trigger etc Insert table, update table, delete table, Grant etc - which means that implementation could be anything) .
Is there is anyway that I can create or generate corresponding ROLLBACK statements for each statement that i exceute on my database?
Basically there could be a list of operations that I will do and later on I would like to bring the database back to where it was prior to the implementation.

Welcome to the forum!
Whenever you post provide your 4 digit Oracle version (result of SELECT * FROM V$VERSION).
>
Is there is anyway that I can create or generate corresponding ROLLBACK statements for each statement that i exceute on my database?
Basically there could be a list of operations that I will do and later on I would like to bring the database back to where it was prior to the implementation.
>
You could use Oracle's FLASHBACK DATABASE funtionality. See Using Flashback Database and Restore Points in the backup and recovery doc
http://docs.oracle.com/cd/E11882_01/backup.112/e10642/flashdb.htm
Chapter 16 of that doc shows how to do it - Performing Flashback and Database Point-In-Time Recovery
http://docs.oracle.com/cd/B28359_01/backup.111/b28270/rcmflash.htm

Similar Messages

  • How to create sales order Automatically with reference to contract?

    how to create sales order automatically through batch or online? can anyone please suggest what needs to be change in SAPMV45A program?

    Hi,
    Wt am able to understand from the above question is, you want to create automatic sales order against contract on a day to day basis by doing batch program, hope am wright.
    See you can do it in two ways.
    1. By using BDC, in SHDB T code record how exactly you will do transaction and then give it to your abaper rest he will do. he will write a program and he will schedule that program every day night.
    2. By using BAPI. Just check in there are many threads are there which gives sales order bapi. Tell your abaper to map that bapi and tell them to schedule back ground job.
    Hope this will help out in solving your problem.
    Regards,
    Nagesh

  • How to create Oppertunity doc automatically after lead in CRM SALES

    Hi,
    how to create oppertunity doc automatically after creating lead in crm sales
    Thanks7regards
    kishor kumar

    Hi Kishore,
    Create SAP Business Workflow for Opportunity from Lead 
    Use
    A lead is a business transaction that describes, stores, updates, and manages the potential business interests of a business partner, and the interactions based on this over a period of time. The goal is to provide the "sales" area with the information gained in the lead, in order that it can be used as a basis for deciding whether to create an opportunity.
    The information gathered in the lead is transferred to the "sales" area via the workflow "create opportunity from lead".
    In the workflow, you decide whether the opportunity is generated manually or automatically.
    If the lead-specific attributes Priority and Lead group fulfill specific criteria, the workflow automatically generates an opportunity. Otherwise, the workflow sends a work item to the sales employee responsible, for manual creation. Once he has checked the data in the lead, the sales employee can either reject this lead or create an opportunity from it.
    The workflow is automatically started when the lead is saved.
    The sales representative entered in the lead is first taken as the sales employee whose task it is to create the opportunity based on the information in the lead. This person can be determined using partner determination in CRM, depending on the prospect in the lead, and can, for example, be a manager of a sales area. If no sales representative is entered, the workflow takes an organizational unit assigned in the workflow template, and sends the work item to all users assigned to the organizational unit.
    Prerequisites
    u2022     The type linkage for the start events AttributeChanged and SetErrorFree for the workflow WS10001011 are deactivated as a standard procedure, and, if you wish to start the workflow template, they have to be activated again in Customizing. The workflow task processors must also be maintained. In Customizing, choose Customer Relationship Management  Basic Functions SAP Business Workflow  Perform Task-Specific Customizing.
    u2022     The workflow template uses the user statuses SAAC (accepted by sales) and SARE (rejected by sales) of the status profile CRMLEAD. If you have defined several user statuses, the data flow for task TS10008154 (set status) must be adapted accordingly.
    u2022     When the opportunity is created, the workflow template uses the opportunity transaction type OPPT. If you have defined several transaction types for the opportunity, the data flow for task TS10008151 (create opportunity) must be adapted accordingly.
    u2022     If the sales employee rejects the lead, the workflow resets the qualification level to value 02 (warm). If you have specified your own qualification levels in Customizing, you need to adapt the data flow for task TS10007918 (change qualification level) accordingly.
    Process of Workflow WS10001011 (create opportunity from lead)
    The workflow "create opportunity from lead" is started when a lead is saved with qualification level Hot and status Error-free. The system uses the lead-specific attributes Priority and Lead group to check whether an opportunity can be automatically created, or a sales employee first needs to decide. If the sales employee decides that an opportunity can be created, the lead status is set to "accepted by sales", and an opportunity is created in the background. If necessary, this is forwarded to the sales employee to check. If the sales employee rejects the lead, the lead status is set to "rejected by sales", and the initiator is informed by mail.
    The workflow is ended if no opportunity is created and
    o     the lead is deleted or
    o     the qualification level of the lead is changed to a value other than Hot or
    o     the status of the lead is changed to a value other than Error-free.
    Path for the workflow:
    ==> SPRO
    ==> Customer Relationship Management
    ==> Basic Functions
    ==> SAP Business Workflow
    ==> Perform Task-Specific Customizing
    Select the Application Componenet  Abbrevation as CRM and expand
    Select CRM-BTX and expand
    Select CRM-BTX-LEA and click on Activate event linking  and acivate workflow WS 10001011
    It may helps you
    Regards
    Narayana

  • How to creat Process messages automatically through PI sheet saved?

    How to creat Process messages automatically through PI sheet to the Process message destinations.

    Hi Jessie,
    When you process instruction category PROD_3 in master recipe, the process message PI_PROD is created.
    After releasing process order, you have to create control recipe. Upon successful creation of control recipe, process instructions will get generated. Check the error log for control recipe creation for error if any. 
    Note that control recipe will be generated only with order status "Released".
    You have to sent this control recipe to process control (CO53).
    Hope it is helpful.
    Regards,
    Sachin

  • How to create credit note automatically after PGR?

    Hello SD Gurus,
    Client's Business Process: Return Order (ZRE, ZPOR, ZARE, and ZMTR) is created with reference to billing document number and item category used for this order type is REN or ZREN. After the order is created, they do PGR (Return Delivery Type is LR) and then credit memo is created "manually". So, the issue with this process is that it is very time consuming and a lot of manual intervention is required.
    To-be Process: The requirement is to create credit note "automatically" after the PGR is done to reduce the manual intervention and expedite the process. If item category is REN, then credit note will be created with invoice value. If item category is ZREN, then credit note will be created with Zero Value.
    How should I write code in the user exit MV50AFZ1?
    Regards,
    Mohammed Anwar

    Hi
    Apart from Lakshmipathi's suggestion you can share the below logic with your ABAPER. There are two BAPIs we use to create billing automatically. Check whether you can call these BAPIs in userexit you have mentioned in your post.
    CALL FUNCTION 'BAPI_BILLINGDOC_CREATEMULTIPLE'
    * EXPORTING
    *   CREATORDATAIN         =
    *   TESTRUN               =
    *   POSTING               =
            TABLES
              billingdatain         = billingdatain
              conditiondatain       = conditiondatain
    *   CCARDDATAIN           =
    *   TEXTDATAIN            =
    *   ERRORS                =
              return                = return3
              success               = success
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
            EXPORTING
              wait = 'X'.
          READ TABLE return3 WITH KEY type = 'E'.
          IF sy-subrc = 0.
            record-inv_rem = return3-message.
          ENDIF.
          WAIT UP TO 2 SECONDS.
    *      READ TABLE return3 WITH KEY type = 'E'.
    *      IF return3-type = 'E'.
    *        WRITE:/ return3-message.
    *      ENDIF.
          READ TABLE success INDEX 1.
          CLEAR: vbeln_vf.
          vbeln_vf = success-bill_doc.
        ENDIF.
    Thank$

  • How to create active state or current state in spry menu ?

    i have build a vertical menu with spry menu widget, Just
    wondering if any one can guide me how to create an active state or
    current state in the menu.
    I want the visitor to understand which page they are on, so
    just want to change the colour of the active link.

    <helpful but self-serving too>
    There are several ways to do this, but the easiest way, if I
    may say so,
    is to use my divaGPS Extension. It works with virtually any
    menu type
    and is designed to accomplish precisely what you are asking
    for quickly
    and easily.
    </back to our regularly scheduled programming>
    E. Michael Brandt
    www.divaHTML.com
    divaPOP : standards-compliant popup windows
    divaGPS : you-are-here menu highlighting
    divaFAQ : FAQ pages with pizazz
    www.valleywebdesigns.com
    JustSo PictureWindow
    JustSo PhotoAlbum

  • How to create the Batch Automatically during creation of Production order

    Hi All,
    I wanted to create the Batch Automatically for the Specific order type during creation.
    Not for all order type so OPKP transction will not work for me.
    Please suggest any way or user exit any production order.
    Thanks,
    Amit Shah

    Hi All,
    Thanks for your inputs.  
      1. Why we want create the Batch Auto -
          For Std Production Order type we want to generate Batch Automatically.
          For Re-work Production Order type we don't want Batch Created Auto.
          If you have better solution please let me know.
    2.  Scheduling profile.
          I think I misunderstood your solution.
          You want to say that mainatin the Schd profile in the SPRO with repect to Sub Schdler.
          Already client is maintaining the Schd Profile in the Material Master.
           please correct me if i am wrong.
    Thanks,
    Amit Shah

  • How to create foreign key automatically?

    I am writing to seek help, in regards creating foreign key automatically, when I insert data into my ''price'' table.  I have 2 tables, one called prices and names.  the relationship between them, if that one name can have many prices and one price
    can have many names (many-to-many). Hence, i have junction table called  "Name_Prices", as shown below in the sample database schema:
    Names
    name_id [pk]
    name
    type
    UploadDate
    Prices
    Price_id [pk]
    name_id [fk]
    price
    uploadDate
    Name_Prices
    name_id REFERENCE names (name_id)
    price_id REFERENCE prices (price_id)
    PRIMARY KEY (name_id, price_id)
    The  price's data input comes in as CSV file everyday. (please see the example below) :
    name name_type price UploadDate
    ALBA MBS 93.5 17/10/2014
    ALESC Trup 58 17/10/2014
    ALESC Trup 52 17/10/2014
    My desire goal/output is to be able to create a functionality, where I can insert the price's data into the database (''prices''), it will automatically insert foreign key in the price
    table (from the names table), and if there is a new price's name, then the database will create a new name id for it, in the name's table, transferring the name, its type, from the CSV input data. 
    In order to achieve this task, where would I start implementing this logic?(in SQL server or application-side) what steps does this involve and is this task achievable, all in sql server side (i.e. store procedure, functions etc..). 
    Apology in advance, if the question is not clear to understand, i happy to follow up with further questions, if required.  
    Any help would be very appreciated. Many thanks

    As noted above, I modified the design:
    Products
    Product_id [pk]
    Product
    type
    UploadDate
    Prices
    Price_id [pk]
    price
    uploadDate
    Product_Prices
    Product_id REFERENCE Products (Product_id)
    price_id REFERENCE prices (price_id)
    PRIMARY KEY (Product_id, price_id)
    Note
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Database Design
    New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014

  • How to create result state target in DC

    Hi,
    Currently i am able to create the result state for the callable object in Development Component.. But after adding the callable object into Guided Procedure, I'm not able to define the Target for the result state as there is no dropdown list control for me to select. (e.g. if success, target to Action A.. if failure, target to Action B)
    May i know how can i code the target state in development component, so that when i add the callable object i am able to define the target..
    Thanks,
    Cindy

    Hi Cindy;
    Could you explain your problem in detail.
    If you want to bring in a result in a webdynpro CO add the follwing codes in the getdescription Method in the interface controller.
    IGPCOResultStateInfo resultStateSuccess     = technicalDescription.addResultState("RESULT_NAME_FAILURE");
              resultStateSuccess.setNameKey("FAILURE_KEY");
              resultStateSuccess.setDescriptionKey("FAILURE_DESCRIPTION_KEY");
    And the following code in the complete method in the component controller
    IWDTextAccessor textAccessor = wdComponentAPI.getTextAccessor();
              IContextElement contextElement = wdContext.currentContextElement();
              IGPExecutionContext executionContext = contextElement.getExecutionContext();
              try
              executionContext.setResultState("Failure");
                             executionContext.processingComplete();
              catch(GPInvocationException e)
                   String localizedMessage= textAccessor.getText("ERROR_SETTING_PARAMETERS");
                               wdComponentAPI.getMessageManager().reportSuccess(e.getMessage());
              catch(GPEngineException e)
              String localizedMessage = textAccessor.getText("INTERNAL_ERROR");
    I hope this will solve your problem.
    Kindly let us know the result
    Regards
    Sivaprasath

  • How to create a state view / alert view hosting more than one class?

    We have an applications which has two type of servers: one is connector server while another one is processing server. So I created two classes for each of them: ConnectSrvClass and ProcessSrvClass. Each of the class has a property "Type" to mark
    what kind of server it is.
    Now I want to create ONE SINGLE state view to display the state of both classes. Samething I want to create ONE SINGLE alert view to display alert coming from either type of the servers. Is it possible? If so, how?
    Thanks!

    Create an instance group, and then scope the view based on that group. This will work well for an alert view, but not as well for state view. If you want state view with multiple classes using same seed, then you can select the server role as base for
    those classes and display state of each in a single view. This is
    explained here.
    Jonathan Almquist | SCOMskills, LLC (http://scomskills.com)

  • How to create Alpha Channel automatically?

    I have a folder containing about 100 TIFF files, each containing an intricate shape against a transparent background.
    I need to create an Alpha Channel in each one which replicates the transparent background.
    Is there a way to do this "automatically" with Photoshop 7.0.1 (the only version I have access to) under MacOS X 10.4.11?

    Record into an action and batch: select layer transparency, save selection as alpha channel. Watch your matting though, as it sounds like these files will be flattened and any feathering in the alpha channel will leads to a fringe of [white? black?]. You could tuck in the alpha channel mask a bit before you save. It depends on the final usage...

  • How to create sbconfig.jar automatically?

    Hi All,
    I have a osb project in SVN(subversion).what i want is to check out the osb project from SVN and create sbconfig.jar ,and than deploy this jar to OSB server...
    But i want this whole process to be automated.. ie using script...
    does any one how idea how can i do this?
    Regards
    Rohan

    Hi Rohan,
    OSB is configuration based product hence you may not be able to build jars using artifacts like .proxy and .biz files. Scripts work only in conjunction with server.
    You may refer -
    Create sbconfig.jar for OSB project using script
    Regards,
    Anuj
    Edited by: Anuj Dwivedi, TCS on Jul 22, 2010 12:32 PM

  • How to create Delivery Note automatically after realising SO in VKM3

    Hi,
    I've realesed a Sales Order in VKM3 that was blocked by credit limit.  I would like Delivery Notes/Orders to be automatically created once the Sales Order have been released.  Is there any kind of configuration that has to be made so that this can happen?
    Thanks for your help!

    Did you try in T.code VOV8, in the sales document type by setting value A in the immediate delivery field.
    Note that this will impact all the sales orders, even those orders not going into credit hold.
    Regards,

  • How to create stored procedures automatically when creating new company

    I need to create a method in our add-on Business One application that will create stored procedures at the time we install the add-on (when the new company is created).  Where would I store the SQL scripts, and what SAP Business One commands do I need to use to build the stored procedures into the new company database? Can someone give me an example of how to do this?  We are coding in C#, but an example in visual basic would also be helpful if no one out there in forum land uses C#   
    Thanks,
    Nancy Walk
    [email protected]

    Hi Nancy!
    Of course are there people here that use C#
    To solve your problem, create a routine in your add-on that checks at startup if the stored procedures are present. If they are not, create them. You can use the DI-API, or just add them directly to your database.
    <i>Note: SAP does not like it when you play around directly in the SAP databases, and does not supply support for databases that are changed manually. You'd better use the DI-API...</i>
    Hope it helps...
    Grtz, Rowdy

  • How can I rollback a automatic update

    I have Thunderbird installed on a OpenSuse computer and it recently did a automatic update that changed some features that I need. Is there a way to roll back the update?

    The full and partial updates (whether it be Thunderbird, Firefox or SeaMonkey) from mozilla.org are only provided to the official builds and not builds built yourself or by a third-party.
    The openSUSE and other Linux distro provided builds have their own ways of package updates in their package manager.
    However if the poster is using Thunderbird for Linux from http://www.mozilla.org/en-US/thunderbird/ (64-bit Linux is on ftp) then those preferences would be valid and work.
    Nothing is being gutted as it has been this way since forever with third-party builds whether on Windows, Mac OSX and Linux.

Maybe you are looking for