Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • upload.html PHP/MYSQL/Wordpress
  • Find_planinfo.sql Oracle
  • Check_recovery.sh program to run sqlplus and return its values remotely. Linux/Unix
  • Temporary Tablespsace Temp tablespace behaviour Oracle
  • send attachment from unix-shell script Linux/Unix
  • move_arch_files.ksh Linux/Unix
  • Free conference number from http://www.freeconference.com Oracle
  • CPU speed on Linux Linux/Unix
  • Drop tempfiles from database Oracle
  • rm_backup_arch_file.ksh Linux/Unix
  • handling filenname with space Linux/Unix
  • Find Multiple levels of object dependencies : depen.sql Oracle
  • How to calculate PROCESSES parameter Oracle
  • Removing first line Linux/Unix
  • Goldengate document from Porus Oracle

tblwopk.sql /* Find Tables Without PK */

Posted on 02-Aug-2005 By Admin No Comments on tblwopk.sql /* Find Tables Without PK */

set pagesize 300

set linesize 205

set head on

set echo off

spool tblwopk

accept usrid prompt ‘Enter User Name : ‘

REM Find all tables that does not have primary key on them.

select /*+ rule */ a.table_name

from dba_tables a

where a.owner = upper(‘&usrid’)

and a.table_name not in

( select b.table_name

from dba_constraints b

where b.table_name = a.table_name

and b.owner = a.owner

and b.constraint_type = ‘P’

)

order by a.table_name;

spool off

Oracle, SQL scripts

Post navigation

Previous Post: find_pk.sql /* Find Primary Key */
Next Post: db_status.sql

Related Posts

  • How to specify 2 arch location to avoid any kind of DB hanging. Oracle
  • Load SPM baseline from AWR Oracle
  • Trace a SQL session from another session using ORADEBUG Oracle
  • How to check current redo log progress redo_progress.sql Oracle
  • True Session Wait Activity in Oracle 10g Verygood Oracle
  • Adding or Dropping Online Redo Log Files When Physical Standby in place Oracle

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

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

Recent Posts

  • Complete Git Tutorial for Beginners25-Dec-2025
  • Postgres DB user and OS user.25-Dec-2025
  • Trace a SQL session from another session using ORADEBUG30-Sep-2025
  • 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

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • 556976.1 Oracle Clusterware: Components installed Oracle
  • cp_filesystem.sql Oracle
  • adding new line after specific pattern using sed Linux/Unix
  • How do I get Oracle to automatically start when my server boots up? Oracle
  • avail.sh ( find filesystem spae usage) Linux/Unix
  • SAN Linux/Unix
  • Default User Profile Oracle
  • how to find OS block size Oracle

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme