DBMS_SPACE works not 10g 11g

Hello

I have a code that uses DBMS_SPACE who works in Oracle 10 g, but not in 11g.

Any clarification is appreciated.
SQL> select * from v$version ;

BANNER
----------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
PL/SQL Release 11.1.0.6.0 - Production
CORE    11.1.0.6.0      Production
TNS for 32-bit Windows: Version 11.1.0.6.0 - Production
NLSRTL Version 11.1.0.6.0 - Production

SQL>
  1  declare
  2   -- IN vars
  3   v_segment_owner VARCHAR2(100):='HR';
  4   v_segment_name VARCHAR2(100) :='NAMES';
  5   v_segment_type VARCHAR2(100) :='TABLE';
  6   v_partition_name VARCHAR2(100) :=null;
  7   -- OUT vars
  8   v_unformatted_blocks   NUMBER;
  9   v_unformatted_bytes   NUMBER;
 10   v_fs1_blocks   NUMBER;
 11   v_fs1_bytes   NUMBER;
 12   v_fs2_blocks   NUMBER;
 13   v_fs2_bytes   NUMBER;
 14   v_fs3_blocks   NUMBER;
 15   v_fs3_bytes   NUMBER;
 16   v_fs4_blocks   NUMBER;
 17   v_fs4_bytes   NUMBER;
 18   v_full_blocks   NUMBER;
 19   v_full_bytes   NUMBER;
 20   v_segment_size_blocks NUMBER;
 21   v_segment_size_bytes NUMBER;
 22   v_used_blocks NUMBER;
 23   v_used_bytes NUMBER;
 24   v_expired_blocks NUMBER;
 25   v_expired_bytes NUMBER;
 26   v_unexpired_blocks NUMBER;
 27   v_unexpired_bytes NUMBER;
 28  begin
 29  DBMS_SPACE.SPACE_USAGE(
 30   segment_owner => v_segment_owner ,
 31   segment_name => v_segment_name ,
 32   segment_type => v_segment_type ,
 33   unformatted_blocks => v_unformatted_blocks ,
 34   unformatted_bytes => v_unformatted_bytes ,
 35   fs1_blocks => v_fs1_blocks  ,
 36   fs1_bytes => v_fs1_bytes ,
 37   fs2_blocks => v_fs2_blocks ,
 38   fs2_bytes => v_fs2_bytes ,
 39   fs3_blocks => v_fs3_blocks ,
 40   fs3_bytes => v_fs3_bytes ,
 41   fs4_blocks => v_fs4_blocks ,
 42   fs4_bytes => v_fs4_bytes ,
 43   full_blocks => v_full_blocks ,
 44   full_bytes => v_full_bytes ,
 45   partition_name => v_partition_name  );
 46* end;
SQL> /
declare
*
ERROR at line 1:
ORA-00942: table or view does not exist
ORA-06512: at "SYS.DBMS_SPACE", line 190
ORA-06512: at line 29

SQL> show user
USER is "SYS"
SQL> select * from v$version ;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE    10.2.0.1.0      Production
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production

