Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Is It Recommended To Apply Patch Bundles When PSU Is Available? -ID 743554.1 Oracle
  • process id based files and processes Linux/Unix
  • Locally Managed Tablespace and Dictionary managed tablespace (LMT-DMT) Oracle
  • executing Function from SQLPLUS prompt Oracle
  • DBMS_JOB all example Oracle
  • How to Make Trace Files Created by Oracle Readable by All Users ? Oracle
  • import-export with multiple files Oracle
  • Finding last recovered file on DR and remove all chanracters before any “/” Linux/Unix
  • GSQ.sql Oracle
  • Resolving RMAN Hung Jobs Oracle
  • To see mem usage and CPU usage system wide. Linux/Unix
  • How to analyze statspack or AWR report. Oracle
  • EXTPROC Oracle
  • Mutating Table Error while using database trigger Oracle
  • Oracle 11g Training on 29JAN1010 Oracle

Year: 2008

temp_use.sql diplays usage of temp ts

Posted on 10-May-2008 By Admin No Comments on temp_use.sql diplays usage of temp ts

SELECT b.TABLESPACE, b.segfile#, b.segblk#, b.blocks, a.SID, a.serial#, a.username, a.osuser, a.status, c.sql_text FROM v$session a, v$sort_usage b, v$sqlarea c WHERE a.saddr = b.session_addr AND a.SQL_HASH_VALUE = c.HASH_VALUE ORDER BY b.TABLESPACE, b.segfile#, b.segblk#, b.blocks / set pagesize 10000 set linesize 133 column tablespace format a15 heading ‘Tablespace Name’ column segfile# format 9,999 heading ‘File|ID’ column segblk# format…

Read More “temp_use.sql diplays usage of temp ts” »

Oracle, SQL scripts

get_ratio.sql get the ratio of users from v$session and this uses CASE-WHEN-THEN clause

Posted on 10-May-2008 By Admin No Comments on get_ratio.sql get the ratio of users from v$session and this uses CASE-WHEN-THEN clause

set time on set timing on set verify off select to_char(sysdate, ‘DD-MON-RRRR:HH24:MI’) from dual; prompt ‘Total distinct users and total user sessions’ select count(distinct username), count(1), round(count(1)/count(distinct username),1 ) from v$session where username is not null; prompt ‘Total terminal server distinct users and total user sessions’ select count(distinct username), count(1), round(count(1)/count(distinct username),1 ) from v$session…

Read More “get_ratio.sql get the ratio of users from v$session and this uses CASE-WHEN-THEN clause” »

Oracle, SQL scripts

pvm_metric.sql for gathering report from vmstat tables

Posted on 10-May-2008 By Admin No Comments on pvm_metric.sql for gathering report from vmstat tables

col AVG_ACTIVE_USR format 999999.99 col AVG_TOT_USR format 9999.99 col AVG_USR_CPU format 9999.99 col AVG_SYS_CPU format 99.99 col AVG_IDLE_CPU format 99.99 col AVG_WAIT_CPU format 99.99 col TOT_ODR format 99999999 col AVG_ACT_USR format 999999.99 col RUNQ format 999.99 col CSW format 99999.99 set lines 120 pages 2000 accept start1 prompt ‘Enter Start Dare in DD-MON-RRRR:HH24:MI format :…

Read More “pvm_metric.sql for gathering report from vmstat tables” »

Oracle, SQL scripts

ORA-4031 issue and solution on 09-MAY-2008

Posted on 10-May-2008 By Admin No Comments on ORA-4031 issue and solution on 09-MAY-2008

++++++++++++++++++++ Problem description ++++++++++++++++++++ Some users started getting ORA-4031. This is the eror that show following: 4031, 00000, “unable to allocate %s bytes of shared memory (“%s”,”%s”,”%s”,”%s”)” ++++++++++++++++++++++ Problem solution ++++++++++++++++++++++ We ran following query and found failues that may result into 4031. set echo off verify off set lines 120 pages 555 /* V$SHARED_POOL_RESERVED_SIZE…

Read More “ORA-4031 issue and solution on 09-MAY-2008” »

Oracle, SQL scripts

How to calculate PROCESSES parameter

Posted on 09-May-2008 By Admin No Comments on How to calculate PROCESSES parameter

SEMMSL Set to 10 plus the largest initsid.ora PROCESSES parameter of an Oracle database on the system. The PROCESSES parameter can be found in each initsid.ora file, loc ORACLE_HOME/dbs directory. The default value of PROCESSES for the 8.1.5 prebuilt database is 50. SEMMNS Set to the sum of the PROCESSES parameter for each Oracle database…

Read More “How to calculate PROCESSES parameter” »

Oracle, SQL scripts

How to set Processes Parameter

Posted on 09-May-2008 By Admin No Comments on How to set Processes Parameter

The only drawback in setting the processes value high is that the corresponding kernel settings, SEMMNS and SEMMSL need to be set higher based on the following formulas: SEMMSL – Set to 10 plus the largest PROCESSES parameter of any Oracle database on the system. SEMMNS – Set to the sum of the PROCESSES parameter…

Read More “How to set Processes Parameter” »

Oracle, SQL scripts

send email from unix mailx with attachment.

Posted on 07-May-2008 By Admin No Comments on send email from unix mailx with attachment.

mailx -s “test message” pmehta@1800flowers.com

Linux/Unix, shell

Explain Plan Doesn’T Change For Sql After New Statistics Generated

Posted on 06-May-2008 By Admin No Comments on Explain Plan Doesn’T Change For Sql After New Statistics Generated

If you use dbms_stats in 10g it will not automatically invalidate dependant cursors. This is the default behaviour as of 10. To revert to older previous behaviour you will have to set the parameter no_invalidate to false. . no_invalidate Does not invalidate the dependent cursors if set to TRUE. The procedure invalidates the dependent cursors…

Read More “Explain Plan Doesn’T Change For Sql After New Statistics Generated” »

Oracle, SQL scripts

alter database backup controlfile to trace

Posted on 23-Apr-2008 By Admin No Comments on alter database backup controlfile to trace

Backing it up in a human readable format: alter database backup controlfile to trace; alter database backup controlfile to trace as ‘/some/arbitrary/path’; alter database backup controlfile to trace as ‘/some/arbitrary/path’ reuse; If you are using “alter database backup controlfile to trace as ‘test1.sql’; then test1.sql will be created in $ORACLE_HOME/dbs folder.

Oracle, SQL scripts

Insert cause enqueue locks

Posted on 23-Apr-2008 By Admin No Comments on Insert cause enqueue locks

Here is a much simpler version: ——————————- Create table t1 (c1 number primary); session1: insert into t1 values (1); session2: insert into t1 values (1); — would hang v$lock would reveal session 1 blocking session2 on TX lock why? because you have a constraint where you are asking Oracle to check uniqueness of data (unique…

Read More “Insert cause enqueue locks” »

Oracle, SQL scripts

Posts pagination

Previous 1 … 5 6 7 8 Next

Categories

  • Ansible (0)
  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • MYSQL (5)
  • Oracle (392)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (0)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (341)
  • SQL Server (6)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • SQL Server Vs Oracle Architecture difference25-Jul-2025
  • SQL Server: How to see historical transactions25-Jul-2025
  • SQL Server: How to see current transactions or requests25-Jul-2025
  • T-SQL Vs PL/SQL Syntax25-Jul-2025
  • Check SQL Server edition25-Jul-2025
  • Checking SQL Server Version25-Jul-2025
  • Oracle vs MYSQL Architecture differences (For DBAs)24-Jul-2025
  • V$INSTANCE of Oracle in MYSQL24-Jul-2025
  • Day to day MYSQL DBA operations (Compared with Oracle DBA)24-Jul-2025
  • MYSQL and Oracle Comparison for Oracle DBA24-Jul-2025

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • default permission on ~/.ssh/authorized_keys2 or authorized_keys Linux/Unix
  • refre.sql Oracle
  • How to find who is using which Rollback segment and how many rows or blocks in that rollback segments, Oracle
  • proper cpu stats Linux/Unix
  • New Latest Param.sql for finding all hidden parameters also Oracle
  • CPU speed on Linux Linux/Unix
  • lck.sql Oracle
  • Btee and Bitmap Plans in Oracle 9i and higher Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme