• About
  • Everyday Linux Commands

<roughCode/>

~ …so I can find it

Tag Archives: Oracle

Get Oracle database version

11 Monday Aug 2014

Posted by Scott in Databases, Oracle

≈ Comments Off on Get Oracle database version

Tags

Oracle

SELECT * FROM V$VERSION

Returns something like this…

Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 – 64bit Production
PL/SQL Release 11.1.0.6.0 – Production
CORE 11.1.0.6.0 Production
TNS for Linux: Version 11.1.0.6.0 – Production
NLSRTL Version 11.1.0.6.0 – Production

Advertisement

Identify full table scans in Oracle

23 Wednesday Jan 2013

Posted by Scott in Uncategorized

≈ Comments Off on Identify full table scans in Oracle

Tags

Oracle

I used to have a good query that I was happy with to do this, but I apparently lost it. Here’s some queries I’ve cobbled together today to identify full table scans and check their SQL…and determine that a maybe some new indexes might be in order based on real world queries…

select * from v$sql_plan where operation = ‘TABLE ACCESS’ and options = ‘FULL’
AND timestamp > sysdate – .01
order by TIME

and use the hash value to get the SQL:

select * from v$sql
where HASH_VALUE = {hash value of a result}

Oracle group by hour

05 Monday Nov 2012

Posted by Scott in Databases, Oracle

≈ Comments Off on Oracle group by hour

Tags

Oracle

Code:
SELECT TRUNC(datecol, ‘HH24’) FROM mytable
GROUP BY TRUNC(datecol, ‘HH24’);

from http://stackoverflow.com/questions/5111396/sql-group-by-date-hour (I liked this solution better)

Recent Posts

  • Bulk commands to install PHP and MySQL on CentOS 7
  • Four year gap? No, had just been self-hosting for a while
  • winhttpcertcfg.exe Example
  • Configure Tomcat 7 to use HTTPS
  • SCP on Mac (and a tool for Windows)

Archives

  • November 2018
  • October 2018
  • October 2014
  • September 2014
  • August 2014
  • July 2014
  • January 2013
  • December 2012
  • November 2012
  • October 2012
  • September 2012
  • August 2012
  • July 2012

Categories

  • Apache Tomcat
  • Apache Web Server
  • Application Servers
  • C#
  • CMS
  • Code Samples
  • Databases
  • Development Tools
  • Drupal
  • IIS
  • Java
  • Linux / UNIX
  • MS SQL Server
  • Networking
  • Operating Systems
  • Oracle
  • Uncategorized
  • Video Games
  • Windows
  • WordPress

Meta

  • Register
  • Log in
  • Entries feed
  • Comments feed
  • WordPress.com

Create a free website or blog at WordPress.com.

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
  • Follow Following
    • <roughCode/>
    • Already have a WordPress.com account? Log in now.
    • <roughCode/>
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar