How to shrink memory occupied by oracle

I have Oracle 9i and the drive become full and i want to shrink the memory used by oracle. Oradata occupies 2.35 GB. is there any way to reduce the space?

What exactly you want to reduce
space used or the memory used by oracle.
If you want to reduce space drop un necessary tables and objects and users and try to reduce the size of datafile.
And if you want to reduce memory size then you need to change sga_max parameter in init.ora file to reduce memory used by oracle.

Similar Messages

  • How to find memory taken by Oracle processes using top command

    I wanted to know how to find the memory taken by Oracle processes using top command. The output of the top command is as follows as an example:
    Mem: 16436072k total, 16215708k used, 220364k free, 395128k buffers
    Swap: 25165816k total, 1168288k used, 23997528k free, 13366520k cached
    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    27281 oraprod 15 0 6705m 1.3g 1.3g S 0.0 8.6 61:44.71 oracle
    27383 oraprod 15 0 6702m 1.2g 1.2g S 0.0 7.7 2:22.75 oracle
    5199 oraprod 16 0 6745m 1.1g 1.0g S 0.0 6.8 2:51.23 oracle
    The different Oracle processes could be Oracle database, Oracle listener, Oracle enterprise manager etc.
    I hope, my question is clear as to how to find the memory taken by a process using top command.
    Please revert with the reply to my query.
    Regards

    a short and correct answer would be: you can't.
    As oracle uses a fair amount of shared memory, and that shared memory is attached to most of the oracle processes, the same memory appears a number of times.
    you should rephrase your question / what is it you want to achieve?
    you can ask oracle how much memory is assigned to it, v$sga, v$sgastat, v$process (for PGA). moreover, you as DBA are the one who configured that.
    you can look at major an minor faults per process to see what is causing the paging (if you have any).
    you can also look at the /proc/pid/statm pseudofilesystem for your oracle pids.

  • How to shrink database for the Oracle

    Hi,
    As you know, in the Sql server database there is a "shrink database" for the shrink the database space, but how to do that for the Oracle9i?
    Any comments would be appreciated.
    Thanks a lot

    You will have to resize ur datafiles to shrink ur db. Here are the steps
    1) select file_name,file_id,bytes from dba_data_files;
    This will give u the current size of datafiles.
    2) select file_id,sum(bytes) from dba_free_space group by file_id;
    This will give u the free space in the datafiles. If the file_id is not listed in this query that means the file is fully occupied/used.
    (used space = bytes col from query 1 - sum(bytes) col from query 2)
    3) alter database datafile file_id resize ### ;
    Enter the value you wanna resize based upon ur req. You cannot shrink the datafiles below the used space.
    Regards,
    http://askyogesh.com

  • Factors for increase in memory occupied by Oracle 11g database

    I wanted to know all the possible factors which can account for the increase in the memory required for an Oracle 11g database. Let’s take an example,
    1) Say if the memory allocated for an Oracle 11g instance is 8GB which is 50% of the memory of 16GB allocated to the machine on which Oracle 11g is installed.
    2) The max sessions are 300.
    With this example in mind, I had the following queries:
    1) Is the memory taken by 100 sessions or 300 sessions going to be within the limit of 8GB allocated to the Oracle?
    2) Say if the max sessions is increased to 400, would the memory taken the 100 extra sessions would be within 8GB or would that be extra?
    I hope my query is clear.
    Please revert with the reply to my query.
    Regards

    Memory is allocated for the session only when that session is created by the listener, and the memory used by that session will fluctuate depending on the workload it's doing.
    300 or 400 it won't pre-allocate all the memory for the fixed maximum number of sessions, it's dynamic. What oracle does is allocated all the memory you gave it in the PGA and the SGA and will do it's best to work with it for the current workload, it won't suddenly eat more memory without you telling it's okay to.
    The only scenario I could see this happening is if you have a lot of sessions and a small PGA. In that case, oracle does go ahead and eat more memory than you gave it because it can't make due with the current PGA. So it eats more memory so sessions can be created and maintened. See PGA over- allocation.
    To quote the good ol' docs:
    Over allocating PGA memory can happen if the value ofPGA_AGGREGATE_TARGET is too small. When this happens, the Oracle Database cannot honor the value ofPGA_AGGREGATE_TARGET and extra PGA memory needs to be allocated.

  • How to find out memory occupied by a table and a user?

    I want to find out how much memory space is occupied by a table and I also wants to know how much data, a user is using.
    Eg: Consider Emp table of 8 columns and 14 rows. I need memory occupied by Emp table.
    Suppose consider "Scott" user is created 4 tables,3 sequences,2 indexes, 1 view.
    I want to know how much memory is used by Scott?

    Did you mean the object size?
    --For particular object size in MEGABYTEs
    select sum(bytes)/1024/1024 mega_bytes
    from dba_segments
    where segment_name = 'EMP'
    and owner = 'SCOTT';
    MEGA_BYTES
        0.0625
    --For a schema size
    select segment_type,sum(bytes)/1024/1024 mega_bytes
    from dba_segments
    where owner = 'SCOTT'
    group by rollup(segment_type);
    SEGMENT_TYPE       MEGA_BYTES
    INDEX                  1.0625
    LOBINDEX               0.0625
    LOBSEGMENT             0.0625
    TABLE                      15
                          16.1875

  • The danger of memory target in Oracle 11g - request for discussion.

    Hello, everyone.
    This is not a question, but kind of request for discussion.
    I believe that many of you heard something about automatic memory management in Oracle 11g.
    The concept is that Oracle manages the target size of SGA and PGA. Yes, believe it or not, all we have to do is just to tell Oracle how much memory it can use.
    But I have a big concern on this. The optimizer takes the PGA size into consideration when calculating the cost of sort-related operations.
    So what would happen when Oracle dynamically changes the target size of PGA? Following is a simple demonstration of my concern.
    UKJA@ukja116> 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
    -- Configuration
    *.memory_target=350m
    *.memory_max_target=350m
    create table t1(c1 int, c2 char(100));
    create table t2(c1 int, c2 char(100));
    insert into t1 select level, level from dual connect by level <= 10000;
    insert into t2 select level, level from dual connect by level <= 10000;
    -- First 10053 trace
    alter session set events '10053 trace name context forever, level 1';
    select /*+ use_hash(t1 t2) */ count(*)
    from t1, t2
    where t1.c1 = t2.c1 and t1.c2 = t2.c2
    alter session set events '10053 trace name context off';
    -- Do aggressive hard parse to make Oracle dynamically change the size of memory segments.
    declare
      pat1     varchar2(1000);
      pat2     varchar2(1000);
      va       number;
      vc       sys_refcursor;
      vs        varchar2(1000);
    begin
      select ksppstvl into pat1
        from sys.xm$ksppi i, sys.xm$ksppcv v   -- views for x$ table
        where i.indx = v.indx
        and i.ksppinm = '__pga_aggregate_target';
      for idx in 1 .. 10000000 loop
        execute immediate 'select count(*) from t1 where rownum = ' || (idx+1)
              into va;
        if mod(idx, 1000) = 0 then
          sys.dbms_system.ksdwrt(2, idx || 'th execution');
          select ksppstvl into pat2
          from sys.xm$ksppi i, sys.xm$ksppcv v   -- views for x$ table
          where i.indx = v.indx
          and i.ksppinm = '__pga_aggregate_target';
          if pat1 <> pat2 then
            sys.dbms_system.ksdwrt(2, 'yep, I got it!');
            exit;
          end if;
        end if;
      end loop;
    end;
    -- As to alert log file,
    25000th execution
    26000th execution
    27000th execution
    28000th execution
    29000th execution
    30000th execution
    yep, I got it! <-- the pga target changed with 30000th hard parse
    -- Second 10053 trace for same query
    alter session set events '10053 trace name context forever, level 1';
    select /*+ use_hash(t1 t2) */ count(*)
    from t1, t2
    where t1.c1 = t2.c1 and t1.c2 = t2.c2
    alter session set events '10053 trace name context off';With above test case, I found that
    1. Oracle invalidates the query when internal pga aggregate size changes, which is quite natural.
    2. With changed pga aggregate size, Oracle recalculates the cost. These are excerpts from the both of the 10053 trace files.
    -- First 10053 trace file
    PARAMETERS USED BY THE OPTIMIZER
      PARAMETERS WITH ALTERED VALUES
    Compilation Environment Dump
    _smm_max_size                       = 11468 KB
    _smm_px_max_size                    = 28672 KB
    optimizer_use_sql_plan_baselines    = false
    optimizer_use_invisible_indexes     = true
    -- Second 10053 trace file
    PARAMETERS USED BY THE OPTIMIZER
      PARAMETERS WITH ALTERED VALUES
    Compilation Environment Dump
    _smm_max_size                       = 13107 KB
    _smm_px_max_size                    = 32768 KB
    optimizer_use_sql_plan_baselines    = false
    optimizer_use_invisible_indexes     = true
    Bug Fix Control Environment10053 trace file clearly says that Oracle recalculates the cost of the query with the change of internal pga aggregate target size. So, there is a great danger of unexpected plan change while Oracle dynamically controls the memory segments.
    I believe that this is a desinged behavior, but the negative side effect is not negligible.
    I just like to hear your opinions on this behavior.
    Do you think that this is acceptable? Or is this another great feature that nobody wants to use like automatic tuning advisor?
    ================================
    Dion Cho - Oracle Performance Storyteller
    http://dioncho.wordpress.com (english)
    http://ukja.tistory.com (korean)
    ================================

    I made a slight modification with my test case to have mixed workloads of hard parse and logical reads.
    *.memory_target=200m
    *.memory_max_target=200m
    create table t3(c1 int, c2 char(1000));
    insert into t3 select level, level from dual connect by level <= 50000;
    declare
      pat1     varchar2(1000);
      pat2     varchar2(1000);
      va       number;
    begin
      select ksppstvl into pat1
        from sys.xm$ksppi i, sys.xm$ksppcv v
        where i.indx = v.indx
        and i.ksppinm = '__pga_aggregate_target';
      for idx in 1 .. 1000000 loop
        -- try many patterns here!
        execute immediate 'select count(*) from t3 where 10 = mod('||idx||',10)+1' into va;
        if mod(idx, 100) = 0 then
          sys.dbms_system.ksdwrt(2, idx || 'th execution');
          for p in (select ksppinm, ksppstvl
              from sys.xm$ksppi i, sys.xm$ksppcv v
              where i.indx = v.indx
              and i.ksppinm in ('__shared_pool_size', '__db_cache_size', '__pga_aggregate_target')) loop
              sys.dbms_system.ksdwrt(2, p.ksppinm || ' = ' || p.ksppstvl);
          end loop;
          select ksppstvl into pat2
          from sys.xm$ksppi i, sys.xm$ksppcv v
          where i.indx = v.indx
          and i.ksppinm = '__pga_aggregate_target';
          if pat1 <> pat2 then
            sys.dbms_system.ksdwrt(2, 'yep, I got it! pat1=' || pat1 ||', pat2='||pat2);
            exit;
          end if;
        end if;
      end loop;
    end;
    /This test case showed expected and reasonable result, like following:
    100th execution
    __shared_pool_size = 92274688
    __db_cache_size = 16777216
    __pga_aggregate_target = 83886080
    200th execution
    __shared_pool_size = 92274688
    __db_cache_size = 16777216
    __pga_aggregate_target = 83886080
    300th execution
    __shared_pool_size = 88080384
    __db_cache_size = 20971520
    __pga_aggregate_target = 83886080
    400th execution
    __shared_pool_size = 92274688
    __db_cache_size = 16777216
    __pga_aggregate_target = 83886080
    500th execution
    __shared_pool_size = 88080384
    __db_cache_size = 20971520
    __pga_aggregate_target = 83886080
    1100th execution
    __shared_pool_size = 92274688
    __db_cache_size = 20971520
    __pga_aggregate_target = 83886080
    1200th execution
    __shared_pool_size = 92274688
    __db_cache_size = 37748736
    __pga_aggregate_target = 58720256
    yep, I got it! pat1=83886080, pat2=58720256Oracle continued being bounced between shared pool and buffer cache size, and about 1200th execution Oracle suddenly stole some memory from PGA target area to increase db cache size.
    (I'm still in dark age on this automatic memory target management of 11g. More research in need!)
    I think that this is very clear and natural behavior. I just want to point out that this would result in unwanted catastrophe under special cases, especially with some logic holes and bugs.
    ================================
    Dion Cho - Oracle Performance Storyteller
    http://dioncho.wordpress.com (english)
    http://ukja.tistory.com (korean)
    ================================

  • ORA-4030  and memory usage by oracle

    I'm looking this documento on metalink:
    Note:233869.1
    Diagnosing and Resolving ORA-4030 errors
    II want to know which process is requesting too much memory.
    The document says:
    On Microsoft windows systems, oracle is implemented by using threads in a single oracle process. Up to now, i didn't find a way to view the memory usage per thread. We can however check if oracle and the operating system agree on the memory used by oracle.
    For the Operating system point of view, we can use task manager. Use the view pusbutton and select Select Columns... make sure Virtual Memory Size is selected.
    And in my system is: 1.716.712 K
    Then I execute this select to get the memory size as viewed by oracle, however, not including the process stack and code size:
    select sum(bytes)/1024/1024 Mb from
    (select bytes from v$sgastat
    union
    select value bytes from
    v$sesstat s,
    v$statname n
    where
    n.STATISTIC# = s.STATISTIC# and
    n.name = 'session pga memory'
    MB
    5711,88542
    How can it possible? 5G!

    Hi,
    It may be from the Paging space of your SYSTEM.
    If you want to know in detail.
    select details from the v$sesstat and get the session wise PGA allocated.
    I also did not understood the statement "And in my system is: 1.716.712 K"
    Dilipkumar Patel.

  • Shrinking BLOB tablespace in Oracle 10g

    Hello,
    I have table created with 32 GB in Oracle 10g with BLOB field containing images. after that I have deleted some of the images from the table but when I'm checking free space, it is show full 32 GB. But when I'm looking at Toad it shows me out of 32 GB 17 GB is free.
    my question is how to shrink/resize blob tablespace/table having BLOB field in oracle 10g 2rel ?

    Hello urgent,
    Tablespace management is not really an Oracle Spatial topic, I suppose these are georaster images?. You probably want to search and post in the more general database forums.
    The quick answer is that it is not easy. Oracle tablespaces may only be "shrunk" if the free space is at the end of the datafile at the "high water" mark. If by some wild coincidence the images you removed were indeed at the back of the datafile, then you could alter the datafile with a RESIZE command. But the odds of that being the case are incredibly low. If you really, really MUST recover that space then about the only thing to do is export the data, delete it from the tablespace, shrink the tablespace and then import the data back in. Another approach if you have the space is just move the data into another empty tablespace and then drop the original tablespace. I would guess that the salary expended for you to take everything offline and do this would be more than just buying another cheap disk. Considering that in doing your daily work you may well indeed be in this position again in a few weeks, then it makes even less sense.
    Now having said all that I have been in the situation where I MUST recover that space without taking everything offline.
    One thing you can try is to "pop" the last items off the datafile (moving them to another tablespace) identified using the query below. But this is an exercise in futility unless your resources happen to be nicely "chunked" together near the highwater mark. Oracle tends to stripe resources across the available space in the datafile. So you might find you need to move half the contents before recovering any significant amount of space.
    Cheers,
    Paul
       SELECT '
       a.owner, '
       a.segment_name, '
       a.segment_type, '
       a.block_id, '
       a.tablespace_name '
       FROM '
       dba_extents a '
       WHERE '
       a.file_id = ( '
          SELECT '
          b.file_id '
          FROM '
          dba_data_files b '
          WHERE '
          b.file_name = :p1 '
       ORDER BY '
       a.block_id DESC

  • Memory used by oracle 11g processes on solaris 10

    I am running oracle 11.1.0.7 on solaris 10. The database uses some 280M virtual memory size for each oracle backup or user process. See the SZ column in output of ps -efl below.
    I just wonder how come oracle that much of memory for each process. Is that something we can control through some system/database parameters or is that the way oracle 11g on solaris works?
    oracle@taut $ ps -efl|grep cttrain6
    F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD
    0 S oracle 2490 1 0 40 20 ? 284111 ? 12:23:37 ? 0:01 ora_q001_cttrain6
    0 S oracle 9698 1 0 40 20 ? 283837 ? 13:37:51 ? 0:00 ora_w000_cttrain6
    0 S oracle 2147 1 0 40 20 ? 285464 ? 12:18:11 ? 0:15 ora_lgwr_cttrain6
    0 S oracle 2135 1 0 40 20 ? 283878 ? 12:18:09 ? 0:17 ora_dia0_cttrain6
    0 S oracle 9979 11472 0 50 20 ? 211 ? 13:40:24 pts/2 0:00 grep cttrain6
    0 S oracle 2157 1 0 40 20 ? 283942 ? 12:18:13 ? 0:47 ora_mmnl_cttrain6
    0 S oracle 2129 1 0 40 20 ? 283830 ? 12:18:09 ? 0:06 ora_diag_cttrain6
    0 S root 2159 1 0 40 20 ? 263214 ? 12:18:13 ? 3:52 ora_dism_cttrain6
    0 S oracle 9565 1 0 40 20 ? 283861 ? 13:35:18 ? 0:00 oraclecttrain6 (LOCAL=NO)
    0 S oracle 2482 1 0 40 20 ? 283837 ? 12:22:55 ? 0:01 ora_q000_cttrain6
    0 S oracle 2884 1 0 40 20 ? 283830 ? 12:27:46 ? 0:01 ora_smco_cttrain6
    0 S oracle 2153 1 0 40 20 ? 283846 ? 12:18:12 ? 0:01 ora_reco_cttrain6
    0 S oracle 2464 1 0 40 20 ? 284150 ? 12:22:42 ? 0:01 ora_fbda_cttrain6
    0 S oracle 2123 1 0 40 20 ? 284270 ? 12:18:08 ? 0:14 ora_pmon_cttrain6
    0 S oracle 2454 1 0 40 20 ? 285190 ? 12:22:34 ? 0:01 ora_arc1_cttrain6
    0 S oracle 2145 1 0 40 20 ? 284792 ? 12:18:11 ? 0:06 ora_dbw3_cttrain6
    0 S oracle 2141 1 0 40 20 ? 284792 ? 12:18:10 ? 0:08 ora_dbw1_cttrain6
    0 S oracle 2149 1 0 40 20 ? 284112 ? 12:18:11 ? 0:25 ora_ckpt_cttrain6
    0 S oracle 9513 1 0 40 20 ? 283885 ? 13:34:18 ? 0:02 oraclecttrain6 (LOCAL=NO)
    0 S oracle 2125 1 0 0 RT ? 283830 ? 12:18:08 ? 0:07 ora_vktm_cttrain6
    0 S oracle 2143 1 0 40 20 ? 284792 ? 12:18:10 ? 0:04 ora_dbw2_cttrain6
    0 S oracle 2459 1 0 40 20 ? 285198 ? 12:22:35 ? 0:01 ora_arc3_cttrain6
    0 S oracle 2451 1 0 40 20 ? 285190 ? 12:22:33 ? 0:01 ora_arc0_cttrain6
    0 S oracle 2131 1 0 40 20 ? 283838 ? 12:18:09 ? 0:02 ora_dbrm_cttrain6
    0 S oracle 2139 1 0 40 20 ? 284872 ? 12:18:10 ? 0:03 ora_dbw0_cttrain6
    0 S oracle 2466 1 0 40 20 ? 283830 ? 12:22:44 ? 0:01 ora_qmnc_cttrain6
    0 S oracle 2151 1 0 40 20 ? 283974 ? 12:18:12 ? 0:05 ora_smon_cttrain6
    0 S oracle 2457 1 0 40 20 ? 285198 ? 12:22:34 ? 0:01 ora_arc2_cttrain6
    0 S oracle 2133 1 0 40 20 ? 283830 ? 12:18:09 ? 0:02 ora_psp0_cttrain6
    0 S oracle 2155 1 0 40 20 ? 284656 ? 12:18:12 ? 0:11 ora_mmon_cttrain6
    0 S oracle 2137 1 0 40 20 ? 283830 ? 12:18:09 ? 0:02 ora_mman_cttrain6

    user567271 wrote:
    I am running oracle 11.1.0.7 on solaris 10. The database uses some 280M virtual memory size for each oracle backup or user process. See the SZ column in output of ps -efl below.
    I just wonder how come oracle that much of memory for each process. Is that something we can control through some system/database parameters or is that the way oracle 11g on solaris works?As you have already said, it is "virtual" memory. This is not real, "physical" memory. Solaris has a virtual memory sub-system layer in it, as do almost all other modern operating systems. Google "operating system virtual memory" to find out more on what virtual memory is and how it works.
    In terms of your question, virtual memory means that not all of a process's memory space needs to be in physical memory for it to run and execute. The process virtual memory space is broken up into equal sized pages, and only those pages currently being referenced (used) are mapped and read into physical memory pages. Thus the virtual size of a process is irrelevant to how much physical memory is being used. Look at the RSS column (ps -ely) for the physical memory used by each process - Resident Set Size.
    Furthermore, an Oracle shadow server process (oracle) uses a large segment of shared memory for the SGA. This shared memory only exists once in physical memory, and is shared amongst all the shadow server processes. But it is mapped into the address space of each process, and so appears and is counted in the virtual and physical memory of each process.
    So each reported virtual size (SZ) of each oracle process is also counting the mapped shared memory pages in each process, and so counting the same pages multiple times across all the oracle processes. You need to subtract the size of the SGA shared memory from the virtual size of each oracle process to determine the private, local memory per shadow process.
    If you want a further breakdown of the memory map of each process, look at the manual pages for pmap (man pmap), which will break it down by text, private data, zero initialized, shared and other types. By subtracting the shared size from the resident size you can get a true view of the private, local memory per oracle shadow server process.
    John

  • How much space is occupied by OSX Mountain Lion on the hard disk

    Hi guys,
    can someone tell me please how much space is occupied by Mountain Lion on hd? I whould like to buy a new Hybrid hd but it has only 8 Gb of nand flah memory.
    I fear that operating system will be divided on both hd partitions (ssd and serial ata 5400 rpm.)... Someone have some experience with hybrid storage?
    Thanks a lot

    Then you don't want that model. You want the Momentus XT500 which is a 7200 RPM drive. For example, Seagate Momentus XT 500 GB 2.5 Inch Solid State Hybrid Drive ...

  • Examining how much resources are left in Oracle?

    Hello. I'm writing some programs that interface with Oracle. I want to know if my programs are leaking any oracle resources. Is there a way to do that per connection/session? 'show sga' isn't very useful.
    I'm running a bunch of sqlplus queries over 10,000 times which will eventually call some pl/sql code underneath, which in turn calls some external c++ programs. Some of these pl/sql programs dynamically create tables, views, and procs. I'm doing this 10k test on one connection.
    I'm using top and I see that Oracle is slowly gaining memory, but i'm not sure what that would be that Oracle is just keeping track of items for house keeping purposes, or if my program is genuinely leaking.
    Anyways, any insight/tools to use would be great.
    thanks.

    Do not much like the the phrasing of your questions. A lot of resources in Oracle is shared resources. The db buffer cache being 100% utilised is not an indication of resource leakage, or we-have-a-problem - it is a lot better to have data in the buffer cache than on disk when it comes to I/O. A fully utilised buffer cache is a lot more desirable than a stingy one that aggressively try not to be an "exhausted" resource at 100% utilisation.
    There are also numerous ways to monitor memory usage in Oracle. Oracle consists of a number of different processes (on Unix/Linux each with its own data segment - stack & heap). Oracle uses shared memory. On the o/s side, what is reported at memory footprint of a process. The actual data segment alone? Global/shared memory used? A lot of memory reporting via top and ps are ambiguous, if you do not understand just what kernel calls are made to calculate this "memory" usage of a process.
    Besides, it is very seldom an issue of "how much resources are left"? And even when one happens to be pushing resources, that is the wrong question to ask. Why? Because it is not about how much is left, but how well the resources are configured and being used.
    And from the sounds of it, "Some of these pl/sql programs dynamically create tables, views, and procs." - it does not sound like it is being effectively used at all.
    For PL/SQL code to be run 10's of 1000's times, and dynamically create database objects..? It's the kind of design and approach that makes me reach for my lead pipe.

  • How to install memory modules on a macbook pro 15"

    I run Windows 7 via parallels desktop on my macbook pro. How do I type special characters on a Word document using the mac keyboard?

    how to install memory modules on a macbook pro 15"
    Read the manual / user guide that came with your comptuer or download it from http://support.apple.com/manuals/
    I run Windows 7 via parallels desktop on my macbook pro. How do I type special characters on a Word document using the mac keyboard?
    Post your question on the Paralells forums:  http://forums.parallels.com

  • How to print a something in oracle sql developer

    Hello all
    Do you know How to print a something in oracle sql developer? i mean for example in the query we write something, (offcourse i dont mean comments)
    thank u in advance.
    best

    1003209 wrote:
    Hello all
    Do you know How to print a something in oracle sql developer? i mean for example in the query we write something, (offcourse i dont mean comments)
    thank u in advance.
    bestDBMS_OUTPUT()

  • How to wrap a view in oracle

    Does any one know how to wrap a view in Oracle, I know it is not possible, yet. Are there any third party software to wrap the logic in the view.
    Thanks,
    Sanjay

    Your best bet is to write a view that queries the source tables and contains any necessary business logic
    CREATE VIEW VBASE AS SELECT A.COLUMN_A FROM TABLE_1 A, TABLE_2 B, TABLE_3 C WHERE A.ID = B.ID AND B.ID = C.ID;
    create a view for exposure to the user that queries the base view.
    CREATE VIEW VSECURE AS SELECT COLUMN_B FROM VBASE;
    and grant privileges to VSECURE.
    GRANT SELECT ON VSECURE TO SECURE_USER;
    This will allow the user to see, query, and describe VSECURE without seeing the definition for VBASE.
    The advantage of the this approach is that the query engine can still push predicates down into the base view to optimize the performance or the query where as this is limited with the pipeline function and can become a tuning headache.
    eg.
    SQL> -----------------------------------------
    SQL> -- create some tables
    SQL> -----------------------------------------
    SQL> CREATE TABLE table_1(ID NUMBER, MESSAGE VARCHAR2(100))
    Table created.
    SQL> CREATE TABLE table_2(ID NUMBER, message2 VARCHAR2(100))
    Table created.
    SQL> CREATE TABLE table_3(ID NUMBER, message3 VARCHAR2(100))
    Table created.
    SQL> -----------------------------------------
    SQL> -- populate tables with some data
    SQL> -----------------------------------------
    SQL> INSERT INTO table_1
    SELECT ROWNUM,
    CASE
    WHEN MOD ( ROWNUM, 50 ) = 0 THEN 'HELLO there joe'
    ELSE 'goodbye joe'
    END
    FROM DUAL
    CONNECT BY LEVEL < 1000000
    999999 rows created.
    SQL> INSERT INTO table_2
    SELECT ROWNUM,
    CASE
    WHEN MOD ( ROWNUM, 50 ) = 0 THEN 'how are you joe'
    ELSE 'good to see you joe'
    END
    FROM DUAL
    CONNECT BY LEVEL < 1000000
    999999 rows created.
    SQL> INSERT INTO table_3
    SELECT ROWNUM,
    CASE
    WHEN MOD ( ROWNUM, 50 ) = 0 THEN 'just some data'
    ELSE 'other stuff'
    END
    FROM DUAL
    CONNECT BY LEVEL < 1000000
    999999 rows created.
    SQL> -----------------------------------------
    SQL> --create base view
    SQL> -----------------------------------------
    SQL> CREATE OR REPLACE VIEW vbase AS
    SELECT a.MESSAGE,
    c.message3
    FROM table_1 a,
    table_2 b,
    table_3 c
    WHERE a.ID = b.ID
    AND b.ID = c.ID
    View created.
    SQL> -----------------------------------------
    SQL> --create secure view using base view
    SQL> -----------------------------------------
    SQL> CREATE OR REPLACE VIEW vsecure AS
    SELECT MESSAGE,
    message3
    FROM vbase
    View created.
    SQL> -----------------------------------------
    SQL> -- create row type for pipeline function
    SQL> -----------------------------------------
    SQL> CREATE OR REPLACE TYPE vbase_row
    AS OBJECT
    message varchar2(100),
    message3 varchar2(100)
    Type created.
    SQL> -----------------------------------------
    SQL> -- create table type for pipeline function
    SQL> -----------------------------------------
    SQL> CREATE OR REPLACE TYPE vbase_table
    AS TABLE OF vbase_row;
    Type created.
    SQL> -----------------------------------------
    SQL> -- create package
    SQL> -----------------------------------------
    SQL> CREATE OR REPLACE PACKAGE pkg_getdata AS
    FUNCTION f_get_vbase
    RETURN vbase_table PIPELINED;
    END;
    Package created.
    SQL> -----------------------------------------
    SQL> -- create package body with pipeline function using same query as vbase
    SQL> -----------------------------------------
    SQL> CREATE OR REPLACE PACKAGE BODY pkg_getdata AS
    FUNCTION f_get_vbase
    RETURN vbase_table PIPELINED IS
    CURSOR cur IS
    SELECT a.MESSAGE,
    c.message3
    FROM table_1 a,
    table_2 b,
    table_3 c
    WHERE a.ID = b.ID
    AND b.ID = c.ID;
    BEGIN
    FOR rec IN cur
    LOOP
    PIPE ROW ( vbase_row ( rec.MESSAGE, rec.message3 ) );
    END LOOP;
    END;
    END pkg_getdata;
    Package body created.
    SQL> -----------------------------------------
    SQL> -- create secure view using pipeline function
    SQL> -----------------------------------------
    SQL> CREATE or replace VIEW vsecure_with_pipe AS
    SELECT *
    FROM TABLE ( pkg_getdata.f_get_vbase ( ) )
    View created.
    SQL> -----------------------------------------
    SQL> -- this would grant select on the 2 views, one with nested view, one with nested pipeline function
    SQL> -----------------------------------------
    SQL> GRANT SELECT ON vsecure TO test_user
    Grant complete.
    SQL> GRANT SELECT ON vsecure_with_pipe TO test_user
    Grant complete.
    SQL> explain plan for
    SELECT *
    FROM vsecure
    WHERE MESSAGE LIKE 'HELLO%'
    Explain complete.
    SQL> SELECT *
    FROM TABLE ( DBMS_XPLAN.display ( ) )
    PLAN_TABLE_OUTPUT
    Plan hash value: 3905984671
    | Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 16939 | 2365K| | 3098 (3)| 00:00:54 |
    |* 1 | HASH JOIN | | 16939 | 2365K| 2120K| 3098 (3)| 00:00:54 |
    |* 2 | HASH JOIN | | 24103 | 1835K| | 993 (5)| 00:00:18 |
    |* 3 | TABLE ACCESS FULL| TABLE_1 | 24102 | 1529K| | 426 (5)| 00:00:08 |
    | 4 | TABLE ACCESS FULL| TABLE_2 | 1175K| 14M| | 559 (3)| 00:00:10 |
    | 5 | TABLE ACCESS FULL | TABLE_3 | 826K| 51M| | 415 (3)| 00:00:08 |
    Predicate Information (identified by operation id):
    1 - access("B"."ID"="C"."ID")
    2 - access("A"."ID"="B"."ID")
    3 - filter("A"."MESSAGE" LIKE 'HELLO%')
    Note
    PLAN_TABLE_OUTPUT
    - dynamic sampling used for this statement
    23 rows selected.
    SQL> -----------------------------------------
    SQL> -- note that the explain plan shows the predicate pushed down into the base view.
    SQL> -----------------------------------------
    SQL> explain plan for
    SELECT count(*)
    FROM vsecure_with_pipe
    WHERE MESSAGE LIKE 'HELLO%'
    Explain complete.
    SQL> SELECT *
    FROM TABLE ( DBMS_XPLAN.display ( ) )
    PLAN_TABLE_OUTPUT
    Plan hash value: 19045890
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 2 | 15 (0)| 00:00:01 |
    | 1 | SORT AGGREGATE | | 1 | 2 | | |
    |* 2 | COLLECTION ITERATOR PICKLER FETCH| F_GET_VBASE | | | | |
    Predicate Information (identified by operation id):
    2 - filter(VALUE(KOKBF$) LIKE 'HELLO%')
    14 rows selected.
    SQL> -----------------------------------------
    SQL> -- note that the filter is applied on the results of the pipeline function
    SQL> -----------------------------------------
    SQL> set timing on
    SQL> SELECT count(*)
    FROM vsecure
    WHERE MESSAGE LIKE 'HELLO%'
    COUNT(*)
    19999
    1 row selected.
    Elapsed: 00:00:01.42
    SQL> SELECT count(*)
    FROM vsecure_with_pipe
    WHERE MESSAGE LIKE 'HELLO%'
    COUNT(*)
    19999
    1 row selected.
    Elapsed: 00:00:04.11
    SQL> -----------------------------------------
    SQL> -- note the difference in the execution times.
    SQL> -----------------------------------------

  • How a procedure is compiled in oracle ? (implicit and explicit compilation)

    how a procedure is compiled in oracle ? (implicit and explicit compilation)

    When you create a proceudre oracle automatically compile and stored it. Use the following syntax to compile a procedure
    ALTER PROCEDURE hr.remove_emp COMPILE;
    Thanks

Maybe you are looking for

  • Insignia LED-LCD HDTV Model: NS-32E570A11

    I am Handicapped & Disabled & Must be hooked up to medical experiment for 6-7 hours a day & remain in bed & awake during this time.  I purchased this TV :   Insignia  LED-LCD HDTV Model: NS-32E570A11 after my 7 month old Dynex™ - 32" Class / 720p / 6

  • New problem in Incopy CS4

    This is my first ever post - and it has to be a problem! We've been using Incopy for a few years without any issues. Our editor and designer works off-site so they share packages. The editor went to Create for Indesign and email and it didn't work -

  • Restoring only certain files after reinstall

    Hi Everyone, I want to do a fresh install of Mavericks on my Mac Mini because it's become bloated with a bunch of work stuff and is super slow. I don't need any of the stuff in my own profile as it's now all on my MBP. When I do the restore from Time

  • Error message re flash download

    I received this error message - any advice? Adobe Reader could not open 'install_flash_player_osx_ub-6.dmg' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn'

  • IPad "crashes" when opening large app such a USA Today, or scrolling through Facebook

    When I scroll through Facebook, or open USA Today, the app quits and goes back to screen of app logos