Generating EXPLAIN PLAN on a database which is opened in READ-ONLY mode

Hi,
I am using Oracle 10.2.0.3 version.
If my database is opened in READ-ONLY mode, means no insert/update/delete operations are permitted here.
While generating EXPLAIN PLAN for any SQL, it does entries in PLAN_TABLE. But my database is opened in READ-ONLY mode, means no inserts can happen.
So how can I generate EXPLAIN PLAN for my SQL in this condition?
Thanks in advance.
Best Regards,
oratest

oratest wrote:
I am using Oracle 10.2.0.3 version.
If my database is opened in READ-ONLY mode, means no insert/update/delete operations are permitted here.
While generating EXPLAIN PLAN for any SQL, it does entries in PLAN_TABLE. But my database is opened in READ-ONLY mode, means no inserts can happen.
So how can I generate EXPLAIN PLAN for my SQL in this condition?
You can always do: "explain plan into some_table@remote_database" to avoid inserting into the local database. Unfortunately 10g added a sequence fetch to the "explain plan" code, and this is where the call would fail if you tried this remote approach on your version.
Here's an idea I haven't tested. If you set up a database link from your production database to the read-only database, you could then do an "explain plan" in the production database for the SQL statement by changing every object reference in the SQL statement to "object@readonlydatabase". In most cases this will allow the optimizer to recognise the statement as "fully remote" and get the optimizer on the readonly database to create the execution plan - which would then be written to the production database.
Regards
Jonathan Lewis

Similar Messages

  • Query faild against database that is opened in read only mode

    ORA-16000: database open for read-only access
    Hi ,
    I am quering against a database that been opened in read only mode (10g version)
    SQL> select controlfile_type,open_mode,database_role from v$database;
    CONTROLFILE_TYPE OPEN_MODE DATABASE_ROLE
    STANDBY READ ONLY PHYSICAL STANDBY
    Currently when selecting against this database
    i am getting the following error:
    SELECT PS_RF_PROVGRP_VW.SETID, PS_RF_PROVGRP_VW.PROVIDER_GRP_ID, PS_RF_PROVGRP_VW.NAME1,
    PS_RF_PROVGRP_VW.STATUS, PS_RF_PROVGRP_VW.SYNCID, PS_RF_PROVGRP_VW.SYNCDTTM
    FROM PS_RF_PROVGRP_VW
    ERROR at line 1:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-16000: database open for read-only access
    The owner of the object is PSSYS and i am running the queries as user INFORMIX.
    select owner,object_name,object_type from dba_objects where object_name ='PS_RF_PROVGRP_VW';
    OWNER OBJECT_NAME OBJECT_TYPE
    INFORMIX PS_RF_PROVGRP_VW SYNONYM
    PSSYS PS_RF_PROVGRP_VW VIEW
    User informix have "SELECT ANY TABLE" privilage
    In the source database (e.g: not the cloning one) the queries results are returning susseccfully ,
    and only in the clonning the database the problem exists.
    Does someone have an idea what the problem could be ?
    Thanks.

    Hi
    Object can become invalid, if the underlying objects are dropped/invalidated.
    So even if you create or validate the underlying objects these objects by themself do not become valid. You have to either make them valid or you should use it atleast one time as select/desc or any other query so that Oracle implicitly make it valid.
    Your source datatabase has valid synonym because after dropping/creating you must have selected that synonym atleast one, but this selection procedure would be after you copied your data to the target database.
    Regards

  • Database Open in Read Only Mode

    Hi
    I would like to open database in read only mode
    like
    SQL> startup mount
    SQL> ALTER DATABASE OPEN READ ONLY
    this will open database for read only mode for all user
    i want to give read write access on database to one user
    any idea how i can proccess
    Thanks
    Chetan

    Hi,
    Alter database open read only;
    this should work fine and everything will be in read only mode. Hence if any auditing is going on and audit_trial=db then it fails to open the database in read only mode.
    If you want to control only users to stop writing to it, you may remove tablespace quotas for those users. Also, you may control them through grants. Remove any current grants assigned to them or to roles through which the grants are assigned.
    Several ways to do this. If you tell us the particular scenario then we might help in getting a solution.
    Regards,
    Vasu.

  • Starting database in Read only mode

    hi,
    i am using oracle 8i, we want to copy the Production database to other machine, but on starting that m/c database should be opened in read only mode without DBA interaction what to do for that. pl tell
    thanx in advance

    SQL> STARTUP MOUNT
    ORACLE instance started.
    Total System Global Area 177281688 bytes
    Fixed Size 453272 bytes
    Variable Size 150994944 bytes
    Database Buffers 25165824 bytes
    Redo Buffers 667648 bytes
    Database mounted.
    SQL> ALTER DATABASE OPEN READ ONLY;
    Database altered.
    SQL> DELETE FROM SCOTT.EMP;
    DELETE FROM SCOTT.EMP
    ERROR at line 1:
    ORA-16000: database open for read-only access
    kuljeet pal singh

  • Database opens as read only

    I have installed the application of mine to the my computer and the other computer that are running on Windows 7 64 bit and all of the function are worked fine (adding the data to the database through system, delete a single data or clear all of the data from
    the database through system, edit the data in the database through system and look at whether the user has correct login username and password from the database through system).
    But, when I installed the application of mine to the other computer that are running on Windows 7 32 bit, all of the functions not worked (object reference not set to the instance of the object when I want to adding the data to the database), but the user can
    login to the system (look at whether the user has correct login username and password from the database through system), but all of the functions except that (login to the system), are not worked, and when I open the database, the database has been opened
    as read-only. This problem has been bugged me, because I have been searching what's is the problem and cannot find the problem at all.
    Anyone know what is the problem? Is it the operating system that restricted the database to be accessed by 64 bit only?
    Thank you very much!
    Your answer much appreciated!

    Hi,
    Change the database to
    Read-write mode.
    sathya - www.allaboutmssql.com ** Mark as answered if my post solved your problem and Vote as helpful if my post was useful **.

  • Unable to generate explain plan

    Hi,
    Oracle Version :10.2.0.3.0
    Operating system : Linux
    We are unable to generate explain plan and it is throwing error like this
    ORA-02403: plan table does not have correct format
    How to modify it please help me
    Regards
    Poorna

    SIDDABATHUNI wrote:
    Hi,
    Oracle Version :10.2.0.3.0
    Operating system : Linux
    We are unable to generate explain plan and it is throwing error like this
    ORA-02403: plan table does not have correct format
    How to modify it please help mePoorna,
    since you're already on 10g you can drop any PLAN_TABLEs in user schemas. 10g already has a SYS.PLAN_TABLE$ exposed by a public synonym PLAN_TABLE which is a global temporary table that can be used by anyone.
    If you really want to keep private copies of the PLAN_TABLE you need to re-create them according to the layout in $ORACLE_HOME/rdbms/admin/utlxplan.sql on the server side.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Access Database Opens in Read Only for Users

    I just moved an Access Database to a new server (from Server 2003 to Server 2012). From the server, using Office 2010, I can open the database without issue but, if a user try's to open the same database from either a shortcut or mapped with Office 2010,
    they get the message that the database is Read Only. Did I miss a step in moving the database to the new server? Thanks

    Hi,
    Did your user get the error message "You are trying to open a read-only database..."? If it was, please try the following method:
    On the desktop, double-click My Computer.
    Locate the Microsoft Access database that you moved.
    Right-click the database name, and then click Properties.
    In the Properties dialog box, clear the Read-only check box under
    Attributes.
    Click OK to apply the change.
    Open your database in Access.
    Resource:
    http://support.microsoft.com/kb/324666/en-us (It also applies to Access 2010)
    Hope it's helpful.
    Regards,
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • ORA-01578 about standby database in read only mode

    Hi,
    I have an ORA-05178 (data block corrupted) about a standby database which in read-only mode. About production database, there is no problem.
    After analyze, this is an index segment :
    SELECT segment_name , segment_type , owner , tablespace_name
    FROM sys.dba_extents
    WHERE file_id = 58
    AND 218173 BETWEEN block_id and block_id + blocks -1
    SEGMENT_NAME SEGMENT_TYPE OWNER TABLESPACE_NAME
    SICINHIS01 INDEX MOWIN IDX_DATA01
    There is no constraint.
    How can I repair this problem ?
    Nicolas

    Hi,
    I have an ORA-05178 (data block corrupted) about a standby database which in read-only mode. About production database, there is no problem.
    After analyze, this is an index segment :
    SELECT segment_name , segment_type , owner , tablespace_name
    FROM sys.dba_extents
    WHERE file_id = 58
    AND 218173 BETWEEN block_id and block_id + blocks -1
    SEGMENT_NAME SEGMENT_TYPE OWNER TABLESPACE_NAME
    SICINHIS01 INDEX MOWIN IDX_DATA01
    There is no constraint.
    How can I repair this problem ?
    Nicolas

  • Database open for read-only access ORACLE

    while building a universe with a dblink betweens oracle databases, i try to create a derived table in the form
    select field1 from table@db_to_db2
    but i get the following message:
    Exception: DBD, ORA-16000: database open for read-only acces State N/A.
    I understand the statement "Set Transaction for read only"  must be set before any transaction during the session, but still dont know how to trigger it in bo universe designer.
    Can someone know how to solve it?

    I suggest you fill-in the BEGIN_SQL parameter on the Universe to turn on the read-only transaction.
    Here is an excerpt from the Universe Designer guide:
    The BEGIN_SQL parameter allows you to prefix SQL statements with the same parameters each time a SQL statement is generated.
    1. Open the "Universe Parameters" dialog box in Designer.
    2. Click the Parameter tab.
    3. In the "Parameter" list, select the BEGIN_SQL parameter and enter the
    appropriate prefix commands.
    4. Save the settings.
    5. Save the universe.

  • How can I get a birthday reminder from items which are in the read-only cal

    I am looking for a solution to get a reminder message for birtdays which are within the read-only calender imported/updated from he address book. I so far have not found the option where to turn on the reminder and I do not want to duplicate items (ie creating another birthday calender inside iCal).
    Thanks for comments.
    PB G4 Ti, 1GHz, 10.2.8   Mac OS X (10.4.7)  

    Hi ontour,
    This limitation is one of the many reasons I wrote Dates to iCal. It is a replacement for the Birthdays calendar in iCal, so you would need to turn the Birthdays calendar off in iCal's preferences.
    See here: http://discussions.apple.com/thread.jspa?threadID=466478
    Best wishes
    John M

  • Remove Standby/Read only mode for a database in sql server 2005

    Hi,
          I have a problem in sql sever . my database is showing standby/read-only mode. i want to remove that mode.please help me for the issue.

    HI
    Did you assign any DB read only user?
    check the administrator guide in your SAP Business one->Documntation->system setup->Administrator guide...
    but removing DB read only user is impossible.....

  • Unable to open database in READ ONLY mode

    When trying to open database in READ ONLY MODE it says needs recovery. How ever database opens succesfully in READ WRITE MODE.
    1) Startup mount
    2) SQL> ALTER DATABASE OPEN READ ONLY;
    ALTER DATABASE OPEN READ ONLY
    ERROR at line 1:
    ORA-16005: database requires recovery
    But database opens succesfully when opened in READ WRITE mode.

    user12038051 wrote:
    When trying to open database in READ ONLY MODE it says needs recovery. How ever database opens succesfully in READ WRITE MODE.
    1) Startup mount
    2) SQL> ALTER DATABASE OPEN READ ONLY;
    ALTER DATABASE OPEN READ ONLY
    ERROR at line 1:
    ORA-16005: database requires recovery
    But database opens succesfully when opened in READ WRITE mode.
    sqlplus '/as sysdba'
    shutdown imediate;
    startup;
    shutdown imediate;
    startup mount;
    recover database;
    alter database open read only;

  • Putting apps database in Read-Only mode

    Hi,
    I want to put the apps database in read-only mode to that user will be able to login into the applications and see data but will not be able to update it.
    What is the best way to do this?
    Thanks

    I am still looking at how to do this because if users
    update the UAT/test database, when the prod upgrade
    is completed, they will think that their updates will
    be available and this will cause some issues.This is a training/expectation-setting issue, not a technical one. You need to make sure that your users understand the difference between a test system and production, and that changes made in testing will not be present in production. They also need to understand that this situation is actually to their benefit: it enables them to really work with the test system to uncover potential problems and learn new features, without fear of making changes that could negatively impact their day-to-day work in production.
    Please note that I'm not trying to be a jerk here. I very respectfully submit that attempting to make an instance read-only for training purposes, even if possible, will involve a great deal of technical work for very little (and perhaps even negative) overall benefit to the users.
    Regards,
    John P.

  • Planning Webform IN Read Only Mode

    Hi,
    All the webforms that i created in Planning 11.1 is in read Only mode. Non of the webforms have"Make Read Only" Checked nor the members used are Dynamic calc. I tried logging in using admin but that not solve the issue either. I can send in the data using excell add in but not throught planning. I dont see any more option to adjust this.

    Hi,
    Another thing to check is the plan type you have set the form against and the source plan type for the account member on the form.
    For example if you have a form set against plan type 1 and the account on the form has a source plan type of plan type2 then the form will be read only.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Which table shows the tablespace in read-only mode or read-write mode.

    HI All,
    Can someonoe help me out to find which table shows whether the a tablespace is in Read-only mode or Read-write.
    Thanks,
    naveen

    Try this:
    select tbl.table_name, tb.tablespace_name, TB.STATUS from dba_tablespaces tb, dba_tables tbl
    where TB.TABLESPACE_NAME = tbl.TABLESPACE_NAME and TB.TABLESPACE_NAME = 'YOUR_TABLESPACE_NAME' and tbl.table_name = 'TABLE_NAME'

Maybe you are looking for

  • Need advice with routers (gaming, stability, QoS?)

    Hi.I use Sky Broadband for gaming. Unfortunately, my housemate has about 4 devices on the go at once and being an ignoramus has no idea what they are doing half the time... His Xbox may be downloading a huge update for a game he doesn't play, his iPh

  • For Capital goods in in Detail tab in Part one data Multiple serial numbers

    Hi experts, For capital goods i captured Part 1. Display Vendor excise details  in item detail tab in part 1  columns   Register,Year, Serial number, material document,year, item, internal number like that are there. In serial numbers four different

  • How do I schedule a repeating meeting on weekdays only?

    I have a daily status meeting every weekday at 9am.  Isn't (wasn't?) there a "weekdays" custom option? If I choose "Daily", iCal schedules Saturdays and Sundays, too.  NO!  How can I schedule this?  Please Don't tell me I have to enter 5 weekly repea

  • Simple table view won't display text after typed...

    I'm working with a table view in my application. I already have the code in place and the object prompted to the right items. Though once I build and use the table view, I simply cannot have the text I added to the table be viewable after I click to

  • How to monitor hard disk in labview 8.2

    Hi , I want to using labview 8.2 program to  monitor hard disk(one folder in hard disk)  for example one application generate a result file to the folder then it  will be captured  by labview program. thank you Solved! Go to Solution.