Data is stored somewhere

Month: May 2005

  • Oracle – CPU used by a database user on per session basis

    nnnnn CPU used by a database user on per session basis on OracleDECLAREv_session_cpu NUMBER;v_system_cpu NUMBER;v_cpu_ratio NUMBER;v_sid NUMBER;v_serial NUMBER;v_osuser v$session.osuser%type;v_username v$session.username%type;my_exception EXCEPTION;CURSOR sess ISSELECT sid,serial#,username FROM v$sessionWHERE username is not nullORDER BY username; BEGIN OPEN sess; FETCH sess into v_sid,v_serial,v_username; IF sess%notfound THEN RAISE no_data_found; END IF; LOOP SELECT value INTO v_session_cpu FROM v$sesstat WHERE sid…

  • How to tell which IPC resouces belongs to which instance

    nnnnnChunyu Hu’s Weblog – How to tell which IPC resouces belongs to which instance: It’s quite common that there are more than 1 Oracle instance on 1 host. For example,we run many standby databases instances on 1 host for cost reason. Sometimes, we fail to restart some Oracle instance because the IPC resources allocated for…