Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • How to Make Trace Files Created by Oracle Readable by All Users ? Oracle
  • handling filenname with space Linux/Unix
  • FRA Information. Oracle
  • Good link for LIO in Oracle ( Logical IOs) Oracle
  • Logic to chech # of parameters command line parameters Linux/Unix
  • dbms_job.submit example Oracle
  • Mutating Table Error while using database trigger Oracle
  • rm_backup_arch_file.ksh Linux/Unix
  • DBMS_UTILITY.ANALYZE_SCHEMA Oracle
  • Find average Row Length and other table size calculation. metalink notes Oracle
  • scripts to take listener.log backup Linux/Unix
  • Consolidated Reference List Of Notes For Migration / Upgrade Service Requests -ID 762540.1 Oracle
  • Configure ssh authentications for RAC Oracle
  • My Minimum Tuning Programs Oracle
  • Sort with ASCII order and Numeric Order Linux/Unix

Finding locked objects

Posted on 11-Jun-2007 By Admin No Comments on Finding locked objects

select object_id from dba_objects where object_name = ‘MYTABLE’; select sid, id1, id2 from v$lock where id1= &objid or id2 = &objid;

Oracle, SQL scripts

Changing Instance Name ( No DB_NAME)

Posted on 11-Jun-2007 By Admin No Comments on Changing Instance Name ( No DB_NAME)

Note Instance name : represented by $ORACLE_SID database name : represented by DB_NAME init.ora parameter. You can change instance name to any name with following requirements: Here we are chaning instance name from AWRTEST1 to PARESH. Exising setup: ORACLE_SID=AWRTEST1 Step1: $ export ORACLE_SID=PARESH; Step2: Create password file for new instance PARESH. $ cd $ORACLE_HOME/dbs $…

Read More “Changing Instance Name ( No DB_NAME)” »

Oracle, SQL scripts

Find nth max and min.

Posted on 02-May-2007 By Admin No Comments on Find nth max and min.

First, the query for Max: SELECT * FROM TAB1 a WHERE &N = (SELECT count(DISTINCT(b.col1)) FROM TAB1 b WHERE a.col1=b.col1) If N=1 will return first max or first min. N=2 will return second max or min.

Oracle, SQL scripts

DBMS_Shared_pool pinning triggers

Posted on 02-May-2007 By Admin No Comments on DBMS_Shared_pool pinning triggers

How to pin a stored procedure/functions ? 1.You can pin procedures and triggers with the dbms_shared_pool procedure. Either procedures or packages can be pinned with the ‘P’ flag, which is the default value (so you can leave it out). Triggers are pinned with ‘R’ and anonymous plsql blocks need any letter other than [p,P,r,R] as…

Read More “DBMS_Shared_pool pinning triggers” »

Oracle, SQL scripts

TOP-N Sql to find Nth max or Top N rows

Posted on 01-May-2007 By Admin No Comments on TOP-N Sql to find Nth max or Top N rows

PURPOSE This note explains the TOP-N Query, a new feature (as of 8.1.5) that allows users to query on ROWNUM and order results with ORDER BY. This functionality is similar to the offerings of other database software such as the “Top Values’ property option in Microsoft Access. Top-N Query to Solve ORDER BY…ROWNUM Inaccuracy: ==================================================…

Read More “TOP-N Sql to find Nth max or Top N rows” »

Oracle, SQL scripts

Session_info.ksh

Posted on 24-Apr-2007 By Admin No Comments on Session_info.ksh

/********* session_info.ksh ****************/ #!/bin/ksh . /home/oracle/oraprocs/WEBP18F.env USR_ID=vivek USR_PASS=viv1ek database=WEBP18F a=`ps -ef|grep “session_info.ksh”|grep -v grep|wc -l` if [ $a -gt 4 ] then echo “Exiting because of more than 1 process is running `date`”>>/db3/oradata/log/session_info.log exit fi echo “—–Begin —– Date `date`——————————–” >> /db3/oradata/log/session_info.log $ORACLE_HOME/bin/sqlplus -s /db3/oradata/log/session_info.log $USR_ID/$USR_PASS@$database set serverout on set feedback off SET PAGES 0…

Read More “Session_info.ksh” »

Linux/Unix, shell

Facts about SCN and Rollback Segment

Posted on 21-Apr-2007 By Admin No Comments on Facts about SCN and Rollback Segment

1. When should you create more rollback segments? The number of rollback segments needed to prevent contention between processes can be determined with the help of the monitor rollback display and with the use of the v$waitstat table. The rollback monitor column “header waits/sec” gives an indication of the current rollback segment contention. Waits are…

Read More “Facts about SCN and Rollback Segment” »

Oracle, SQL scripts

logminer and my_lbu

Posted on 18-Apr-2007 By Admin No Comments on logminer and my_lbu

dbms_logmnr.add_logfile(‘/export/home/oracle/paresh/arch1_558809894_83113.arc’, options => dbms_logmnr.new); dbms_logmnr.add_logfile(‘/export/home/oracle/paresh/arch1_558809894_83114.arc’, options => dbms_logmnr.addfile); dbms_logmnr.add_logfile(‘/export/home/oracle/paresh/arch1_558809894_83115.arc’, options => dbms_logmnr.addfile); dbms_logmnr.add_logfile(‘/export/home/oracle/paresh/arch1_558809894_83116.arc’, options => dbms_logmnr.addfile); execute DBMS_LOGMNR.START_LOGMNR(options => dbms_logmnr.dict_from_online_catalog); Then rename v$logmnr_contents to logminer_bak. Then run my_lbu.sql

Oracle, SQL scripts

How to Use DBMS_STATS to Move Statistics to a Different Database

Posted on 19-Mar-2007 By Admin No Comments on How to Use DBMS_STATS to Move Statistics to a Different Database

Subject: How to Use DBMS_STATS to Move Statistics to a Different Database Doc ID: Note:117203.1 Type: FAQ Last Revision Date: 01-MAR-2007 Status: PUBLISHED To provide Oracle Support Services with statistics for debugging, please refer to the following article: Note 242489.1 Transferring Optimizer Statistics to Support Purpose: ======== The purpose of this article is to explain…

Read More “How to Use DBMS_STATS to Move Statistics to a Different Database” »

Oracle, SQL scripts

export import with parameter file.

Posted on 15-Mar-2007 By Admin No Comments on export import with parameter file.

Export with parameter file and import with same. =============================================== Task : I am exporting some tables from CS and importing thsoe tables into BASKET schema. /**************************************************** FILE NAME: exp_wo_data.par *******************/ userid=cs file=exp_bskt_15MAR07.dmp compress=N grants=N log=bskt_exp_15MAR07.log ROWS=N triggers=N statistics=NONE tables=(BSKT_AGENT_BASKET_CALL_DETAIL , BSKT_AGENT_ORDER_NOTE , BSKT_BASKET_ITEM_TYPE , BSKT_DISCOUNT_APPLY_TYPE , BSKT_DISCOUNT_REASON , BSKT_ITEM_CALC_PRICING , BSKT_ITEM_PRICING_XREF , BSKT_ITEM_SUB_PRODUCT , BSKT_PAYMENT_DETAIL…

Read More “export import with parameter file.” »

Oracle, SQL scripts

Posts pagination

Previous 1 … 28 29 30 … 57 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
  • DBMS_SQL for alter session. Oracle
  • Database link password in user_db_links Oracle
  • cif crons Linux/Unix
  • secure crt settings Linux/Unix
  • Drop specific SQL plan baseline – spm Oracle
  • Export Oracle data and Compress at same time Oracle
  • How to analyze statspack or AWR report. Oracle
  • Follwoing korn shell is used to move files from source folder to destination folder and gzip it in destination folder. mv_iotto.ksh Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme