How to handle refreshing TEST schema with PRODUCTION schema ?

- we have database 10g ( standard edition), database name : ABC
- Schema name: ABC.PRODUCTION (which is our production schema)
- Schema name: ABC.TEST (which is our testing schema, where developers work)
Both the production & Test schemas exist in the same database.
Now once a week I wanted to refresh TEST schema with PRODUCTION data
Here is what I have been doing all these years:
=> Take a logical backup (EXPDP) of PRODUCTION schema (prod.dmp)
=> Drop user TEST cascade ( i don't need a backup of this TEST schema)
=> Create user TEST
=> Import PROD.DMP data into TEST schema
All the above 4 steps are being done manually.
Questions:
======
1. Is there any easier way of doing the above steps using some tool ?
2. Does Oracle enterprise manager which comes free with database installation (http://localhost:118/em)
has any utility or tool to do this job ?
3. I want everything to be refreshed (all database objects including data) ?
Thanks
John P
Edited by: johnpau2013 on Feb 23, 2011 4:32 AM

This is crazy. One inadvertent typo and you'll overwrite your Production schema. Plus, what happens if a developer 'tests' against the test schema and slows the Production database to a crawl.
I presume you know all about this, though and can't make the case to management. I hope it's not a business-critical Production database!
Anyway, your method is decent. I would advise against doing it automatically, to be honest, especially when your system is so precariously set up. But if you exist, you could use encapsulate all the steps into a script and use crontab to automate the process. I, personally, wouldn't use DBMS_SCHEDULER as you have to be careful with priorities and workload sometimes (at least in my experience) and you might end up having your export/import clash with other jobs in the system if you don't pay attention.
Here are the steps I would use:
Create a 'create user' script for the test schema based on dynamic SQL. That way you can be sure you have all the grants necessary for the user, in case things change.
Drop the test user (use EXTRA caution and be defensive when coding this part!)
Export the schema using FLASHBACK_SCN to ensure you have a consistent export
Run your 'create user' script to create the test user
Import the schema with a REMAP_SCHEMA option (use EXTREME caution with this!!!!)
Compile invalid objects
Compare objects and exclude any recycle_bin objects. Send an email alert if the object counts are different.
Compare invalid objects. Any objects which aren't invalid in Production should be flagged up if they're invalid in test.
Again, it's absolute insanity to have a test schema in a Production database. You absolutely must insist on addressing that with management.
Mark

Similar Messages

  • How to Synchronize Test Instance with Production database on regular basis.

    Hello
    How to Synchronize Test Instance with Production database on regular basis.
    I want to update my Test Instance with Production ERP on daily basis without downTime.?

    Hi,
    I recomend to configure physical standby database for your production and when ever you requir open standby Using a Physical Standby DB in Read Write Mode and Flashback DB, so that you can revert all the changes back and put the db in sync. Please follow below metalink notes.
    Business Continuity for Oracle E-Business Release 12 Using Oracle 11g Physical Standby Database (Doc ID 1070033.1)
    Business Continuity for Oracle E-Business Release 11i Using Oracle 11g Physical Standby Database - Single Instance and Oracle RAC (Doc ID 1068913.1)
    Business Continuity for Oracle Applications Release 11i, Database Releases 9i and 10g (Doc ID 216212.1)
    update my Test Instance with Production ERP on daily basis without downTime.?With zero down time is not possible I think.

  • How can I copy test plan WITH ITS RESULTS (PASS/FAIL) to other project in MTM??

    How can I copy test plan WITH ITS RESULTS (PASS/FAIL) to other project in MTM??

    Hi odedn,
    Thank you for posting in MSDN forum.
    Based on your issue, you mean that you want to copy the test plan with test results from the current team project
    to other team project, am I right?
    If yes, as far as I know that when we copy test plan with test results to other team proejcts. It is default that
    there just will not copy the test plan with test results (pass/fail) to other team project in MTM.
    You can refer the following MSDN document’s
    what gets cloned, it explained that which objects are copied from the source test plan to the destination test plan.
    Reference:
    http://msdn.microsoft.com/en-us/library/hh543843.aspx
    If you still want to this feature, I suggest you can
    submit this feature request:
    http://visualstudio.uservoice.com/forums/121579-visual-studio. The Visual Studio product team is listening to user voice there. You can send your idea there and people can vote. If
    you submit this suggestion, I hope you could post that link here, I will help you vote it.
    Thanks for your understanding.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to associate a test message with a change document

    I am using solution manager 7.01.
    accessing my change documents through the workcenter I need to create a new test message - so I use the Create transaction button on the button bar, Service Process, Test Message
    Then I am in the create test message screen.  However from here I cannot see how to associate my test message with either the change document that I was processing or to the maintenance cycle.
    Ideally I want to link the test message to the change document however at least to the maintenance cycle.
    How do I do this?
    Am I creating the test message in an incorrect way?
    regards
    Marina

    Anyone?  Does no one use Test Messages?

  • How to create  a test plan with specific transactions (or program)

    Hello,
    I'm a new user in Sol Man !
    How to create  a test plan with specific transactions (or program).
    In my Business Blueprint (SOLAR01) I've created in 'transaction tab' the name of my specific transactions and linked it.
    In my test plan (STWB_2) those specific doesn't appear to be selected !
    Thanks in advance.
    Georges HUYNEN

    Hi 
    In solar01 you have defined but you have to assign the test case in solar02 for this test case in the test cases tab.
    When you do so expand the business sceanario node in test plan generation of STWB_2 transaction and now that will appear.
    Also visit my weblog
    /people/community.user/blog/2006/12/07/organize-and-perform-testing-using-solution-manager
    please reward points.

  • How to handle abstract XML elements with XMLBeans

    Hello,
    I have an xsd that uses abstract elements, and i wanted to ask you how can i create new XML Documents with XMLBeans? My problems is that i don't know how to handle abstaction with XMLBeans.
    Let me show you a very simple example to make you understand my problem :
    Suppose we have the following schema :
    <xsd:schema targetNamespace="http://www.example.org" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.example.org">
         <xsd:element name="Customer" type="CustomerType" />
         <xsd:complexType name="CustomerType" abstract="true" />
         <xsd:complexType name="PremiumCustomerType">
              <xsd:complexContent>
                   <xsd:extension base="CustomerType">
                        <xsd:sequence>
                             <xsd:element name="CreditCard" type="xsd:string" />
                        </xsd:sequence>
                   </xsd:extension>
              </xsd:complexContent>
         </xsd:complexType>
    </xsd:schema>I use XMLBeans to create a jar with java classes according the xsd above. Then, in order to create a new xml document i use the following code :
    CustomerDocument cd = CustomerDocument.Factory.newInstance();
    CustomerType ct = cd.addNewCustomer();
    PremiumCustomerType pct = PremiumCustomerType.Factory.newInstance();
    ct.changeType(pct.schemaType());With this code i get an XML Document like the following :
    <Customer type="PremiumCustomerType" />But after that, i cannot add an element CreditCard into this Customer element. Can anyone help me?

    In Indesign there is no way you can directly work on the XML-IN footnote, since indesign won't support XML tags in footnote stream.
    To achive that you need to have XSLT/Perl/Indesign Scripting.
    This task is achievable, you can create a auto footnote for XML workflow projects.
    1. Create an XSLT to transform the footnote to the respective places
    2. Change all the "<" ">" to some standard names, since indesign won't accept XML tags in the footnote stream.
    3. Import it in indesign and using script convert it to autofootnote.
    Shaji

  • How to handle a glitch gracefully with client

    Any professional designers here, I could use some perspectives on how to handle a situation.
    Briefly: first time client, somewhat fussy but well-intentioned and nice to work with. I designed an annual report for them, process color, nice piece. The cover image is a color satellite image from NASA, and on the proof some slight horizontal banding appeared in one area that turned out to be a glitch in the printer's proofing device.
    I did some very slight color adjustments on the image and on the second proof some diagonal banding appeared in the same area. After discussing this with the prepress chief, I concluded again that this must be another proofing device issue. I did not see this banding on my monitor, so concluded it wasn't in the file.
    At the press check yesterday I was surprised to see the banding. I discussed it with the prepress chief again, he said he had noted it on screen the previous day and "thought that T---- was going to discuss it with you." To my knowledge nobody had contacted me (T---- was off that day).
    I have never stopped a print run before and was reluctant to do so now (everything else looked A1). This banding in one area of the image didn't seem catastrophic, just annoying to my fussy designer eye. A lot of people might not even notice it. Apparently, it's part of the original composite digital image NASA created.
    So the question is, how do I handle this with my client? When showing them the proof with the banding, I said "don't worry, this won't be on press."
    My professional sense is that I offer to correct the cover in Photoshop at no charge and have it reprinted (nothing has been trimmed or bound together yet--I've asked the printer to hold off on that). Do I wait and see if my client even notices? Do I point it out first thing?
    And with the printer, do I insist they reprint the cover gratis? Or do I share responsibility?
    If I had it to do over again I would've insisted on a perfect proof...I was just trying to keep things moving along and I trust this printer who I've worked with before (they do good work).
    Thanks for your perspectives.

    Thanks guys. I had a good chat with my printer rep. today, nobody pointed any fingers, they basically said they are willing to do whatever is necessary to make things right, except they indicated that they would charge for any additional prepress time. That seemed fair--I can do the Photoshop work and all they need to do is run a new proof and burn a single plate. I would cover that cost.
    Later in the day I met with my client and told them everything went fine except for one glitch--I asked if I could wait until after they'd reviewed the proof to reveal it, just to see if it was obvious. They good-naturedly went along (we have a good rapport) and could not spot the problem. When I pointed it out and explained what happened, I said I would be more than happy to fix it, no charge to them, just a little extra time delay in getting the final product.
    The person I work directly with felt it wasn't worth fussing over, but wanted to show it to the boss who wasn't in today. So I'll get a final answer tomorrow (he's the fussy one, so I'd say there's a pretty good chance he'll want a reprint).
    I feel it has been handled well by everyone to this point. Good learning experience for me.
    Thanks again for your input. Any further advice or comments welcome.

  • Need to refresh Test environment from Production

    Hi All,
    I need to refresh our Test environment from Production.
    Can anyone help me with the list of special tools from different vendors to do it?
    Any kind of help is appreciated.

    Hi Manoj,
    Thanks for your response. I am aware of the system copy.
    can you help me with some tools from different vendors that can be an alternative to system copy.
    we have categorized the task into 3 categories:
    Database restore
    Client Copy
    Special tools
    The third one includes tools from different vendors (for example: TDMS from SAP itself).

  • How to configure  a test sever with the system copy with prd data

    Dear All ,
    I need to configure  a test sever with the system copy with prd data.
    Please any one can suggest the step by step process to do the same configure and  system copy.
    Regards
    kumar

    Dear All,
    I am facing problem in system copy. I want to knoe the way after restore i  can move all the data and server data in one drive .
    Now the error is resolve by changing the initTAT.sap the value tape to disk but now stuck in the drive for restore it is asking which is not there at os level.
    BR0252E Function mkdir() failed for 'M:\oracle\TST\SAPDATA4\PRD33' at location
    BrDirCreate-1
    BR0253E errno 2: No such file or directory
    BR0252E Function mkdir() failed for 'M:\oracle\TST\SAPDATA4\PRD32' at location
    TO solve the above problem i have created ad network drive for this but once all the restore will be completed than how i can i move the data form network drive to on drvie.
    Please suggest
    Regards,
    Kumar
    Edited by: kumarmoh on Jul 21, 2009 1:43 PM

  • How can link the accosaries requirements with production planning

    "I am in cable manufacturing here i have a problem in  accessories requirements ( dies,Nozzles,Rollers,Embossing wheels etc )link with production planning,at the time of production than these material required for production   Can any body tell me how to link this ,accessories is not consubles "
    Thanks,
    Anurudh singh

    Yes you can use PRT for these requirments,
    Logistics - Production Process - Master Data - Production Resources/Tools - Production Resources/Tools - Equipment - Create.
    spro->production planning for process industries->master data->production resources/tools (PRT)
    you will see 5 transactions to configure your settings:
    -define PRT auth.grps
    -define PRT status
    -define Task List Usages
    -define PRT Group Keys
    -Define Overview Variant for Where-Used List/Mass Replacement

  • Replacement of Test Db with Production Db

    Hi,
    Can anyone tell me what I should expect to break when I replace our Test db with a new copy of the Production db?  Please note, I am NOT touching the Web db at all.  I noticed the first time I did this, the parts images no longer displayed on the website.  I am not sure why this was.  If I looked at the Media area for a part, the image filename was still there but the image would not display on the website until it was reselected and resaved.  I would not have expected this to happen.  Once we are ready to go live, are we going to have to reselect all of the images for each part again??  I cannot believe that would be the way this is going to work. 
    I guess, in short, what could possibly break on the website from simply restoring an updated SAP database so our test db which is synching with the web db is more aligned with the production data so we can continue to tweak things before going live?
    Thanks,
    David

    Hi James,
    As per your instructions, this is what I did this evening.  I made a backup of our Production database and restored it over top of our Test database.  I opened Synch Manager and did an Initialize, then a Synch.  When I opened the website, the images were again missing.  If I go into a part under the Admin - Catalog area, the part still had the Additional Image link but the Image Path itself had been cleared out.  All of our images are in the //assets/catalog/parts folder as you noted they should be.
    Any other ideas why we would lose the main images?  As I mentioned before, we need to get this resolved while we are still in our testing phase - we cannot afford to lose all of the image links once we switch the database to go live.
    Thanks,
    David

  • How do I refresh a table with a bind variable using a return listener?

    JDev 11.1.2.1.0.
    I am trying to refresh a table with a bind variable after a record is added.
    The main page has a button which, on click, calls a task flow as an inline document. This popup task flow allows the user to insert a record. It has its own transaction and does not share data controls.
    Upon task flow return, the calling button's return dialog listener is invoked which should allow the user to see the newly created item in the table. The returnListener code:
        // retrieve the bind variable and clear it of any values used to filter the table results
        BindingContainer bindings = ADFUtils.getBindings();
        AttributeBinding attr = (AttributeBinding)bindings.getControlBinding("pBpKey");
        attr.setInputValue("");
        // execute the table so it returns all rows
        OperationBinding operationBinding = bindings.getOperationBinding("ExecuteWithParams");
        operationBinding.execute();
        // set the table's iterator to the newly created row
        DCIteratorBinding iter = (DCIteratorBinding) bindings.get("AllCustomersIterator");
        Object customerId = AdfFacesContext.getCurrentInstance().getPageFlowScope().get("newCustomerId");
        iter.setCurrentRowWithKeyValue((String)customerId);
        // refresh the page
        AdfFacesContext.getCurrentInstance().addPartialTarget(this.getFilterText());
        AdfFacesContext.getCurrentInstance().addPartialTarget(this.getCustomerTable());But the table does not refresh ... The bind variable's inputText component is empty. The table flickers as if it updates. But no new values are displayed, just the ones that were previously filtered or shown.
    I can do the EXACT SAME code in a button's actionListener that I click manually and the table will refresh fine. I'm really confused and have spent almost all day on this problem.
    Will

    Both options invoke the create new record task flow. The first method runs the "reset" code shown above through the calling button's returnListener once the task flow is complete. The second method is simply a button which, after the new record is added and the task flow returns, runs the "reset" code by my clicking it manually.
    I'm thinking that the returnListener code runs before some kind of automatic ppr happens on the table. I think this because the table contents flicker to show all customers (like I intend) but then goes back to displaying the restricted contents a split second later.
    Yes, the table is in the page that invokes the taskflow.
    Here are some pictures:
    http://williverstravels.com/JDev/Forums/Threads/2337410/Step1.jpg
    http://williverstravels.com/JDev/Forums/Threads/2337410/Step2.jpg
    http://williverstravels.com/JDev/Forums/Threads/2337410/Step3.jpg
    Step1 - invoke new record task flow
    Step2 - enter data and click Finish
    Step3 - bind parameter / table filter cleared. Table flickers with all values. Table reverts to previously filterd values.

  • How to handle the current row with radio button selection???

    Hi Everyone,
    I have one ADF page with one table and one "Find" button.
    I have created one new attribute with VARCHAR2(1) in the VO and dragged that attribute as first column in the table. And changed that first column to Radio Button to select only one row at a time.
    Upon clicking on the "Find" button i need to get the values of current selected row.
    How can i get the values of selected row?
    What code should i write to get the values of selected row in Method Binding of "Find" button?
    Any suggestions will be really useful.
    Thanks.

    Hello Kumar,
    I have some comments on your case.
    >
    I have created one new attribute with VARCHAR2(1) in the VO
    >
    1- You should create this attribute in the Entity object and then add it to the view object.
    2- Do you need that only one radio button is set at a time for all rows ? If yes then you need to handle the case when the user set more than one row and clear the value of the attribute for all other rows.
    >
    How can i get all the values of current row in backing bean method(method binding of Find method)?
    can u plz provide me the code for that?
    >
    If you mean by the current row is that the row with its value of the selected attribute is set (the radio button is set for that row), then you can write a method in the viewObjectImpl class and expose it to client interface and call it from your bean.
    here is an example based in Department table in HR schema.
    //This method is written in DepartmentsViewImpl   
    public Row getSelectedRadioRow(){
                //create a second row set to not impact the row set used in ADF
                RowSet duplicateRowSet = this.createRowSet("duplicateRowSet");
                //get the current row of the table to set it back after re-executing the VO
                DepartmentsViewRowImpl currentRow = (DepartmentsViewRowImpl)this.getCurrentRow();
                Row[] filteredRows = duplicateRowSet.getFilteredRows("IsSelected", "1");
                DepartmentsViewRowImpl row=null;
                if(filteredRows.length>0){
                    row = (DepartmentsViewRowImpl)filteredRows[0];
                    System.out.println("Department Name " + row.getDepartmentName());              
                this.setCurrentRow(currentRow);
                duplicateRowSet.closeRowSet();
                return row;           
            }

  • How to handle multiple inbound interfaces with WSDL messages

    Hi All,
    We have a synchronous: Abap Proxy -> XI -> WebService Scenario. The webservice has multiple SoapActions e.g. SearchForProduct_WithX, SearchForProduct_WithY each with different message types. We have tried to use the receiver determination to send the request to the correct soapaction using conditions e.g. if field X in the request is populated use SearchForProduct_WithX action/message.
    But when we run it through the proxy we get this error:
      <CODE>IF_DETERMINATION.TOO_MANY_IIFS_CASE_BE</CODE>
      <ERRORTEXT>Multiple inbound interfaces not supported for synchronous calls</ERRORTEXT>
    Does anybody know how we can get around this or how best to deal with the multiple soap actions per wsdl situation.

    Hi Yaghya,
    We have used conditions in the Interface Determination. Interestingly if we use an HTTP sender adapter we can use this configuration ... but once we try and use ABAP proxies we get the previous error.
    Another related question ... when we use the http adapter we get a connection time out exception. Same thing happens if we try and use the wsdl tester at /wsnavigator but we can open the wsdl through the browser. Any idea on this one?
    Thanks for all your help.

  • How to handle multiple xmls(schemas) using java

    Can anyone give me solution for the below issue.
    We are handling five types of xmls(five different xsds) in our application.We have the XML and its XSD in database. Currently we are using JAXB to create and update the xmls.
    In future there is a chance to add new schema. In that case our current code will not work (because the JAXB is tightly coupled with the xsds) for new schema. Is there any technology or method to handle this situvation?
    I am looking for early respons.
    Thanks
    Dhans

    You have no idea? Then look in your JavaMail download and you will find several sample programs that you can use to get started. It would also help to read the JavaMail FAQ (Google will find it easily for you).

Maybe you are looking for

  • Signing a secure pdf

    I am trying to sign a PDF file in Acrobat 8. When I click sign, all of the items in the drop down are greyed out except getting started. I checked the security preferences of the PDF and it showed that signatures were allowed. I have a signature crea

  • How to recover TNSNAMES.ORA file

    Hi, im using Oracle 8i 8.16 database running on win2k server. Im getting a an error whenever i try to connect to the databese using the DBA Studio program - the error was "ORA-12154:TNS:Could Not resolve service name". I noticed that the TNSNAMES.ORA

  • Pros and cons between the large log buffer and small log buffer?

    pros and cons between the large log buffer and small log buffer? Many people suggest that small log buffer (1-3MB) is better because we can avoid the waiting events from users. But I think that we can also have advantage with the bigger on...it's bec

  • Music player not working in 7210 supernova

    In Nokia 7210 supernova the music player is not working. It says "not enough memory" I have done all factory restores also but still not working...

  • Exporting only document/stage area

    I'm redoing a flash file that someone else created. The person included content that goes outside the stage area. And I don't want to include that content. I just want to export the material that is within the stage. (In other words the "white" area