My Oracle Support Banner

search.sql: A Script For Searching Strings Or Characters In The Database (Doc ID 243096.1)

Last updated on AUGUST 03, 2023

Applies to:

Oracle Database - Enterprise Edition - Version to [Release 8.1.7 to 11.2]
Oracle Database Cloud Schema Service - Version N/A and later
Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Information in this document applies to any platform.


Search.sql is a simple sql script that can be used to locate certain characters or strings all in all the text that is stored in (VAR)CHAR fields in the database.
This script can be helpful in all situations where you look for an occurrence of a specific string in the data that is stored in the database. For example it can be used to search for occurrences of the default replacement character that is stored if a user tries to store a character that is not defined in the database character set. You might want to search for the occurrence of that to replace those characters with something better.
Optionally the script can create a new script called replace.sql which will contain statements to replace the search string with a new string. Replace.sql can then be run after search.sql is finished.


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document
 Sample Output

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.