Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • V$transaction notes for finding XID composition. Oracle
  • cur_sql.sql Oracle
  • Does DBMS_JOB recompute the NEXT_DATE interval after or before Oracle
  • findobj.sql Oracle
  • Oracle GoldenGate lag monitoring shell script Linux/Unix
  • Building Our Own Namespaces with “Create Context” Oracle
  • Giving Grant on v$DATABASE Oracle
  • SAN Linux/Unix
  • dbinv.sql Oracle
  • find_log_switch.sql Find log switches in graphical manner Oracle
  • create a folder in multiple places Linux/Unix
  • Jai Shree Ram Oracle
  • dbms_job.submit example Oracle
  • cache buffer chain latch Oracle
  • chk_space_SID.ksh Linux/Unix

Display the top 5 salaries for each department using single SQL

Posted on 03-May-2010 By Admin No Comments on Display the top 5 salaries for each department using single SQL

Ok, given the clarification I can show you a way to get this in 815 and before (slow on a big table) and in 816 and up (fast with analytic functions!) ops$tkyte@ORA817.US.ORACLE.COM> select * from t; DEPTNO SAL ———- ———- 10 100 10 100 10 200 10 300 10 400 10 500 20 100 20…

Read More “Display the top 5 salaries for each department using single SQL” »

Oracle, SQL scripts

import-export with multiple files

Posted on 23-Apr-2010 By Admin No Comments on import-export with multiple files

exp userid=fdba file=dmp1.dmp,dmp2.dmp,dmp3.dmp log=myfinaldmp.log feedback=20000 filesize=1800M tables=Sp.SP_FLWS_ORDER_STATUS,Sp.SP_FLWS_ORDER_STATUS_DETAIL,sp.SP_MONITOR statistics=none Default: expdat.dmp Specifies the names of the export files to import. The default extension is .dmp. Because Export supports multiple export files (see the following description of the FILESIZE parameter), you may need to specify multiple filenames to be imported. For example: imp scott/tiger IGNORE=y FILE =…

Read More “import-export with multiple files” »

Oracle, SQL scripts

Oracle Statspack survival Guide

Posted on 13-Apr-2010 By Admin No Comments on Oracle Statspack survival Guide

http://www.akadia.com/services/ora_statspack_survival_guide.html

Oracle, SQL scripts

DB Console Mainenance.

Posted on 26-Mar-2010 By Admin No Comments on DB Console Mainenance.

Comments ——– === ODM Action Plan === To recreate dbcontrol, please follow the instructions below: 1. Make sure that the following is true or have already been done: – you’re logged in to the OS as the user who owns the database installation – the ORACLE_HOME and ORACLE_SID environment variables are set properly in the…

Read More “DB Console Mainenance.” »

Oracle, SQL scripts

ORA-01220

Posted on 12-Mar-2010 By Admin No Comments on ORA-01220

Oracle Error :: ORA-01220 file based sort illegal before database is open Cause A query issued against a fixed table or view required a temporary segment for sorting before the database was open. Only in-memory sorts are supported before the database is open. Action Re-phrase the query to avoid a large sort, increase the values…

Read More “ORA-01220” »

Oracle, SQL scripts

Oracle Release Explaination

Posted on 07-Mar-2010 By Admin No Comments on Oracle Release Explaination

11.1.0.6.0 11 : Major Release Number 1 : Maintenance Release Number 0 : AppServer Release Number 6 : Component-Specific Release Number 0 : Platform specific release number.

Oracle, SQL scripts

How to specify 2 arch location to avoid any kind of DB hanging.

Posted on 03-Mar-2010 By Admin No Comments on How to specify 2 arch location to avoid any kind of DB hanging.

Scenario: I wish to configure two locations for log archives in the way that archives should get stored on location “A” and when it gets filled or become unavailable due to any reason then logs should automatically start using location “B” for onward. In short failure of location A should start storing archives on location…

Read More “How to specify 2 arch location to avoid any kind of DB hanging.” »

Oracle, SQL scripts

Sending SQLPLUS output in HTML format

Posted on 17-Feb-201025-May-2023 By Admin No Comments on Sending SQLPLUS output in HTML format

SET MARKUP HTML ON SPOOL ON generates an HTML page for each subsequently spooled file. The HTML tags in a spool file are closed when SPOOL OFF is executed or SQL*Plus exits. You can use SET MARKUP HTML ON SPOOL OFF to generate HTML output suitable for embedding in an existing web page. HTML output…

Read More “Sending SQLPLUS output in HTML format” »

Oracle, SQL scripts

Generating XML from SQLPLUS

Posted on 10-Feb-2010 By Admin No Comments on Generating XML from SQLPLUS

set pages 0 set linesize 150 set long 9999999 set head off SQL> select dbms_xmlgen.getxml(‘select employee_id, first_name, 2 last_name, phone_number from employees where rownum < 6') xml 3 from dual 100 Steven King 515.123.4567 101 Neena Kochhar 515.123.4568 102 Lex De Haan 515.123.4569 103 Alexander Hunold 590.423.4567 104 Bruce Ernst 590.423.4568

Oracle, SQL scripts

Query to Generate aggregate on every 30 mins.

Posted on 09-Feb-2010 By Admin No Comments on Query to Generate aggregate on every 30 mins.

select to_char(first_time, ‘RRRRMMDDHH24’), COUNT (CASE WHEN TO_NUMBER(TO_CHAR(FIRST_time, ‘MI’)) 30 THEN 1 ELSE NULL END) COUNT2 FROM V$LOG_HISTORY GROUP BY to_char(first_time, ‘RRRRMMDDHH24’) order by 1 / TO_CHAR(FI COUNT1 COUNT2 ———- ———- ———- 2010020906 3 1 2010020907 3 1 2010020908 3 1 2010020909 3 1 2010020910 3 1 2010020911 3 1 2010020912 3 1 2010020913 3 1…

Read More “Query to Generate aggregate on every 30 mins.” »

Oracle, SQL scripts

Posts pagination

Previous 1 … 7 8 9 … 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
  • RAC 11g with vmware Oracle
  • TNSNAMES entries details Oracle
  • 10g RAC: Troubleshooting CRS Root.sh Problems Oracle
  • find_err.sql for finding errors from dba_errors. Oracle
  • Checking SQL Server Version SQL Server
  • Find execution plan from dba_hist_sql_plan for a specific SQL_ID and PLAN_HASH_VALUE fplan.sql Oracle
  • Standby Database File Management in 10g with STANDBY_FILE_MANAGEMENT Oracle
  • scripts to take listener.log backup Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme