3.2.6 I Need to Find an Object on My Server But All I Have is a Parital Name. How Do I Find All Objects with That Name Prefix?

3.2.6.1 Objectives
3.2.6.2 Example Execution
3.2.6.3 Discussion
3.2.6.4 Permissions Required
3.2.6.5 Tips and Tricks

One of the challenges for database administrators who manage servers with thousands of objects is the task of finding an object by name. Sometimes all you have to go on is the name of a table or perhaps an obscure reference to a partial name. This can come about through a diagnosis of a problem connection, application, or via an incomplete description from a defect report.

It is also possible you need to simply check to see if certain things exist. For example, suppose among your databases are parts or inventory data and you want to check to see if there are any functions or procedures that operate on a column named 'cost'. Moreover, you want to see anything related that has 'cost' as part of its name.

Whatever the case, it would be a big time saver if you could search through all of the database objects and see a list of the objects whose name matches a prefix (or pattern). Fortunately, the mysqlmetagrep utility can get this done.