SQL> declare
  2   -- IN vars
  3   v_segment_owner VARCHAR2(100):='HR';
  4   v_segment_name VARCHAR2(100) :='NAMES';
  5   v_segment_type VARCHAR2(100) :='TABLE';
  6   v_partition_name VARCHAR2(100) :=null;
  7  
  8   -- OUT vars
  9   v_unformatted_blocks   NUMBER;
 10   v_unformatted_bytes   NUMBER;
 11   v_fs1_blocks   NUMBER;
 12   v_fs1_bytes   NUMBER;
 13   v_fs2_blocks   NUMBER;
 14   v_fs2_bytes   NUMBER;
 15   v_fs3_blocks   NUMBER;
 16   v_fs3_bytes   NUMBER;
 17   v_fs4_blocks   NUMBER;
 18   v_fs4_bytes   NUMBER;
 19   v_full_blocks   NUMBER;
 20   v_full_bytes   NUMBER;
 21   v_segment_size_blocks NUMBER;
 22   v_segment_size_bytes NUMBER;
 23   v_used_blocks NUMBER;
 24   v_used_bytes NUMBER;
 25   v_expired_blocks NUMBER;
 26   v_expired_bytes NUMBER;
 27   v_unexpired_blocks NUMBER;
 28   v_unexpired_bytes NUMBER;
 29  begin
 30  DBMS_SPACE.SPACE_USAGE(
 31   segment_owner => v_segment_owner ,
 32   segment_name => v_segment_name , 
 33   segment_type => v_segment_type ,
 34   unformatted_blocks => v_unformatted_blocks ,
 35   unformatted_bytes => v_unformatted_bytes ,
 36   fs1_blocks => v_fs1_blocks  ,
 37   fs1_bytes => v_fs1_bytes , 
 38   fs2_blocks => v_fs2_blocks , 
 39   fs2_bytes => v_fs2_bytes , 
 40   fs3_blocks => v_fs3_blocks , 
 41   fs3_bytes => v_fs3_bytes , 
 42   fs4_blocks => v_fs4_blocks , 
 43   fs4_bytes => v_fs4_bytes , 
 44   full_blocks => v_full_blocks , 
 45   full_bytes => v_full_bytes , 
 46   partition_name => v_partition_name  );
 47  end;
 48  /

PL/SQL procedure successfully completed.

SQL> show user
USER is "SYS"

This may sound silly, but you make sure that HR. NAMES are on the 11.1 database?

Tags: Database

Similar Questions

  • Trigger of the ISO (behavior?) behavior different in 11g (works of 10g, 11g not)

    We have a two master tables, A and B connected by an xref, AB, who has the key to A column and the column key of B... each help-offer combo can only happen once.

    A may have 0 to many Bs, B can be 0 to many as.

    (these tables describe a pool of 'work'... the work can start at different points... If there is flow and life is good, it starts with A, becomes B and so a bond between them, but sometimes has never progresses to B... sometimes there are emergencies, and so B is created... each pool has a Master ID to itself)

    We have a view V1...
    Outer join B AB where corresponds to the button B (one column).

    ... we want to see Group B, if there a records, and as that may be related.

    We have another opinion V2... that selects in V1 where A key is not null.
    (we're too lazy to get another opinion that represents a join B - AB).

    We have a trigger to ISO on V2 (V2 is used by a form, but the problem is the DB level).

    In SQL Developer... in DB10g, V2 shows insertable ACE / ID.
    (the trigger handles all things, gets the data in the table AB, which is what cares the view).

    In SQL Developer... in DB11g, V2 DOES NOT SHOW UP insertable / suppressible.

    The same code in both places. We test 11g, in order to determine our "traps" before that we will occupy migrate.

    With the 10gDB behind the form, follows after a deletion.
    With the 11gDB behind the form, it gives a 'impossible to remove from the view' and begins to talk about keys preserved and row ID.

    Why?

    We know that the data is very good. We like the behavior of 10g.
    The V1 and V2 have good recordset and keys appropriate to AB, and B.

    Without re - write this and similarly built views, what do we do to make it work again?

    All the clues are welcome!

    SM

    SM_Work wrote:
    With the 11gDB behind the form, it gives a 'impossible to remove from the view' and begins to talk about keys preserved and row ID.

    Only one question here is you ;)

    And the facts of talking too much, too little hard.

    What is you get the exact error message?
    What do you do with her?
    ANSI joins is involved?
    Can error be reproduced using SQL * more?
    Looking for metalink? -A first guess could be Bug 14274321

    Could you post the view? -If possible, a version boiled down from it.

    Think I remember a similar discussion (without knowing what we are actually discussing)-finding something like 10g was too lenient and he failed, now 11g.

    Concerning
    Peter

  • Which exam is indifferent to the newcomer in oracle 1zo-1z0-047/051(10g /11g)?

    Hi friends,

    I am new to oracle as I have no experience as an oracle DBA any industry. But have been trained in this area and has a good knowledge of DBA, but some basic knowledge of SQL. I intend to be OCA certified but confused about certification of 10 g / 11 g? I'd rather that we should... Please, someone guide me and how can I precede with them to get the certification?
    Thanks for the help in advance,
    Neha.

    I basically agree with Hub, but I'll just separate the answer somewhat differently.

    (1) for the review SQL:

    Ignore if the review SQL says it is 10g or 11g; the main difference is that 1z0-047 is a SQL expert and is much more difficult than 1z0 - 051.

    So, I would still recommend a beginner to study firstly for 1z0 - 051.
    When towards the end of your exam 1z0-051 study if you feel really confident then a really confident student could jump 1z0-051 and pursue their studies up to the level of the exam 1z0-047 and take that instead. Although this would probably only be advised in the very small number of cases.

    (2) for the review of DBA.

    It is probably best to 11g instead of the 10 g; but there are exceptions.

    -An exception may be if you work with 10g and 11g not.

    -Another exception would be due to the availability of authorized training for satisfy the requirement of the OCP DBA.
    Even if currently targeting DBA OCA; Sir, you will probably find a DBA OCP will be necessary. Who can find courses appropriate for 10 g are available at a great price in a program of the WDP (but 11 g are not), of you can find you already took a course that meets 10 g OCP DBA requirement, but do not satsifdy the requirement for OCP DBA 11 g and which can influence you to choose 10 g OCP DBA.

  • Forms 10g / 11g in Servlet mode vs. shooting mode.

    Hello


    We are trying to push to the top of oracle forms 10g / 11g performance due to network latency problem. I read that we can also run Oracle Forms 11 g / 10g in the current shooting mode which uses 40% less bandwidth, but it comes together with EBS R12. ( http://blogs.oracle.com/stevenChan/2009/06/which_is_better_forms_servlet_or_socket_mode.html )


    I want to know that can we run that Oracle Forms 11 g / 10 g in socket mode. In the affirmative. Please provide the configuration forms11g / 10g in socket mode.

    Thank you and best regards,
    Noman

    Be careful here - performance problems may be the result of many issues - provides a little less network in terms of physical bytes (bytes can be physical?), but which does not always improve performance. You also have other potential problems, for example, if you have any firewall or proxy on your network.

    Bottom line is that for customers not apps you are not supported to run in shooting mode - and even once, even if you were, he could not help you.

    Concerning
    Grant

  • the analysis of 10g / 11g sql?

    Mr President

    I really want to know, how oracle sql is parsed sql statement? She uses LR (0), LR (1) etc. OR whatelse? If I'm not mistaken she begins the statement by research or / and have analyzed the tree. But how she (9i, 10g, 11g)? What does fundamentally? what she runs in the end?

    concerning
    Chrystelle

    Published by: Stephanie Center on August 25, 2009 13:23

    I also want to know this... its an interesting question for R & D

  • Since the update with OS 10.11.6, flash not working not properly

    Just got a new Mac Book Pro, new on mac in general. Had a video to play on a Web site but didn't work not, downloaded Chrome, worked well. Then made the update to OS 10.11.6 (not), and the video does not work (it says: cannot load the Flash plug-in). Made sure plugin has been enabled in my Chrome. Tried to download Flash himself, tried to remove Chrome and Flash and download Chrome still once, nothing works. Now for some reason, it works... What is (and was) happening... Someone has an idea? THX!

    -Chrome has built in Flash.

    -Safari does not come with Flash and use Flash with Safari, you need to download and install Flash

    So this is why worked chrome and Safari worked after downloading and installing Flash. Make sure you just threw always get Flash from the Adobe website.  Once you install Flash from Adobe it has also installed a Flash preferences panel in system preferences and yo can update Flash from here

  • iPhone upgrade of the navigation software now works not properly

    iPhone 5

    New IOS software updated and now the navigation screen not working not properly

    is your site on?

  • IOS 9.3.2 whatsapp works not

    IOS 9.3.2 whatsapp works not

    pls help

  • Some web features working not (buttons, drop-down menus, etc.)

    I have recently reinstalled windows 7 on my machine, and since I had problems with firefox. I had the same exact configuration installation and firefox before reinstall as far as I can remember, and I've not had the problem then. I tried the current version and the beta version of firefox.

    Basically, on some Web sites, there are some things that does not work as it should. Some buttons does nothing, some drop-down menu nothing done, image resizing works not etc.. Maybe it has something to do with javascript? Although most of the javascripts appears.

    Here's an example: on this site: http://www.bitcoinx.com/profit/
    'Reset' and 'Calculate' blue buttons does not work. The effect of the passage of the mouse works, but when I click on them, absolutely nothing happens.

    Rather a general answer I'm afraid, because I don't see an obvious problem & solution:

    1. Note for any problems with the sites that it is always worth to erase cookies from this site and to cache How to clear Firefox cache &delete cookies to remove the information from Web sites is stored on your computer
    2. Try in safe mode (see questions to troubleshoot Firefox in Safe Mode) that is accessible from your Firefox Button. (but at this stage try not yet reset)
    3. If the above does not help then try the Firefox reset, but be aware, you will lose the open tabs, extensions and preferences, you may need to favorite things first if you can find them still see Firefox Refresh - reset the settings and Add-ons
  • My Apple iPhone 5 touchscreen doesn't work not when the call comes. This problem is only in locked mode and mode unlocked when the call come it works normally. The problem is only locked Iphone and a just coming guard time. give soltn

    Hello can anyone give solution to my problem.

    my iPhone touch 5 works not when it is in locked mode and it's time all incoming call came the touch works do not. other times, the touch works normally wat is the problem. ?

    If you disturb not activated. Settings > do not disturb.

  • Keyboard and mouse not working not

    Keyboard and mouse not working not
    I tried to use the method of matching and again, it won't work. What should I do? Devastated and frustrated

    The same problem. Qosmio all in one PC. Also tried the instructions for pairing and the light indicates successful pairing but mouse and keyboard still does not. Can someone help please...

  • Satellite C660-115 - error message "Gfxui works not" at startup

    I got a Toshiba Satellite C660-115 Windows 7 and at startup I get the message ' gfxui works not ", can I ignore what my laptop seems to work ok.

    It is a problem with the GUI GUI Intel.
    You need to reinstall the Intel graphics driver.

    Visit the page of the Toshiba UE driver and download and save the correct Intel driver

  • Fn keys not working not not on my Satellite P200D-127

    Function keys not working not not on my Toshiba Satellite P200D-127

    I try to find the drivers for the keyboard, but not luck :(

    I'm trying to solve this problem since I bought this laptop.

    Can someone help me with this problem?

    P200D-127 is part of the PSPBLE series.
    The Toshiba European page doesn't provide the drivers XP especially for this series.
    But there are a few other P200 series and XP drivers were already released.

    Then why you n t check the hotkey Utility released for other laptop P200 series.
    Maybe it will work, if not, then there is nothing to do but wait until the drivers have been released.

  • Fingerprint reader not working not

    HI, I just recently to upgread my laptop operating system from windows 7 to Windows 8.

    Everything works well except for my fingerprint reader, his work not at all.

    I had downloaded and installed all the drivers from the Web site below, but it still does not.

    Can you help me solve this problem?

    Product name: HP Pavilion dv7 Notebook PC

    Product number: A3V80PA #UUF

    Current OS: Windows 8 Pro 64-bit

    http://h10025.www1.HP.com/ewfrf/wc/softwareCategory?OS=4132 & LC = on & CC = US & DLC = in & sw_lang = & Product = 5207...

    Press the Windows key + X and select Device Manager. Under biometrics, fingerprint reader not appear without one? or one! icon next to him?

    You mentioned that you have installed the driver. Did you also install the program SimplePass found on the link below? I saw a version of Windows 8 for the unit, but the version of Windows 7 can work. If the version of Windows 7 does not work, try right-clicking on the SimplePass program and select troubleshoot compatibility mode to see if it gets it to work.

    http://h10025.www1.HP.com/ewfrf/wc/softwareDownloadIndex?softwareitem=ob-103162-1 & CC = US & DLC = in & LC = on & os = 4063 & Product = 5207968 & sw_lang =

  • Links not working not

    Links not working not not in Mail, Safari. Both freeze.

    Having the same problem with my air of iPad 2 since the upgrade to iOS 9.3 yesterday.

Maybe you are looking for