Shared_pool.keep and sql invalidations

Hi everyone,
Currently I am going to keep some procedures, functions, triggers and cursors into the shared pool using dbms_shared_pool.keep, but some cursors become invalid because we perform a truncate command in the tables referenced by the cursors. If I keep the cursors and when they become invalid, those cursors will be reparsing but, Are they will be allocated into other blocks or chunks into the shared pool or they still remain in the same blocks currently used by the cursors?
I don't understand well this situation.
Regards,
johnxjean

Jonathan Lewis wrote:
johnxjean wrote:
Hi Jonathan,
Sorry for answer late.
>
After invalidation, the next execution will have to re-optimise, which means creating a new "heap 6". The old heap 6 will be discarded - which means any memory chunks will be returned to the shared pool, and a "new heap 6" will be constructed if possible. You may find that some of the chunks returned to the shared pool are immediately reused, but that's a coincidence, not a design.
>
Ok, I understand. I guess. So, As you said. If a statement becomes invalid, then, it has to be re-optimized and it will be created a new "heap 6" to this statement. then, Can we say that keeping statements into the shared pool when they probably become invalid is a waste of time?
Or Does still Oracle retain the statement in the same chunks of tha shared pool beacuse I have executed the dbms_shared_pool.keep procedure?.
I don´t think you can give a generic answer to that question.
If the query is expensive to optimise, but keeps getting "lost" if you don´t KEEP it, then it may be worth KEEPing, even though invalidation will destroy the plan. On the other hand, if you are constantly invalidating it so that you never re-use it before it gets invalidated then there´s no virtually no point in keeping it (although technically there´s a small gain if it´s kept, especially if it´s also held open.)There is a [url http://download.oracle.com/docs/cd/E11882_01/server.112/e16638/memory.htm#PFGRF94341]mention in the docs to use the keep early in the life of the instance, otherwise there is a chance that pinning large objects in the middle of the pool could cause fragmentation problems later. So maybe some amount of random invalidations might add up to worse than a waste of time, as sometimes the heap 6 will be moved?
>
Regards
Jonathan Lewis

Similar Messages

  • I keep getting the invalid redemption error and I have tried entering the code on the card several ways and nothing works

    How do I get help getting the right serial number to install my Photoshop elements software? I have tried entering the redemption code on the card in the box and even what is listed as a serial number on the receipt from the retailer I bought the software from. Nothing seems to be working and I keep getting the invalid code message.

    Redemption Code Help
    http://helpx.adobe.com/x-productkb/global/redemption-code-help.html

  • I keep getting an invalid address when trying to purchase songs.  All the information is correct - it just send me in a circle

    I keep getting an invalid address when trying to purchase songs on itune.  All the information entered is correct.  I have tried on my iPhone, iPad, iTouch and on itunes.

    THE FIX: your credit card address AND spelling of your name must match iTunes.
    Please don't google or read other blog entries on the Internet telling you to use a restaurant address or those that are telling you apple is doing address validation. They are all written by 17 year olds who pick up the first thing and re-post. Why do people try to "help" by authoritatively posting an answer? The mass of them are ruining my google searches. :-)
    Apple is now validating whatever ASCII that you told your credit card company. It's not just address validation.
    Name AND address must match.
    Then it worked for me.

  • Database Adapter and SQL Server procedure issue

    Hello,
    I am using Jdev 11.1.1.7.0 and SQL Server 2005.
    In the Database Adapter configuration wizard, Specify Stored Procedure step, I choose the “GEACupax” schema and got the following error after a click on “Procedure Browse” button:
    com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'GEACUPAX.INFORMATION_SCHEMA.SCHEMATA'.
    The command Database Adapter tried to execute was:
    (from jdev log:) select schema_name from GEACUPAX.INFORMATION_SCHEMA.SCHEMATA order by schema_name;
    Note, the schema name has changed to uppercase. I think that is the problem. If I try this query in SQLDeveloper, it returns the same error. I can fix it changing the schema name to “GEACupax”. The case matters.
    Any ideas?
    Leandro.

    Vijay,
    Thanks for you reply.
    I figure out a related bug:
    Bug 12859472: Cannot browse store procedure in case-sensitive MS SQL Database
    There are two possible workarounds:
    1. Use a database name with capital letters
    2. Do not use stored procedures, but access the tables directly.
    The notes on the Bug ticket describes that the issue would be scheduled to be fixed in PS7 which is 11.1.1.8.
    Cheers!
    Leandro.

  • Sqlcode and sql%rowcount as test conditions

    I am translating a procedure from Ingres to oracle. I use the Oracle sqlcode and sql%rowcount
    variables in place of Ingres's iierrornumber and iirowcount.
    I replaced the ingres names with the oracle names, and now am wondering how how oracle uses these
    values.
    I am using DBMS_OUTPUT.PUT_LINE to display the contents of sqlcode and sql%rowcount.
    What happens when I get "no rows selected". I run the same query in standalone command line
    and get no rows selected .. and it's correct because I don't have data that matches).
    But when I run it in the procedure, I don't get any values in sqlcode or sql%rowcount ... the
    program just exits. The author was using the ingres code to test if there was data there and then
    continue to do something else.
    If you get no rows returned, does that mean, the sqlcode is 0 ? and the sql%rowcount is emtpy?
    which is why my DBMS_OUTPUT.PUT_LINE doesn't display anything ?
    my example........
    before this section in the procedure ... after running a different select that returns data ...
    I am using the DBMS to debug the values I have going in ...
    DBMS_OUTPUT.Put_line ('BEFORE sqlcode is' || sqlcode);
    DBMS_OUTPUT.Put_line ('BEFORE sqlrowcount is' || sql%rowcount);
    Select value from table
    where condition ='Y'; > this select will product "no rows return" and ignore the 2 DBMS_OUTPUTS beow ---
    DBMS_OUTPUT.Put_line ('AFTER sqlcode is' || sqlcode);
    DBMS_OUTPUT.Put_line ('AFTER sqlrowcount is' || sql%rowcount);
    When i run the procedure... I get the DBMS BEFORE statements, and nothing afterwards ...
    BEFORE sqlcode is 0
    BEFORE sqlrowcount is 1 >>>> that is all that displays
    Since I am getting the "no rows returned" ... how does oracle handle it to anyone's experience ?
    Thank you. I am learning much from your comments and information.

    Thanks to your answers .... The procedure is below. I've had to hand type it in, so typos are my mistakes.
    The procedure compiles . When there is data to be found, I get the DBSM_OUTPUT lines of code ....
    msg_read is Y
    sql_error is 0
    row_count is 1
    p_vol_id is 880091
    When I enter in a file name that does not return ANY rows back I will get the msg_read
    DBMS_OUTPUT line
    msg_read is Y
    Call completed.
    It doesn't show any 0 for sqlcode or sql%rowcount
    The original author used the Ingres return codes as input to process the rest of the code...
    It seems like oracle bounces the procedure once there are no rows to be found.
    I just added this part ....
    having an exception in the clause shows that Oracle is bouncing it to the WHEN OTHERS
    exception ...
    Any ideas of how to get Oracle not to do this ?
    I am trying to keep things simple, and all I am testing for is if I get records back the code does things,
    if not, I do something else
    create or replace procedure userfile(vms_fil_name IN varchar2, msg_read IN Varchar2)
    authid current_user
    is
    p_vms_file_name varchar2(255);
    p_vol_id varchar2(255);
    p_orig_id varchar2(255);
    p_incoming_message varchar2(255);
    sql_error number;
    n_count number;
    begin
    p_vms_fil_nam :=vms_fil_nam;
    DBMS_OUTPUT.PUT_LINE ('msg read is '|| msg_read); >> verify incoming parameter
    IF (msg_read ='Y')
    then
    select vol_id,
    orig_id,
    incoming_message
    into p_vol_id,
    p_orig_id,
    p_incoming_message
    from
    table one_table a
    where
    a.vms_fil_nam = p.vms_fil_nam
    and incoming_msg ='I';
    n_count :='sql%rowcount';
    sql_error :='sqlcode;
    DBMS_OUTPUT.PUT_LINE ('row count is '|| n_count);
    DBMS_OUTPUT.PUT_LINE ('sql_error is '|| sql_error);
    DBMS_OUTPUT.PUT_LINE ('p_vol_id is '|| p_vol_id);
    end if;
    exception >>>> just added this part as the last test....
    when others
    DBMS_OUTPUT.PUT_LINE ('other condition has been met');
    end;
    call userfile ('GEORGE','Y');

  • Install Mini SAP and SQL 2005

    Hi there,
    I hope someone can help me with the question.
    I’ve bought the ABAP objects book called “An Introduction to Programming SAP Applications” from Horst Keller and Sascha Kruger (black color). There are 2 CD's to install the application Mini Basis SAP and work with the ABAP workbench. I was able to install that on a pc Win2000 and it worked and that pc had no sql server/database installed
    But I've now another pc Windows XP and has has SQL 2005 Dev edition. I need to keep this.
    My problem is when I try to install the Mini Basis I get error. Is it because of I’ve already installed the Ms SQL 2005 dev edition? 
    I’m using Windows XP prof edition. How can I install on XP pro this software on my pc keeping the SQL 2005?
    I have tried resume_setup.bat and also enabled remote_services for the registry update. no hope.
    Can someone please help?
    Cheers, mesut
    Book reference: ISBN 0-201-75080-5  (SAP Press)

    Hi Sravan,
    That's exactly what I did. I bought the book and I try install on Win XP pro with SQL 2005 dev edition pre-installed.
    I'm in possession of the Mini SAP, I own the book. I also looked at the site you suggested
    http://www.sap-img.com/mini-sap.htm.
    It seems to be I should be able to install on WIN XP pro due to the site above.
    This is how a work
    1) CD 1 starts with home page
    2) I choose REsume (because I have already pre-installed the SQL 2005)
    3) Setup starts
    4) asks me which directory, it proposes C:\MBS  -- I accept
    5) It asks me where is the DATA and the KERNEL CD --- it proposes D: ---I accept
    6) at the mean time I click on switch view and I see the logs and this is finally I get (I just copy/paste below the errors no the whole log)
    So I don't know how to proceed further. I contacted SAP and they propose me this forums.
    Could you please advice?
    thanks mesut
    Error: DBCOMMONDBENV_IND_MSS SubstituteVariables 2 416
           The function RegOpenKeyEx with the parameterlist    
           (Software\Microsoft\MSSQLServer\MSSQLServer\Parameters) returned with error code 2 and error text:
            The system cannot find the file specified.
    Error: DBCOMMONDBENV_IND_MSS InstallationDo 2 416
          Phase failed.
    Error: Main {} 2 416
           Installation aborted.

  • OraOledb, Linked Servers and SQL Server 2005 issues

    Some issues I've come across when using SQL Server 2005 (and SQL Server Express 2005), the OraOLEDB provider (10.2.0.1) and a linked Oracle database (8.1.7.4.0 64-bit)
    1) You must set the OraOledb.Oracle\AllowInProcess value to 1 to allow the OraOledb provider to run in SQL Server's process. Without doing this I receive an 'unspecified error' from the OLE DB provider when attempting to run a query
    2) When running a ' select * ' query across a linked server using the provider, I receive the following error: Msg 9803, Level 16, State 1, Line 1
    Invalid data for type "numeric". I can, however, select all of the columns by name and the query completes (no error). Sometimes the 'select *' query returns a few rows before the error, sometimes it doesn't. The Microsoft Provider for Oracle does not have this problem

    Okay... I've got a Win2K3 Std Ed server (x64) running 64-bit SQL Server 2005 Enterprise Edition. I've installed the Oracle 10g 10.2.1 full client and admin tools, added two named services via the NetConfig assistant, and successfully set up (and tested) a connection via the ODBC Administrator to an Oracle database.
    Now... when I try to create a new connection manager in SQL Server 2005 Integration Services, the OLEDB provider for Oracle can't be found, and when I try to manually add an underlying OLEDB connection to the database, SQL Server reports:
    Test connection failed because of an error in initializing provider. The 'OraOLEDB.Oracle.1' provider is not registered on the local machine.
    Does anyone know what I need to do to see my ODBC Server data connections in SQL Server 2005 (64 bit)? I don't have this issue on my 32-bit SQL Server 2005 servers.

  • I keep getting an invalid mailbox name error every 5 minutes

    I keep getting an invalid mailbox name error every five minutes. I am able to send and recieve mail, this is just very annoying.  Can anyone help?  Seem like it must be an easy fix. I was on the phone with Apple Care for over an hour and they could not figure it out.

    I have the same issue. Dont have a clue

  • Installing Oracle Database and SQL Developer

    Hi, I was looking for some help/advice in regards to installing an Oracle Database and SQL Developer onto a Windows 7 32bit machine. I have been asked to create a database to store data that I create through reports in Excel so I am required to create a local database but not sure how to go about doing this. Also not sure if I install the Express Edition or Oracle Database 11g R2. If somebody could please advise on how I can get this started or even any links/tutorials that would guide me in how to get this installed with a localhost.
    Thanks in advanc.

    318f20b8-a3d0-4fb4-bb0f-73785250b7d4 wrote:
    Thanks guys, I have managed to install Oracle 11gR2 and I have setup a database using the dbca tool and I can connect to my new database. One thing that I have noticed is that when i look into my tables in sql developer i see loads of different tables i.e. def$_, logmnr_, etc and I am not sure why this is as I expected an empty tablespace.
    Thanks btw for all your help.
    One of the key principles of relational databases is that they use their own facilities to manage themselves.  That means the database management system uses the database to manage data about the database using exactly the same facilities (tablespaces, tables, user accounts, procedures, etc) that an application uses to keep data for the application. See "data dictionary"   So there is no such thing as a completely empty database.
    As said by others, you do NOT want to be creating your own tables under oracle's schemas (users) or in oracle's own tablespaces (esp. SYSTEM and SYSAUX).  Create your own user account/schema.  Create your own tablespace. Make that tablespace the default for that user.

  • Advanced Queueing and SQL in same transaction?

    Can Advanced Queueing operations and SQL operations be combined in one atomic transaction? I can't find any reference to this in the Oracle AQ documentation and none of the examples show this. In my application I'm having problems that seem like deadlock when I do combine AQ and SQL in the same transaction. However, when I place them in seperate transactions it works.
    null

    I am also looking for some examples of using SQL/PLSQL w/Advanced Queueing. We currently have the following scenario: One server has non-relational tables; another server has relational tables which house the same data in a relational format. We are looking for a way to migrate the non-relational data to the relational tables and keep the data updated when it changes in the non-relational tables.
    We had considered using materialized views, but, this was ruled out because the non-relational tables are created and dropped on a daily basis.
    My email: [email protected]
    Thanks for any input you may have!

  • SCCM 2012 R2 and SQL

    I have Two Questions
    Should SCCM 2012 and SQL be installed on the same server?
    Should SCCM 2012 be installed on the OS partition or have its own? C: Server 2012 and D:SCCM 2012
    What size should my partition be for OS and SCCM either way?
    I have a server running esxi.
    One option I have would be to install SCCM and SQL on one (VM server) with Server 2012 OS. Its will be 8 processors and 32 RAM.
    Option two will be to split into two VM's One running SCCM 2012 with 4 processors 16 Ram and another VM running SQL with 4 processors and 16 RAM
    My environment is small, 3,500 users
    Thanks

    For the SQL question, you will probably get as many answers as there are ConfigMgr admins.  I typically co-locate SQL on the site server.  As long as enough CPU, disk, and memory resources are allocated, this should be fine.  Consider limiting
    SQL's maximum memory use to a reasonable amount based on the environment.  Many times the answer to the question depends on the environment and how database administration is handled.
    I just found a good article here:
    http://myitforum.com/myitforumwp/2014/12/20/why-you-should-not-use-remote-sql-server-with-configmgr-2012/
    For the disk partition question, I always install ConfigMgr on a separate partition.  Keep in mind that a distribution point will be installed as well.  You don't want content for ConfigMgr filling up the OS partition.  Use the no_sms_on_drive.sms
    file to prevent DP content from being stored on your OS partition.
    I am sure others will have advice as well.  Hopefully that helps.
    Jeff

  • I keep getting an invalid serial number when re-installing Adobe Acrobat 9 I am getting my serial number from my registered products

    I keep getting an invalid serial number when re-installing Adobe Acrobat 9 I am getting my serial number from my registered products

    If it was an upgrade version, it may be you are being asked for the qualifying product S/N and are entering the new S/N instead. That would cause a problem.

  • Set up will not accept my serial number, keeps telling me invalid serial number.

    Please help, set up will not accept my serial number, keeps telling me invalid serial number. What can I do?

    No help what-so-ever. All I want to do is download the $299.00 Acrobat XI
    Standard that I purchased yesterday. I have my redemption code and like I
    said, after spending hours yesterday going through all the crap the Adobe
    website asked for, my serial number was invalid. This is the most un-user
    friendly process I have ever attempted to go through.
    It should be one simple procedure but it never ends!!!!
    Can someone please give me simple instructions to getting my download for
    this product? If not, I am returning it for a full refund!
    On Sat, Feb 14, 2015 at 11:17 PM, RahulTyagi4you <[email protected]>

  • Oracle 10g I don't have the files listener.ora, tnsnames.ora and sql.ora

    Hi folks,
    I uninstalled my Oracle 10g and when I re installed I got success, but when I went to the folder \network\admin didn't have the files listener.ora, tnsnames.ora and sql.ora. I have been trying during more than one month start my listener only because I need access the Oracle database from my Java application and I got the message:
    java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
    As additional information, I got no problem to access the SQL*Plus.
    =======================
    C:\>lsnrctl status
    LSNRCTL for 32-bit Windows: Version 10.1.0.2.0 - Production on 18-APR-2006 10:53
    :58
    Copyright (c) 1991, 2004, Oracle. All rights reserved.
    Connecting to (ADDRESS=(PROTOCOL=tcp)(PORT=1521))
    TNS-12541: TNS:no listener
    TNS-12560: TNS:protocol adapter error
    TNS-00511: No listener
    32-bit Windows Error: 61: Unknown error
    ====================
    C:\>ipconfig
    Windows IP Configuration
    Ethernet adapter Local Area Connection:
    Media State . . . . . . . . . . . : Media disconnected
    Ethernet adapter Wireless Network Connection 2:
    Connection-specific DNS Suffix . : myhome.westell.com
    IP Address. . . . . . . . . . . . : 192.168.0.2
    Subnet Mask . . . . . . . . . . . : 255.255.255.0
    Default Gateway . . . . . . . . . : 192.168.0.1
    Thanks in advance.

    Thanks ALL, I GOT IT, but I used other solution.
    Since I installed and uninstalled the Oracle several times, it keeps also many different Services for the listener. I don't know why, it didn't create a Service for my actual instalation with its path. In other words, all the services remained in the services.msc panel, had the path that was already removed from the Windows folder.
    Then what I did, was that I picked one service, took its name (OracleOraDb10g_home1TNSListener), went to regedit to [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\OracleOraDb10g_home1TNSListener] and simply changed the image path that was setted for the one that was removed (C:\oracle\product\10.1.0\Db_2\BIN\TNSLSNR ) for mine that is installed right now
    (C:\oracle\product\10.1.0\Db_1\BIN\TNSLSNR). Nothing more and finally works.
    I have tried something in the services.msc panel before, as you can see in this forum at the thread "I can't start listener in the Control Painel/Admin Tools/ Services", but I never got
    success.
    Appreciate your time!!

  • How to switch between SQL Server Express and SQL Server Evaluation

    I have both SQL Server Express and SQL Server Evaluation installed on my laptop. 
    I am wondering how to start SQL Server Evaluation; when I click All Programs > SQL Server Management Studio, I always get SQL Server Express (which I installed on my laptop a couple years ago). 
    I just downloaded SQL Server Evaluation (a couple days ago). 
    Whenever I try to access SQL Server Evaluation, I always seem to get SQL Server Express. 
    Sorry if this is a trivial thing; I just can’t seem to get it to work (and I Googled for a solution before posting this).
    Thanks everyone!!

    Ah!  It worked!!  This is great!!  It seems like I can connect to my version of SQL Server Evaluation, named 'EXCEL-PC\EXCEL'.
    Somehow, though, I seem to keep getting errors in my BIDS when I try to run an SSIS project.  See below:
    Ah!  It worked!!  This is great!!  It seems like I can connect to my version of SQL Server Evaluation, named 'EXCEL-PC\EXCEL'.
    I am getting an error that VS is unable to load a document:
    BIDS has to be installed by one of these editions of SQL Server 2008: Standard, Enterprise, Developer, or Evaluation. 
    To install BIDS, run SQL Server Setup and select Business Intelligence Development Studio.
    #1)  I recently downloaded and installed SQL Server Evaluation (specifically for the opportunity to try using BIDS and learn about this technology).
    #2)  When I run BIDS > SSIS, I get the error I described above. 
    #3)  I have had SQL Server Express installed for a couple years on my laptop
    So, my question is this: is it possible that BIDS > SSIS is picking up my SQL Server Express, instead of SQL Server Evaluation? 
    If so, how can I get BIDS to point to SQL Server Evaluation? 
    You can see in the image above that I have my BIDS Data Connections pointing to EXCEL-PC\EXCEL, which is the name of my SQL Server Evaluation. 
    Is this correct?  Why doesn’t this work? 
    I’ve spent some considerable time on this.  I’m close to just uninstalling EVERYTHING pertaining to SLQ Server, and just reinstalling SQL Server Evaluation, but this will take some time, and I don’t necessarily want
    to get rid of my SQL Server Express.  However, if that’s the only way to get this working, then that’s what I’ll do.
    I’d greatly appreciate any insight into this!!

Maybe you are looking for