Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Temporary tablespace explaination Oracle
  • Query to Generate aggregate on every 30 mins. Oracle
  • replacing ^M character when passing files from Windows to Unix Linux/Unix
  • How do I get Oracle to automatically start when my server boots up? Oracle
  • Configure ssh authentications for RAC Oracle
  • find_longsql.sql Oracle
  • Check_recovery.sh program to run sqlplus and return its values remotely. Linux/Unix
  • Renaming the column name Oracle
  • Some OS level threshold for performance. Linux/Unix
  • Important Solaris Commands Linux/Unix
  • How To Limit The Access To The Database So That Only One User Per Schema Are Connected (One Concurrent User Per Schema) Oracle
  • Zip and unzip with tar Linux/Unix
  • Oracle GoldenGate lag monitoring shell script Linux/Unix
  • How to find who is using which Rollback segment and how many rows or blocks in that rollback segments, Oracle
  • V$transaction notes for finding XID composition. 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

  • Oracle Internal Good Websites 1 Oracle
  • Oracle Standby Database Library Index from Metalink Oracle
  • Default User Profile Oracle
  • Global Unique Identifier Generation in Oracle 9.2 SYS_GUID() Oracle
  • DB Console Mainenance. Oracle
  • online_bkup.sql Oracle

Leave a Reply Cancel reply

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

Categories

  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • Oracle (388)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (337)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • findinfo.sql (SQL for getting CPU and Active session info)27-May-2025
  • SQL Tracker by SID sqltrackerbysid.sql22-Apr-2025
  • How to connect to Oracle Database with Wallet with Python.21-Mar-2025
  • JSON/XML Types in Oracle18-Mar-2025
  • CPU Core related projections12-Mar-2025
  • Exadata Basics10-Dec-2024
  • Reading config file from other folder inside class24-Sep-2024
  • Python class import from different folders22-Sep-2024
  • Transfer SQL Profiles from One database to other database.05-Sep-2024
  • Load testing on Oracle 19C RAC with HammerDB18-Jan-2024

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Changing default shell Linux/Unix
  • On solaris 10, “S” link is not part of $ORACLE_HOME/bin/oracle as default. ( For 9.2.0.8) Oracle
  • upload.html PHP/MYSQL/Wordpress
  • Python class import from different folders Python/PySpark
  • to see when crontab is changed. Linux/Unix
  • Useful Solaris Commands on 28-SEP-2005 Linux/Unix
  • Jai Shree Ram Oracle
  • This is from Temi Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme