CPU used by oracle user

Hi,
on 10 g R2, on Windows SEVER 2003
oracle user SCOTT connect from SQLPLUS and runs a large query. Is there any way to see how much CPU does he use ?
Thanks.

CPU used by a user(session wise)
select a.sid, a.username, a.osuser, c.name, b.value
from v$session a, v$sesstat b, v$statname c
where a.sid = b.sid
and b.statistic# = c.statistic#
and c.name like '%CPU%'
and a.username='SCOTT'
order by a.sid, c.name
Per user (session wise) following information:
1.cpu usages
2.memory sorts
3.table scan
4.commit
5.cursor
6.physical reads
7.logical reads
8.BCHR (buffer cache hit ratio)
select a.sid, a.username, a.osuser, c.name, b.value
from v$session a, v$sesstat b, v$statname c
where a.sid = b.sid
and b.statistic# = c.statistic#
and (c.name like '%CPU%' or c.name like '%sorts (memory)%' or c.name like '%table scan%' or c.name like '%commit%' or c.name like '%cursor%' or c.name like '%read%' or c.name like '%buffer%' or c.name like '%cache%')
and b.value > 0
order by a.sid, c.name
If you have the licences for the diagnostic pack and performance pack, you can look at the active session history for this type of information. You can query view DBA_HIST_ACTIVE_SESS_HISTORY, or run the ashrpt.sql script from $ORACLE_HOME/rdbms/admin, or use OEM for a graphic representation of the workload over time.
HTH
Girish Sharma
Edited by: Girish Sharma on Dec 8, 2009 5:23 PM
"and a.username='SCOTT'" added.

Similar Messages

  • CPU used by ORACLE

    Hi,
    on 11G R2, on Win 2008.
    In Windows we can not see background process (mmon, pmon, ...). Can we ?
    How to see CPU used by Oracle background process ?
    To day CPU was used at 90% by oracle.
    I ran an AWR. But nothing about them in it. I wonder why Oracle was CPU intensive ?
    Load Profile              Per Second    Per Transaction   Per Exec   Per Call
    ~~~~~~~~~~~~         ---------------    --------------- ---------- ----------
          DB Time(s):                1.5                1.7       0.05       0.05
           DB CPU(s):                0.9                1.0       0.03       0.03
           Redo size:            3,294.8            3,914.9
       Logical reads:           42,405.9           50,387.3
       Block changes:               19.5               23.2
      Physical reads:               14.8               17.6
    Physical writes:                1.2                1.4
          User calls:               27.2               32.3
              Parses:                9.9               11.7
         Hard parses:                0.2                0.2
    W/A MB processed:                0.1                0.1
              Logons:                0.3                0.3
            Executes:               27.9               33.2
           Rollbacks:                0.0                0.0
        Transactions:                0.8
    Instance Efficiency Percentages (Target 100%)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                Buffer Nowait %:  100.00       Redo NoWait %:  100.00
                Buffer  Hit   %:   99.97    In-memory Sort %:  100.00
                Library Hit   %:   98.46        Soft Parse %:   97.94
             Execute to Parse %:   64.67         Latch Hit %:  100.00
    Parse CPU to Parse Elapsd %:   10.90     % Non-Parse CPU:   99.92
    Shared Pool Statistics        Begin    End
                 Memory Usage %:   81.43   83.60
        % SQL with executions>1:   92.47   84.84
      % Memory for SQL w/exec>1:   86.88   79.50
    Top 5 Timed Foreground Events
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                               Avg
                                                              wait   % DB
    Event                                 Waits     Time(s)   (ms)   time Wait Class
    DB CPU                                            6,317          60.4
    db file sequential read              44,888       2,407     54   23.0 User I/O
    db file scattered read                5,522         441     80    4.2 User I/O
    control file sequential read          4,725         268     57    2.6 System I/O
    Disk file operations I/O              1,089          73     67     .7 User I/OThank you.

    Hi,
    You can go to TASK Manager -> click on Resource Monitor and there can see different services/processes along with the amount of CPU they are consuming.
    Hope this helps you.
    Regards,
    Chirag

  • Cpu used by a user (session wise)

    how will i find how much cpu used by a user(session wise)

    select a.sid, a.username, a.osuser, c.name, b.value
    from v$session a, v$sesstat b, v$statname c
    where a.sid = b.sid
    and b.statistic# = c.statistic#
    and (c.name like '%CPU%' or c.name like '%sorts (memory)%' or c.name like '%table scan%' or c.name like '%commit%' or c.name like '%cursor%' or c.name like '%read%' or c.name like '%buffer%' or c.name like '%cache%')
    and b.value > 0
    order by a.sid, c.name
    Just revised version of previous query / reply.
    Regards
    Girish

  • Can java use the Oracle user defined datatypes

    Following the code snippets from the sample applications from the Oracle 9i manual,i have coded two classes:
    java.util.Map map = (Map) conn.getTypeMap();
    map.put("camr_owner.proc_test_type",Class.forName("testType"));
    conn.setTypeMap(map);
    These three lines cause the program to choke.
    The exception thrown is :
    Exception in thread "main" java.lang.AbstractMethodError: getTypeMap.
    In one of the classes,i have a class that is exactly same as the Oracle UDT implementing the SQLData interface.
    In the other,i mean the class where i have coded the above mentioned three lines,i have a main class which tries to make a connection to the database.I am using the java thin drivers(classes12.zip in the classpath).
    Can anyone,point me what is the mistake in the lines.

    Hello "TPD"
    The fact that I'm posting this on a Java newbies forum indicates that I have NOT a smarter approach (don't even have one). I just asked this question about using Java to integrate with OpenScript because I didn't find much information online and the Oracle Support Community Forums have proven to be very helpful for me in the past, that's all. 
    It doesn't seem from your reply you were intending to help but more to discourage me and other to use the Oracle Support Community forums.
    bye
    Fede..

  • Using Oracle Users in Realms and DataSource.getConnection

    Is it possible to authenticate using an Oracle User via JAASRealm and also retrieve connections specific to that user from a DataSource?
    I currently have an application which doesn't use either, but rather sets up a OracleDataSource. So basically I just want to allow the container to administer both the authentication and data source setup, while still allowing the getConnection(user,password):
    CODE
    ocpds = new OracleConnectionPoolDataSource();
    ocpds.setURL(connectionString);
    ocpds.setConnectionProperties(props);
    ods = new OracleDataSource();
    ods.setURL(connectionString);
    ods.setConnectionCachingEnabled(true);
    ods.setConnectionProperties(props);
    // Pool and Cache
    Properties poolProps = new Properties();
    poolProps.setProperty("AbandonedConnectionTimeout", "60");
    poolProps.setProperty("InactivityTimeout", "5");
    poolProps.setProperty("TimeToLiveTimeout", "60");
    poolProps.setProperty("ConnectionWaitTimeout", "60");
    ods.setConnectionCacheProperties(poolProps);
    ods.setConnectionProperties(props);
    Util.logln("Connection Cache Properties");
    cache = OracleConnectionCacheManager.getConnectionCacheManagerInstance();
    cache.createCache(cacheName, ods, poolProps);
    cache.setConnectionPoolDataSource(cacheName, ocpds);
    ........later in the BatCave (JSP or a servlet).....
    conn = (OracleConnection) ods.getConnection(username, password);
    ENDCODE
    This section from OAS Containers for J2EE Services Guide worries me:
    (from: http://download-east.oracle.com/docs/cd/B14099_19/web.1012/b14012/datasrc.htm#sthref572 )
    Using Different User Names for Two Connections to a Single Data Source
    When you retrieve a connection from a DataSource object with a user name and password, this user name and password are used on all subsequent connection retrievals within the same transaction. This is true for all data source types.
    For example, suppose an application retrieves a connection from the jdbc/OracleCMTDS1 data source with the scott user name. When the application retrieves a second connection from the same data source with a different user name, such as adams, the second user name (adams) is ignored. Instead, the original user name (scott) is used.
    Thanks for reading all of this, and I appreciate any help!

    Update:
    I'm still not quite sure what to do. Where I am now:
    1. I don't know how to authenticate against Oracle database users (non-ldap) via JNDI/JAAS/whatever
    2. Proxy authentication (ALTER USER...CONNECT THROUGH...) seems to be promising for using connection pools, and in addition, once realm authentication happens, I can just pass the username and piggyback on the middletier connection without knowing the password used in authentication
    3. I'm not sure if proxy addresses the issue that OAS Containers for J2EE Services Guide talks about in the original post
    4. I'd prefer not to use OID
    Again, if you have any little information, I'd really like to hear it.

  • Query on Linux 'top' command in Linux for oracle user

    This is the output of 'top' command in one of my linux server hosting One Oracle instance with 600MB SGA and 400MB PGA. One one instance is up in this server.
    top - 14:36:37 up 4:26, 3 users, load average: 0.05, 0.11, 0.28
    Tasks: 124 total, 1 running, 123 sleeping, 0 stopped, 0 zombie
    Cpu(s): 0.2% us, 0.1% sy, 0.0% ni, 66.6% id, 33.1% wa, 0.0% hi, 0.0% si
    Mem: 12299332k total, *2569836k* used, 9729496k free, 61288k buffers
    Swap: 20972816k total, 0k used, 20972816k free, 2274852k cached
    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    6345 oracle 16 0 37132 1752 1172 S 0.0 0.0 0:00.08 sshd
    6346 oracle 16 0 54004 1536 1208 S 0.0 0.0 0:00.02 bash
    6423 oracle 16 0 45376 10m 6228 S 0.0 0.1 0:00.25 tnslsnr
    6471 oracle 16 0 740m 17m 13m S 0.0 0.1 0:00.02 oracle
    6473 oracle 16 0 739m 15m 12m S 0.0 0.1 0:00.01 oracle
    6475 oracle 16 0 739m 32m 29m S 0.0 0.3 0:00.07 oracle
    6477 oracle 16 0 742m 50m 44m S 0.0 0.4 0:00.27 oracle
    6479 oracle 16 0 754m 23m 19m S 0.0 0.2 0:00.43 oracle
    6481 oracle 16 0 739m 24m 20m S 0.0 0.2 0:00.61 oracle
    6483 oracle 16 0 740m 88m 83m S 0.0 0.7 0:00.71 oracle
    6485 oracle 16 0 739m 22m 19m S 0.0 0.2 0:00.01 oracle
    6487 oracle 16 0 740m 30m 25m S 0.0 0.3 0:00.15 oracle
    6489 oracle 16 0 741m 55m 48m S 0.0 0.5 0:00.29 oracle
    6491 oracle 16 0 739m 24m 20m S 0.0 0.2 0:00.01 oracle
    6493 oracle 16 0 739m 15m 11m S 0.0 0.1 0:00.01 oracle
    6495 oracle 16 0 739m 14m 11m S 0.0 0.1 0:00.00 oracle
    6622 oracle 16 0 739m 16m 13m S 0.0 0.1 0:00.00 oracle
    6626 oracle 16 0 740m 79m 74m S 0.0 0.7 0:01.95 oracle
    6636 oracle 16 0 740m 28m 23m S 0.0 0.2 0:00.06 oracle
    6638 oracle 16 0 739m 16m 12m S 0.0 0.1 0:00.01 oracle
    6846 oracle 16 0 739m 19m 16m S 0.0 0.2 0:00.02 oracle
    6848 oracle 16 0 739m 24m 21m S 0.0 0.2 0:00.04 oracle
    6850 oracle 16 0 739m 19m 16m S 0.0 0.2 0:00.02 oracle
    6852 oracle 16 0 739m 19m 16m S 0.0 0.2 0:00.01 oracle
    6854 oracle 16 0 739m 30m 26m S 0.0 0.3 0:00.12 oracle
    6856 oracle 15 0 739m 28m 24m S 0.0 0.2 0:00.18 oracle
    6858 oracle 15 0 740m 40m 35m S 0.0 0.3 0:06.39 oracle
    6862 oracle 16 0 739m 32m 28m S 0.0 0.3 0:02.25 oracle
    6864 oracle 16 0 739m 19m 16m S 0.0 0.2 0:00.02 oracle
    6866 oracle 16 0 739m 19m 16m S 0.0 0.2 0:00.03 oracle
    6868 oracle 16 0 739m 19m 16m S 0.0 0.2 0:00.02 oracle
    7480 oracle 15 0 37264 1668 1092 S 0.0 0.0 0:00.15 sshd
    7481 oracle 15 0 54004 1528 1196 S 0.0 0.0 0:00.05 bash
    10333 oracle 16 0 739m 20m 16m S 0.0 0.2 0:00.00 oracle
    10337 oracle 15 0 6168 1080 768 R 0.0 0.0 0:00.00 top
    Total RAM as seen from top command is 12G.
    *2569836* - Total RAM which is being used currently .
    How can I see the total RAM used by all Oracle Processes running in this server. The server is Linux X86 64 Bit. Can I sum up the values under 'VIRT' column of 'top' command to see the total RAM used ?
    Is there a way to see the total RAM and CPU used by Oracle from top ?
    'VIRT' is the virtual memory - In what way is this related to the figure above, which is the physical memory (RAM) ?
    Thanks in Advance
    SSN
    Edited by: SSNair on Oct 21, 2010 2:39 AM

    Oracle used shared memory to implement the SGA, which constituted the largest memory consumption of the Oracle instance. The problem is that in many modern OS, including linux, it is hard to define the actual memory usage fo a software. This is because the memory used by a process is actually composed of shared (e.g., shared memory, shared library, executable code) and private (e.g., the heap, the stack) components. Utilities like top, ps, etc reports all memory visible by a process, disregarding whether it is shared or not. As a result, the total of VIRT etc will be inflated by the shared components. For a more accurate figure of memory usage, shared memory / library / code should be counted once.
    Before 11g, Oracle used System V ipc, and the amount of memory allocated can be checked using ipcs. In 11g, Oracle switched to /dev/shm, use df to check the memory allocation. (Thanks user11150436)
    The "Mem used" figure in top is the actual usage of the memory: shared memory and library are not multi-counted. However, Linux will always cache (read before actually requested) and buffer (write after signalling completion) disk I/O. Therefore, "Mem used" is almost always very close to the amount of physical memory. "Mem used" - "buffers" - "cached" reflects the memory actually used by the OS and all programs more accuately.
    And you can use the pmap utility to check the memory map. Then you classify the sharable and unsharable memory usage to calculate a more accurate result suiting your need. You need OS knowledge to understand the output.

  • Cannot start weblogic server anymore in oracle user after config. in root

    Hi all,
    My weblogic server 10.3.4.0 installed in oracle developer days in oralce linux guest was able to start before using the oracle user account. However, after I copied a folder into the autodeploy directory in weblogic server under the root account, I am not able to start the weblogic server anymore using the oracle user account. The folder I copied into the autodeploy directory is called Joseki.war which is used to access Sparql service and semantic techonologies in Jena. Can anybody pls give some advice to fix the issue? Thank you very much in advance.

    Wrong forum - your post has nothing to do with the Oracle database. You wanted a WLS forum.

  • APPS Adapter / Business Events not visible when BPEL uses non-apps user

    We have BPEL connection using custom oracle user, xx_b2b and when we use APPS adapter in BPEL, I can not see and use any business event.
    If anybody across same requirement, please share your experience.
    Appreciate help on this.
    Thanks,
    Sonartori

    Hi,
    I'm facing the same issue. Were you able to resolve it. Appreciate if you can let me know.
    Thanks
    -Prapoorna

  • Oracle User From Specific Machine

    Hi,
    Looking to prevent the client from using specific oracle user account (MANAGER)
    But From the Application X that we install in his machien it is internally
    calling this user account
    How can we prevent using this user account in this client mahchine for any other connection of any other applications sql plus visual basic reports ....etc
    While we need it only fro the application X
    Regards
    HSBDBA

    Arup, your solution will not work. Re-read the OP. The user logs in from the same terminal via an application that uses the ID in question hence sometimes the IP is allowed and sometimes it should not be allowed to sign on.
    The goal is to prevent the user from using the ID with any tool other than the application.
    Solutions
    1- Code the Id and Password in the application so the user does not know it
    2- Check the contents of v$session.program when the user runs the application. If it also shows the application and the application does not use SQLPlus or other tools as part of itself then use a database event after logon trigger to check the program being ran. The v$session.program column is not always populated depending on the client version is use.
    HTH -- Mark D Powell --

  • Error Connecting to database URL jdbc:oracle:oci:@rmsdbtst as user rms13 java.lang.Exception:UnsatisfiedLinkError encountered when using the Oracle driver

    Trying to Install RMS application 13.2.2 and I get past the pre-installation checks and when I get to the Data Source details and enter the data source details with the check box checked to validate the schema/Test Data Source I get the following error:
    Error Connecting to database URL jdbc:oracle:oci:@rmsdbtst as user rms13 java.lang.Exception:UnsatisfiedLinkError encountered when using the Oracle driver. Please check that the library path is set up properly or switch to the JDBC thin client oracle/jdbc/driver/T2CConnection.getLibraryVersioNumber()
    Checks performed:
    RMS Application code location and directory contents:
    [oracle@test-rms-app application]$ pwd
    /binary_files/STAGING_DIR/rms/application
    [oracle@test-rms-app application]$ ls -ltr
    total 144
    -rw-r--r-- 1 oracle oinstall   272 Dec 7  2010 version.properties
    -rw-r--r-- 1 oracle oinstall   405 Jan 16 2011 expected-object-counts.properties
    -rw-r--r-- 1 oracle oinstall   892 May 13 2011 ant.install.properties.sample
    -rw-r--r-- 1 oracle oinstall 64004 Jun  6  2011 build.xml
    drwxr-xr-x 9 oracle oinstall  4096 Jun 16 2011 rms13
    drwxr-xr-x 3 oracle oinstall  4096 Jun 16 2011 installer-resources
    drwxr-xr-x 3 oracle oinstall  4096 Jun 16 2011 antinstall
    drwxr-xr-x 2 oracle oinstall  4096 Jun 16 2011 ant-ext
    drwxr-xr-x 5 oracle oinstall  4096 Jun 16 2011 ant
    -rw-r--r-- 1 oracle oinstall 11324 Dec 18 09:18 antinstall-config.xml.ORIG
    -rwxr-xr-x 1 oracle oinstall  4249 Dec 18 10:01 install.sh
    drwxr-xr-x 4 oracle oinstall  4096 Dec 18 10:06 common
    -rw-r--r-- 1 oracle oinstall 16244 Dec 19 10:37 antinstall-config.xml
    -rw-r--r-- 1 oracle oinstall   689 Dec 19 10:37 ant.install.log
    [oracle@test-rms-app application]$
    Application installation:
    [oracle@test-rms-app application]$ ./install.sh
    THIS IS the driver directory
    Verified $ORACLE_SID.
    Verified SQL*Plus exists.
    Verified write permissions.
    Verified formsweb.cfg read permissions.
    Verified Registry.dat read permissions.
    Verified Java version 1.4.2.x or greater. Java version - 1.6.0
    Verified Tk2Motif.rgb settings.
    Verified frmcmp_batch.sh status.
    WARNING: Oracle Enterprise Linux not detected.  Some components may not install properly.
    Verified $DISPLAY - 172.16.129.82:0.0.
    This installer will ask for your "My Oracle Support" credentials.
    Preparing installer. This may take a few moments.
    Your internet connection type is: NONE
    Integrating My Oracle Support into the product installer workflow...
         [move] Moving 1 file to /binary_files/STAGING_DIR/rms/application
    Installer preparation complete.
    MW_HOME=/u01/app/oracle/Middleware/NewMiddleware1034
    ORACLE_HOME=/u01/app/oracle/Middleware/NewMiddleware1034/as_1
    ORACLE_INSTANCE=/u01/app/oracle/Middleware/NewMiddleware1034/asinst_1
    DOMAIN_HOME=/u01/app/oracle/Middleware/NewMiddleware1034/user_projects/domains/rmsClassDomain
    WLS_INSTANCE=WLS_FORMS
    ORACLE_SID=rmsdbtst
    JAVA_HOME=/u01/app/oracle/jrockit-jdk1.6.0_45-R28.2.7-4.1.0
    Launching installer...
    To make sure I have connectivity from the app server to the database (on a database server) here are the steps followed:
    [oracle@test-rms-app application]$ tnsping rmsdbtst
    TNS Ping Utility for Linux: Version 11.1.0.7.0 - Production on 19-DEC-2013 10:41:40
    Copyright (c) 1997, 2008, Oracle.  All rights reserved.
    Used parameter files:
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = test-rms-db.vonmaur.vmc)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SID = rmsdbtst)))
    OK (0 msec)
    [oracle@test-rms-app application]$
    [oracle@test-rms-app application]$ sqlplus rms13@rmsdbtst
    SQL*Plus: Release 11.1.0.7.0 - Production on Thu Dec 19 10:46:18 2013
    Copyright (c) 1982, 2008, Oracle.  All rights reserved.
    Enter password:
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> exit
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    [oracle@test-rms-app application]$
    [oracle@test-rms-app application]$ ping test-rms-db
    PING test-rms-db.vonmaur.vmc (192.168.1.140) 56(84) bytes of data.
    64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=1 ttl=64 time=0.599 ms
    64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=2 ttl=64 time=0.168 ms
    64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=3 ttl=64 time=0.132 ms
    64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=4 ttl=64 time=0.158 ms
    64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=5 ttl=64 time=0.135 ms
    --- test-rms-db.vonmaur.vmc ping statistics ---
    5 packets transmitted, 5 received, 0% packet loss, time 4001ms
    rtt min/avg/max/mdev = 0.132/0.238/0.599/0.181 ms
    [oracle@test-rms-app application]$
    [oracle@test-rms-app application]$ uname -a
    Linux test-rms-app.vonmaur.vmc 2.6.18-128.el5 #1 SMP Wed Jan 21 08:45:05 EST 2009 x86_64 x86_64 x86_64 GNU/Linux
    [oracle@test-rms-app application]$
    [oracle@test-rms-app application]$ cat /etc/*-release
    Enterprise Linux Enterprise Linux Server release 5.3 (Carthage)
    Red Hat Enterprise Linux Server release 5.3 (Tikanga)
    [oracle@test-rms-app application]$
    The database is created and all the batch file scripts have been successfully deployed.  Now working on the application server.  The  Weblogic server is installed and 11g forms and reports are installed successfully.
    Any help would be helpful.
    Thanks,
    Ram.

    Please check MOS Notes:
    FAQ: RWMS 13.2 Installation and Configuration (Doc ID 1307639.1)

  • Not able to login using ORACLE USER in Linux

    I am not able to login using OS user ORACLE in linux,
    I am getting following error when trying to login
    /etc/X!!/gdm/PreSession/Default : Registering your session with wtmp and utmp
    /etc/X!!/gdm/PreSession/Default :running : /usr/bin/X11/sessreg -a -w /var/log/log/wtmp -u /var/run/utmp -x "/var/gdm/:0.Xservers" -h "" -1" : 0" "oracle"
    /etc/profile: line 17 : syntax error near unexpected token 'then'
    /etc/profile: line 17 ' if[ $USER = "oracle" ]; then'
    Failed to execute message bus daemon : No such file or directory
    EOF in dbus-launch reading address from bus daemon
    I tried to edit /etc/profile file but not sucessfull. Please help me out . This installtion is on VM ware
    Edited by: user12356407 on Dec 16, 2009 3:21 AM

    user8896383 wrote:
    I am not successful to login using Oracle User .
    I tried to edit /etc/profile file on Line 17 , but of no use.
    could you please be more precise about what exactly i should look in or edit in that file.
    Thanks for your immediate response.My car doesn't start
    I tried to fix it
    It still doesn't start.
    Can you be more precise in telling how to fix it.

  • Running External jobs in Oracle 10g using a different user ID

    Hi,
    i would like to run an external job ( shell script ) in oracle scheduler using a Unix user id other than nobody and oracle. is it possible to do that? if so please provide more information. I am currently using oracle version 10.2.0.4.0

    Sure,
    no problem at all, if you have no problem with the fact that all jobs that run from your ORACLE_HOME use the same account. I would prefer to upgrade to 11.1.0.7 and use the new remote exteral jobs with credentials.
    For oracle 10g you have to modify $ORACLE_HOME/rdbms/admin/externaljob.ora and change the run_user and run_group to what ever you want to use.
    regards,
    Ronald
    (also see:
    http://www.packtpub.com/mastering-oracle-scheduler-in-oracle-11g-databases)

  • Linux non-oracle user cannot connect to database using TNS

    LS,
    I've installed Oracle 11gR2 on a linux box (name="ilmserver") running CentOS 5.4 (based on RHEL).
    Created user "oracle" and groups "oinstall" and "dba".
    Installation under user "oracle" went fine, and logged in as "oracle" user I can - naturally - access the database easily (via SQL+, or using SQL Developer it works via Basic, TNS, and Advanced (=jdbc)).
    I have a second user on the linux box called "informatica", on which I have installed Informatica ILM 5.3.2, which uses the Oracle database as its repository.
    The "informatica" user has been granted the same groups as the "oracle" user, i.e. "oinstall" and "dba".
    I have severe problems accessing the Oracle database as the "informatica" user.
    Using SQL Developer I can access the database using the "Basic" method, but not TNS.
    But guess what: for ILM to work to its fullest extent I need to implement an environment variable called TNS_ADMIN.
    I have implemented it, it sits in bash_profile and as such works fine:
    +[informatica@ilmserver ~]$ echo $TNS_ADMIN+
    +/home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin+
    But as for being able to access it:
    +[informatica@ilmserver ~]$ cat $TNS_ADMIN/tnsnames.ora+
    cat: /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora: Permission denied
    Somehow I thought that granting "oinstall" group to "informatica" user would take care of this. Obviously it doesn't. I also granted "dba" group to "informatica", to no avail apparently.
    This is then - I assume - also the reason that when I want to connect using TNS from within SQL Developer, the dropdown list is empty (because it's not able to read TNSNAMES.ORA).
    Does anyone know how to resolve this issue?
    Thanks heaps!
    Cheers, Patrick

    Just ran all+ commands for oracle user:
    *[oracle@ilmserver ~]$ id*
    uid=502(oracle) gid=504(oinstall) groups=503(dba),504(oinstall),505(asmdba),506(asmadmin) context=user_u:system_r:unconfined_t
    *[oracle@ilmserver ~]$ env | sort*
    COLORTERM=gnome-terminal
    CVS_RSH=ssh
    DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-m8BEsoxTeM,guid=7c9a73a7390af7742e606e004e571934
    DESKTOP_SESSION=default
    DESKTOP_STARTUP_ID=
    DISPLAY=:0.0
    G_BROKEN_FILENAMES=1
    GDMSESSION=default
    GDM_XSERVER_LOCATION=local
    GNOME_DESKTOP_SESSION_ID=Default
    GNOME_KEYRING_SOCKET=/tmp/keyring-TQlAPU/socket
    GTK_RC_FILES=/etc/gtk/gtkrc:/home/oracle/.gtkrc-1.2-gnome2
    HISTSIZE=1000
    HOME=/home/oracle
    HOSTNAME=ilmserver
    INPUTRC=/etc/inputrc
    JAVA_HOME=/usr/java/jdk1.7.0
    LANG=en_US.UTF-8
    LESSOPEN=|/usr/bin/lesspipe.sh %s
    LOGNAME=oracle
    LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
    MAIL=/var/spool/mail/oracle
    ORACLE_BASE=/home/oracle/app/oracle
    ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_1
    ORACLE_HOSTNAME=ilmserver
    ORACLE_SID=orcl
    PATH=/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/oracle/bin:/usr/java/jdk1.7.0/bin:/usr/sbin:/sbin:/home/oracle/app/oracle/product/11.2.0/dbhome_1/bin
    PWD=/home/oracle
    SESSION_MANAGER=local/ilmserver:/tmp/.ICE-unix/14477
    SHELL=/bin/bash
    SHLVL=2
    SSH_AGENT_PID=14513
    SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
    SSH_AUTH_SOCK=/tmp/ssh-INwup14477/agent.14477
    TERM=xterm
    TNS_ADMIN=/home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin
    USERNAME=oracle
    USER=oracle
    _=/usr/bin/env
    WINDOWID=24117329
    XAUTHORITY=/tmp/.gdm9ITN0V
    XMODIFIERS=@im=none
    *[oracle@ilmserver ~]$ ls -l /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora*
    -rw-r----- 1 oracle oinstall 879 Aug 24 21:39 /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
    *[oracle@ilmserver ~]$ ls -ld /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/*
    drwxr-xr-x 3 oracle oinstall 4096 Aug 24 21:39 /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/
    *[oracle@ilmserver ~]$ ls -ld /home/oracle/app/oracle/product/11.2.0/dbhome_1/*
    drwxr-xr-x 74 oracle oinstall 4096 Aug 23 19:00 /home/oracle/app/oracle/product/11.2.0/dbhome_1/
    *[oracle@ilmserver ~]$ ls -ld /home/oracle/app/oracle/product/11.2.0/*
    drwxr-xr-x 3 oracle oinstall 4096 Aug 23 18:21 /home/oracle/app/oracle/product/11.2.0/
    [*oracle@ilmserver ~]$ ls -ld /home/oracle/app/oracle/product/*
    drwxr-xr-x 3 oracle oinstall 4096 Aug 23 18:21 /home/oracle/app/oracle/product/
    *[oracle@ilmserver ~]$ ls -ld /home/oracle/app/oracle/*
    drwxr-xr-x 10 oracle oinstall 4096 Aug 24 17:29 /home/oracle/app/oracle/
    *[oracle@ilmserver ~]$ ls -ld /home/oracle/app/*
    drwxr-xr-x 4 oracle oinstall 4096 Aug 23 18:21 /home/oracle/app/
    *[oracle@ilmserver ~]$ ls -ld /home/oracle/*
    drwx------ 22 oracle oinstall 4096 Aug 25 20:55 /home/oracle/
    Naturally the "oracle" user has full access to its own directories.
    A thought just occurred to me. I assume that theoretically it's possible to grant read privilige to informatica user on all these directories... would that do the trick?
    But even if so, makes me wonder whether that is "best practice".
    Also, I cannot imagine I'm the first person to encounter this scenario, and therefore there must be some standard approach to enable this.
    Any suggestions/thoughts?
    As for the TNSNAMES.ORA suggestion, I guess that is possible. Makes administration of TNSNAMES a bit more cumbersome though, as in, 2 files to maintain... risk of getting out of sync when making 'quick and dirty' changes without thinking things through too much (which shouldn't happen... but sometimes does anyway).
    I'd prefer a solution where "informatica" has genuine access to TNSNAMES.ORA.
    Thanks, Patrick
    ps the bold bits with env.var LS_COLORS are unintentional, but don't know how to turn that off

  • What is use of oracle.iam.identity.usermgmt.vo.User class in oim11g

    Hi
    In oim11g in the api packages like below
    oracle.iam.identity.usermgmt.api
    oracle.iam.identity.usermgmt.vo
    From architecture standpoint what is the use of oracle.iam.identity.usermgmt.api and oracle.iam.identity.usermgmt.vo packages.
    How to use them?
    Thanks
    /S

    I want to share some more.
    You will find lots of VOs (Value Objects similar to Transfer Objects) exposed in OIM 11g for efficient data transfer, story behind is that they have implemented well design pattern.
    Transfer Object & Value Objects :-
    http://patternsj2ee.blogspot.com/
    http://rrees.wordpress.com/2007/05/13/transfer-objects-versus-value-objects/

  • Oracle user memory utilisation

    os : x86_64 x86_64 x86_64 GNU/Linux
    oracle 10g,9i
    I am working on migration of the dbs from different dbs to a new Box which has 32 gb memory
    currently I created
    oratab
    e5gedb1:/u01/app/oracle/product/10.2.0.3:N
    e1db1:/u01/app/oracle/product/10.2.0.3:N
    e2db1:/u01/app/oracle/product/10.2.0.3:N
    e3db1:/u01/app/oracle/product/10.2.0.3:N
    e4db1:/u01/app/oracle/product/9.2.0.6:N
    e5db1:/u01/app/oracle/product/9.2.0.6:N
    as pe rthe sga and pga requirements I gave the following
    sno SID          SGA      PGA    processes      Sesssions
    1   e1db1     800m       200m      150                 155
    2   e1db1     800m       200m      150                155
    3   e1db1     800m       200m      150                 155
    4   e1db1     800m       200m      150                 155
    5   e1db1     800m       200m      150                 155
    for all SGA_MAX_SIZE also given as 800m
    for 10g sga_target is also fixed to 800m
    as per the above max 5gb should be used for the oracle user, but to my surpise all 31 gb is used
    [oracle@cora11 ~]$ free -g
                 total       used       free     shared    buffers     cached
    Mem:            31         30          0          0          0         29
    -/+ buffers/cache:          1         30
    Swap:           31          0         31
    these are ulimit -a
    [oracle@cora11 ~]$ ulimit -a
    core file size          (blocks, -c) 0
    data seg size           (kbytes, -d) unlimited
    file size               (blocks, -f) unlimited
    pending signals                 (-i) 1024
    max locked memory       (kbytes, -l) 32
    max memory size         (kbytes, -m) unlimited
    open files                      (-n) 1024
    pipe size            (512 bytes, -p) 8
    POSIX message queues     (bytes, -q) 819200
    stack size              (kbytes, -s) 10240
    cpu time               (seconds, -t) unlimited
    max user processes              (-u) 278528
    virtual memory          (kbytes, -v) unlimited
    file locks                      (-x) unlimited
    cat /etc/sysctl.conf
    # Kernel sysctl configuration file for Red Hat Linux
    # For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and
    # sysctl.conf(5) for more details.
    # Controls IP packet forwarding
    net.ipv4.ip_forward = 0
    # Controls source route verification
    net.ipv4.conf.default.rp_filter = 1
    # Do not accept source routing
    net.ipv4.conf.default.accept_source_route = 0
    # Controls the System Request debugging functionality of the kernel
    kernel.sysrq = 0
    # Controls whether core dumps will append the PID to the core filename.
    # Useful for debugging multi-threaded applications.
    kernel.core_uses_pid = 1
    kernel.shmall = 2097152
    kernel.shmmax = 2147483648
    kernel.shmmni = 4096
    kernel.sem = 250 32000 100 128
    fs.file-max = 65536
    net.ipv4.ip_local_port_range = 1024 65000
    net.core.rmem_default = 262144
    net.core.rmem_max = 262144
    net.core.wmem_default = 262144
    net.core.wmem_max = 262144
    net.ipv4.tcp_rmem = 262144 262144 262144
    net.ipv4.tcp_wmem = 262144 262144 262144
    output of top
    net.ipv4.tcp_rmem = 262144 262144 262144
    net.ipv4.tcp_wmem = 262144 262144 262144
    top
    top - 23:57:31 up 11:45,  5 users,  load average: 0.98, 0.84, 0.86
    Tasks: 267 total,   2 running, 265 sleeping,   0 stopped,   0 zombie
    Cpu(s): 11.1% us,  0.4% sy,  0.0% ni, 88.4% id,  0.0% wa,  0.0% hi,  0.1% si
    Mem:  32890120k total, 32557600k used,   332520k free,   124020k buffers
    Swap: 32702336k total,    80064k used, 32622272k free, 31149724k cached
      PID USER      PR  NI %CPU    TIME+  %MEM  VIRT  RES  SHR S COMMAND
    12901 oracle    15   0   64  81:23.68  0.2  939m  70m  66m R oracle
    14300 oracle    16   0   27   0:14.28  0.5 2140m 174m 169m S oracle
    7661 oracle    16   0    0   0:06.54  0.3 2139m  97m  94m S oracle
    11087 root      16   0    0   1:09.86  0.0  6288 1296  848 S top
        1 oracle    16   0    1   0:00.40  0.4 2140m 118m 113m S oracle
    14320 oracle    16   0    1   0:00.20  0.2 2140m  58m  53m S oracle
    12614 oracle    16   0    1   0:28.84  1.6  941m 511m 505m S oracle
    5093 root      34  19    0   4:25.03  0.0     0    0    0 S kipmi0
    7362 oracle    15   0    0   0:04.24  0.1 2154m  32m  28m S oracle
    11087 root      16   0    0   1:09.85  0.0  6288 1296  848 S top
    12879 oracle    15   0    0   0:59.31  0.3  940m  85m  80m S oracle
    14327 oracle    16   0    0   0:00.06  0.0  6284 1316  868 R top
    14335 oracle    16   0    0   0:00.04  0.1 2140m  31m  26m S oracle
        1 root      16   0    0   0:01.31  0.0  4756  552  456 S init
    Still I need to create 8 more dbs on this box
    1. when we restarted the box without any instance up the free showing 31 gb available.
    2. can oracle process can grow beyond allocated pga ans sga limits?
    3. How to understand the behavoiur and how to fix the dbs not to grow beyond allocated SGA and pga.

    [oracle@cora11 ~]$ ipcs -m |grep oracle
    0x803e13ec 0 oracle 640 840957952 31
    0x8c430600 262145 oracle 640 840957952 34
    0x39d93c68 196610 oracle 640 840957952 45
    0x6418aca8 327683 oracle 640 840957952 24
    0x0cae9db0 393220 oracle 640 856965120 50
    0xf73388d4 524293 oracle 640 840957952 40
    allocated memory for sids
    and ps -u oracle -o vsz,pid,args | sort -rn
    gives me 170mb total background process.
    What else need to be identified ?

Maybe you are looking for