Table level refresh in oracle from prod to test or development database

Hi,
one interviewer asked me the below question, what is the best answer.
suggestions appreciated.
1.How did you deal with that situation?Consider if you have a repeated requirement to "refresh" just 30 tables in a particular schema from a production environment into a development environment.  What steps would you follow to get those tables? What things would you consider doing in the database to make this process easier in the future?
2. You have an Oracle 10.2.0.4 database set up on Unix. The application is on a Windows server. The system is generally OLTP but with major batch jobs run over the weekend when the users are offline. On Monday morning the users in 2 of the 3 major remote sites that access the application are complaining of general slowness, like the system is hanging at periods and it seems to be taking 7 or 8 times as long to process their transactions and some sessions have been disconnected. There have been no major changes to these environment components (Unix server, application server, network, WAN, etc.). You are not sure if there have been any changes to the application code as the team involved in rolling out module changes are offline; however that team should be following a change management process and recording their changes, and no such changes have been recorded. You are the support DBA in charge of this environment and have a high priority ticket in your queue due to this slowness. Can you describe what you would investigate from start to finish to try and establish where this problem lies?
Thanks
Prakash
Edited by: user12287006 on Dec 3, 2009 7:39 AM
Edited by: user12287006 on Dec 3, 2009 7:55 AM

Hi,
1) We need to check the total size of these 30 tables, if they are very huge I would make sure that these 30 tables resides in same group of tablespaces along with no other tables residing there. And then i would use transportable tablespace to clone the tables. If they are small yes i would do exp/imp or expdp/impdp through the read to run scripts.
2) Since you mention that batch jobs were run during weekends, I assume there are chances that my explain plan were changed (if stats are being gathered) or the current explan plan is not appropriate given the condition that the batch jobs have done huge insert/update/delete. In this case I would prevent gathering stats and would lock the stats.
If this is not the case then i would check if user is facing issue with a particular application or entire application in general. If it is entire application in general, i would compare awr report for some events like SQL*Net message from/to client for network issue, db sequential/scattered read for io issue. Assuming these both are not the cases, then i would check if the application works fast if there is caching of some table required by OLTP and not by batch process that moved out of buffer during the weekend. The later issue would get resolved after some time in Monday morning. But when I realized if this is the issue then I would have some mechanism to bring them again in cache after next weekend batch jobs.
Regards
Anurag

Similar Messages

  • Migrate DRM application from PROD to TEST environment

    How I can migrate all DRM application from PROD to TEST environment. The first way this is using migrate utility and then create all export/import utility. But this way does not give 100% guaranty of identity the PROD and TEST environment.
    As relation database I am using Oracle DB. Can I migrate DRM application using exp/imp utility for oracle users (MDM and MDM_DB) and after that changing information directly in oracle tables in the TEST environment?

    This response is not timely but others may find it useful...
    You can use the Oracle database export and import processes, but there are several additional steps in the process. In general this is a high risk endevour that should not be attempted by the faint of heart. (See #3 below!) Attempt at your own peril.
    1) Make a copy of the Username table so that you have the Test versions of the encrypted passwords for DRM internally managed accounts. These will need to be updated post import if there are any differences.
    2) After you delete the tables in Test, it's best to create them with the install scripts prior to import because once an Oracle table containing a blob datatype has a stored value the Oracle import is no longer tolerant of changes in target tablespace names for all tables containing blobs within that schema. (Known bug) However, the create tables install script has an insert statement or two that need to be commented out or the import will create duplicate rows that will cause errors enabling constraints.
    3) After the import completes all exports and books need to be modified to no longer point to production target locations, especially for exports to database tables! Ideally this step would be completed and QA'd prior to starting the application server; however, the application server must be running if the migration utility is going to be leveraged to propagate these updates so the process I use is to lockout all users until this step is completed.
    4) Also note that if the Prod and Test app servers are not using the same authentication settings the system preference needs to be changed or the application server may not start.

  • Need to insert selected records from PROD into TEST

    I am trying to insert all records (for a specific region only) from production to test.
    I'm a little confused about how the pl/sql would look for this.
    Note that as I insert into the table in test, I also have a key field that is auto incremented by 1 each time.
    The problem that I am having is I need to link two tables in PROD together to determine the region:
    So in test, I want to do something like:
    INSERT INTO ACCOUNT_PRICE
    (select * from ACCOUNT_PRICE@PROD, MARKETER_ACCOUNT@PROD
    where substr(MARKETER_ACCT_NO,1,1) = '3'
    and MARKETER_ACCOUNT_NO = PRICE_ACCOUNT_NO);
    However, i'm not sure if this is correct or if I should be using a BULK insert.
    Note that I cannot just load the whole table as I need to restrict it to only one region of data.
    Any help would be appreciated.
    Sean

    Direct load (BULK) is irrelevant to what you are asking. I would strongly suggest that you read the docs about this feature before considering it for any purpose.
    As to your question what you are asking is unclear and, for reasons known only to you, you did not include a version number.
    So given that I get to invent your version number I have decided you have 10g and therefore you have DataPump so my recommendation is to use
    DataPump to extract and export the records you wish to move.
    http://www.morganslibrary.org/reference/dbms_datapump.html

  • Table level supplemental logging

    How is table level supplemental logging different from Database level supplemental logging? Is Database level supplemental logging required for enabling table level supplemental logging?
    I have done 3 test cases, please suggest!
    Case 1
    Enabled only DB level supplemental logging(sl)
    observations--->
    DML on all tables can be tracked with logminer.
    I find this perfect.
    case 2
    Enabling only table level supplemental logging
    Setting---->
    2 tables ---AAA(with table level sl) & BBB (without table level sl)
    Only DDL is recorded with the help of logminer & few of the operations are listed as internal.
    case3
    Enabling database level sl first & then enabling table level sl only on one table --->AAA & no table level sl on BBB
    observation---> All the tables DDL & DML are getting tracked--point is if this is getting the same result
    as DB level SL, what is the significance of enabling Table level SL? or am I missing something?

    I have the same experience: when database level supplemental logging is enabled, adding supplemental logging at the table level does not affect functionality or performance.  Inserting 1 M rows into test table takes 25 sec ( measured on target database ) with table level supplemental logging, and 26 sec without it.  My GoldenGate version is 11.2, Oracle database version 11.2.0.3.0
    If someone can show the benefit of having table level supplemental logging in addition to database level logging, I would very much appreciate.

  • Schema level and table level supplemental logging

    Hello,
    I'm setting up bi- directional DML replication between two oracle databases. I have enabled supplemental logging database level by running this command-
    SQL>alter database add supplemental log data (primary key) columns;
    Database altered.
    SQL> select SUPPLEMENTAL_LOG_DATA_MIN, SUPPLEMENTAL_LOG_DATA_PK, SUPPLEMENTAL_LOG_DATA_UI from v$database;
    SUPPLEME SUP SUP
    IMPLICIT YES NO
    -My question is should I enable supplemental logging table level also(for DML replication only)? should I run the below command also?
    GGSCI (db1) 1> DBLOGIN USERID ggs_admin, PASSWORD ggs_admin
    Successfully logged into database.
    GGSCI (db1) 2> ADD TRANDATA schema.<table-name>
    what is the deference between schema level and table level supplemental logging?

    For Oracle, ADD TRANDATA by default enables table-level supplemental logging. The supplemental log group includes one of the following sets of columns, in the listed order of priority, depending on what is defined on the table:
    1. Primary key
    2. First unique key alphanumerically with no virtual columns, no UDTs, no functionbased
    columns, and no nullable columns
    3. First unique key alphanumerically with no virtual columns, no UDTs, or no functionbased
    columns, but can include nullable columns
    4. If none of the preceding key types exist (even though there might be other types of keys
    defined on the table) Oracle GoldenGate constructs a pseudo key of all columns that
    the database allows to be used in a unique key, excluding virtual columns, UDTs,
    function-based columns, and any columns that are explicitly excluded from the Oracle
    GoldenGate configuration.
    The command issues an ALTER TABLE command with an ADD SUPPLEMENTAL LOG DATA clause that
    is appropriate for the type of unique constraint (or lack of one) that is defined for the table.
    When to use ADD TRANDATA for an Oracle source database
    Use ADD TRANDATA only if you are not using the Oracle GoldenGate DDL replication feature.
    If you are using the Oracle GoldenGate DDL replication feature, use the ADD SCHEMATRANDATA command to log the required supplemental data. It is possible to use ADD
    TRANDATA when DDL support is enabled, but only if you can guarantee one of the following:
    ● You can stop DML activity on any and all tables before users or applications perform DDL on them.
    ● You cannot stop DML activity before the DDL occurs, but you can guarantee that:
    ❍ There is no possibility that users or applications will issue DDL that adds new tables whose names satisfy an explicit or wildcarded specification in a TABLE or MAP
    statement.
    ❍ There is no possibility that users or applications will issue DDL that changes the key definitions of any tables that are already in the Oracle GoldenGate configuration.
    ADD SCHEMATRANDATA ensures replication continuity should DML ever occur on an object for which DDL has just been performed.
    You can use ADD TRANDATA even when using ADD SCHEMATRANDATA if you need to use the COLS option to log any non-key columns, such as those needed for FILTER statements and KEYCOLS clauses in the TABLE and MAP parameters.
    Additional requirements when using ADD TRANDATA
    Besides table-level logging, minimal supplemental logging must be enabled at the database level in order for Oracle GoldenGate to process updates to primary keys and
    chained rows. This must be done through the database interface, not through Oracle GoldenGate. You can enable minimal supplemental logging by issuing the following DDL
    statement:
    SQL> alter database add supplemental log data;
    To verify that supplemental logging is enabled at the database level, issue the following statement:
    SELECT SUPPLEMENTAL_LOG_DATA_MIN FROM V$DATABASE;
    The output of the query must be YES or IMPLICIT. LOG_DATA_MIN must be explicitly set, because it is not enabled automatically when other LOG_DATA options are set.
    If you required more details refer Oracle® GoldenGate Windows and UNIX Reference Guide 11g Release 2 (11.2.1.0.0)

  • Name the table or View in oracle for Package information

    Please provide me the name of the table or view in oracle from where the names of all packages are available along with their associated procedures or functions..........if not exists then do inform a way to do it

    select distinct name, referenced_name  from user_DEPENDENCIES  where referenced_type = 'PACKAGE'
    order by 2;This also can help you get the list of sub-objects of a user defined packages. but it will list only those procedures/funtions etc of a package which has been referenced by other database object. So it may not give the full list of all the member objects of a package..
    select *  from user_DEPENDENCIES  where referenced_type = 'PACKAGE'
    order by referenced_name;This will give you all the database object information accosiated with user defined packages.

  • Duplicate database from prod environment to test environment.

    hi,
    Am trying to Duplicate the database from Production RAC Envrionment to Test RAC Environment.
    Am following the metakink Document: How To Restore Rman Backups On A Different Node When The Directory Structures Are Different [ID 419137.1]
    When am restoring the backup from prod in Test environment am getting the following error.
    ORA-19870: error reading backup piece /rman2/stage/backup_of_PROD_21047_07_04_2011_1
    ORA-19504: failed to create file "+DG1"
    ORA-17502: ksfdcre:4 Failed to create file +DG1
    ORA-15055: unable to connect to ASM instance
    ORA-00020: maximum number of processes () exceeded
    ORA-15055: unable to connect to ASM instance
    ORA-00020: maximum number of processes () exceeded
    Please help me out in this.
    with regards
    A.Aravind

    Pl post details of OS and database versions on the source and target.
    RMAN Duplicate Failing With ORA-19870 ORA-19504 ORA-15012 ORA-17502 ORA-15080 (Doc ID 417074.1)
    Srini

  • Export java code out of database?  difference between Prod and Test

    Hi all,
    I'm a seasoned DBA, but I have never really dealt with Java, so this is all new to me. Within one of my test databases (10.2.0.3.0), I have a database package - within the package is a procedure that has this Java call:
    language java name 'com.clinapps.pmd.etl.interfaces.forecasting.itemtrial.helper.SSFItemOutboundPMDHelper.processSSFItemInterface()';
    This Java code goes and exports a file to .xml format. The basic problem is that in our Test environment, there is a problem in the xml file that gets generated - the second line is missing the first few characters. However, in all of our other environments, including Production and Validation, it all works fine - the xml file is good. What has me confused, is that we've done several database refreshes, where we export from production, then import it down to test. So from everything I'm looking at, the schema is exactly the same - but something is different, causing the issue in the xml file that is being generated. I was wondering if I could get into the database and export the Java code, then that is something where I could confirm if there's a difference or not, from Prod to Test.
    Does anyone have any input/feedback on how to do this? I've been googling, and tried several methods, including dbms_metadata.get_ddl, and DBMS_JAVA.EXPORT_SOURCE, but I can't get anything to work.
    Or if anyone has any other thoughts on how to debug/troubleshoot this, I'd appreciate any ideas!!
    Thank you from a Java newbie!!

    OK, that is helping me get somewhere!! If I change the query to this, I am getting results:
    select obj_num,long_name from SYS."KU$_JAVA_CLASS_VIEW" where LONG_NAME like '%SSFItemOutboundPMDHelper%';
    171879
    com/clinapps/pmd/etl/interfaces/forecasting/itemtrial/helper/SSFItemOutboundPMDHelper
    Note that it has the / instead of the . as the differentiator
    Now if I do the second query, I see this:
    SQL> select * from SYS."KU$_JAVA_OBJNUM_VIEW" where OBJ_NUM=171879;
    OBJ_NUM DATAOBJ_NUM OWNER_NUM OWNER_NAME
    NAME NAMESPACE SUBNAME
    TYPE_NUM TYPE_NAME CTIME MTIME
    STIME STATUS REMOTEOWNER
    LINKNAME
    FLAGS OID SPARE1 SPARE2 SPARE3
    SPARE4
    SPARE5
    SPARE6
    171879 123 PMD50
    /34bae3f1_SSFItemOutboundPMDHe 1
    29 JAVA_CLASS 2012-06-28 10:44:22 2012-06-28 10:44:22
    2012-06-28 10:44:22 1
    8 6 65535
    Any thoughts on where to go from here??

  • How to find out if J2EE Engine is PROD or TEST or DEV System

    Hi,
    I want to get the system state / system type (even if si PROD or TEST or DEVELOP system) of the J2EE-Engine at runtime, because to use different properties.
    How can I find this information and how can I get this info in Java?
    Thanks for help.
    Sven Rickelt
    we use: SAP Web AS 6.40 SP 13 (Netweaver 2004)

    Hi Gianluca,
    one method I found is "to ask" System.getProperty("j2ee.dbhost") or System.getProperty("SAPSYSTEMNAME"), but I don't know if it is the right way.
    So I must store the servernames in my properties (f.e.
    dev=mypcname
    test=testservername
    a.s.o.)
    but I think there must be a method to configure the server, that I can ask it and the answer is "PROD" or "TEST" and I not must know the servernames...
    Best Regards
    Sven Rickelt

  • Data fetch from two table without refresh

    hi Friends,
    I have a problem i want to extract data from two table without refresh into text field when i'll enter any value in a text field then corressponding value should come in to corressponding textfield.
    eg. there two table A and B.
    Table A has Colunm
    s_id Number;
    c_id Varchar2(30);
    sec varchar2(4);
    Second Table B Colunm Name
    s_id Number;
    f_name varchar(30);
    l_name varchar(20);
    when i enter s_id 101 in a text field then the c_id ,sec,first_name and last_name should come in to corressponding text fields without refresh.
    How Can I do this.
    Thanks
    Manoj

    Hi Manoj,
    You have to make an Ajax call to display data without refreshing the page. Search this forum for Ajax and you can find lots of related posts. This link might help too. http://www.dba-oracle.com/t_html_db_apex_ajax_application_express.htm
    Thanks,
    Manish.

  • How to retrive the Direct purchase entries from table level? S_ALR_87012050

    Hi All
    In our current project we need to retrieve the direct purchase report from table level. Can you please provide me the direct purchase related table? Normally we are executing the standard report S_ALR_87012050
    to extract the direct purchase entries. We need to know which table has the direct purchase entries.
    Regards
    K.Gunasekar

    K,
    Your problem description is still insufficiently detailed.
    It appears now that you are searching for asset numbers.  Please confirm.
    Your selection criteria "Inventory Number NE 0" doesn't appear to make much sense.  Inventory number is not a quantity, it is the name of an object.  I guess it is meaningful you have some inventory numbers named as '0'.  I don't think this setting is causing your problem though.....
    You didn't mention which table you accessed to discover that you had a perceived discrepancy.  Which table did you browse to see the results you mentioned?  Please describe the selection parameters for each table you reviewed, and the results for each table that you examined.
    It is also the practice of many companies to archive asset data.  If this is the case in your company, then the archived data will not reside in the 'A*" tables.
    You mentioned that you used the same parameters to select the data.  How did you select "Report Date" when you did the table extract?  I am not aware of a field that is named "report date' in any of the tables mentioned.
    Rather than slog through tables, you might want to try SE16, view "V_ANLAZ".  This is a preconstructed linkage of ANLA and ANLZ that is used by S_ALR_87012050 as a starting point.
    I really think you should consult with your ABAPers.  In two minutes they can give you your answers.  It will take me several messages and probably several days to get you the same answers.
    Best Regards,
    DB49

  • How to get MR Document from Billing Document at the table level

    Hi All,
    I am looking to find the MR Document based on which the Billing Document was generated. I need to find it out at the table level.
    I looked into DBERCHZ2 table, but I can see a single billing document is linked to multiple Meter Reading Documents via different Line Items.
    Could you guyz please help me? Am I seeing the right table? Is there any FM or ABAP program for the same?
    Thanks a lot in advance.
    Regards.

    Hi ,
    The link is Installation to get MR Doc from Bill Doc .
    from ERCH-BELNR  , fetch Contract (VERTRAg )  and then from EVER-VERTRAG get Installation (ANLAGE).
    Get MR Doc(ABLBELNR) from EABLG based on EABLG-ANLAGE.
    Thanks ,
    Sachin

  • Imp into Dev from Prod - schemas, data only, truncate tables

    Hello,
    I am going to impdp from Prod to Dev. This is a data only import. I plan to do a schema impdp. This is the command I plan to use:
    impdp system/password schemas=user1,user2,user3,user4 directory=dir_123
    logfile=imp123.log dumpfile=dump123.dmp content=data_only table_exists_action=truncate
    1) Do I need to disable the contraints/triggers in Dev before doing impdp?
    Is disabling contraints necessary in Dev since the contraints in Prod have no violations?
    2) What is going to happen if in Dev the objects already exist? For example, an index on a table, would this index be over written during the impdp? Or do I drop the index in Dev prior to the import and then let the import create new ones?
    3) What impdp options should I use, if I only want to truncate the tables belonging to the schemas being imported? What about existing objects, such as indexes, what is going to happen to the existing objects? Are they going to be over-written by the impdp?

    Hello,
    I am going to impdp from Prod to Dev. This is a data only import. I plan to do a schema impdp. This is the command I plan to use:
    impdp system/password schemas=user1,user2,user3,user4 directory=dir_123
    logfile=imp123.log dumpfile=dump123.dmp content=data_only table_exists_action=truncate
    1) Do I need to disable the contraints/triggers in Dev before doing impdp?
    Is disabling contraints necessary in Dev since the contraints in Prod have no violations?
    2) What is going to happen if in Dev the objects already exist? For example, an index on a table, would this index be over written during the impdp? Or do I drop the index in Dev prior to the import and then let the import create new ones?
    3) What impdp options should I use, if I only want to truncate the tables belonging to the schemas being imported? What about existing objects, such as indexes, what is going to happen to the existing objects? Are they going to be over-written by the impdp?

  • How to prevent Oracle from using an index when joining two tables ...

    How to prevent Oracle from using an index when joining two tables to get an inline view which is used in an update statement?
    O.K. I think I have to explain what I mean:
    When joining two tables which have many entries sometimes it es better not to use an index on the column used as join criteria.
    I have two tables: table A and table B.
    Table A has 4.000.000 entries and table B has 700.000 entries.
    I have a join of both tables with a numeric column as join criteria.
    There is an index on this column in table A.
    So I instead of
      where (A.col = B.col)I want to use
      where (A.col+0 = B.col)in order to prevent Oracle from using the index.
    When I use the join in a select statement it works.
    But when I use the join as inline view in an update statement I get the error ORA-01779.
    When I remove the "+0" the update statement works. (The column col is unique in table B).
    Any ideas why this happens?
    Thank you very much in advance for any help.
    Regards Hartmut

    I think you should post an properly formatted explain plan output using DBMS_XPLAN.DISPLAY including the "Predicate Information" section below the plan to provide more details regarding your query resp. update statement. Please use the \[code\] and \[code\] tags to enhance readability of the output provided:
    In SQL*Plus:
    SET LINESIZE 130
    EXPLAIN PLAN FOR <your statement>;
    SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY);Usually if you're using the CBO (cost based optimizer) and have reasonable statistics gathered on the database objects used the optimizer should be able to determine if it is better to use the existing index or not.
    Things look different if you don't have statistics, you have outdated/wrong statistics or deliberately still use the RBO (rule based optimizer). In this case you would have to use other means to prevent the index usage, the most obvious would be the already mentioned NO_INDEX or FULL hint.
    But I strongly recommend to check in first place why the optimizer apparently seems to choose an inappropriate index access path.
    Regards,
    Randolf
    Oracle related stuff:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle:
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Data fetch from table without Refresh and without using tab key.

    hi Friends,
    I have a problem i want to extract data from table without Refresh into text field without using Tab key. when i'll enter any value in a text field then corressponding value should come in to corressponding textfield without using Tab Key.
    eg. when i enter emp_id 101 in a text field then the first_name and last_name ,adress should come in to corressponding text fields without refresh and without using Tab key.
    How Can I do this.
    Thanks
    Manoj

    Hi Manoj,
    I assume that this is similar to: Data fetch without Refresh rather than Re: Value of one textfield should come into another textfield Without Using TAB ?
    If so, the only change you need to make on the first one is to use "onkeyup" instead of "onchange" in the item's "HTML Form Element Attributes" setting.
    Note, however, that the user must move away from the item at some point (for example, to click a button), so the onchange will be triggered anyway.
    Andy

Maybe you are looking for

  • Saving a PDF as a negative image...is that possible?

    I'm trying to save a PDF from Illustrator as a negative image...like in the print menu in 'Output' you can change the image to Negative. I need to do this so I can send it to an image setter. I looked in the help menu and briefly online but I couldn'

  • Output determination procedure as blank

    Hi functional experts, Am a technical consultant i have a requirement to make the output determination procedure as blank during customer creation.can anybody please tell what logic to write from the functional prospective. regards Prasun

  • Setting custom ringtone in iPhone

    Hi, I am using a iPhone 4S. I truely believe Apple iPhone is a great technology built by experts. In spite of, being a great Smart phone, why the setting of custom ringtone, which is very basic feature in any kind of phone, is so complicated? Can't t

  • How to respond to the prompt?

    Hello Friends, I have a class that sends mail. It is petty cool but now I want it to send e-mail without me entering the info. So, when the program prompts To: I can have a program that fills that out for me. And Then when it asks for a message, I ca

  • Where can I find the Labview device manager?

    Hello out there, I hope you are able to help me. I'm searching for the Labview device manager and if you can tell whrere I will find it, perhaps you can also tell me how to handle it. Thanks und best wishes, Schloemer