Skip to content

Database object search

Before you change something, you need to find what uses it. Object search works on every engine SQL Cockpit supports, and what it finds depends on each engine.

The problem

Each engine keeps its objects in its own catalogue, and most tools search one database at a time. So “what uses this column?” turns into a slow round of connecting and searching.

Recognise the symptoms

  • Changes break a view or routine nobody remembered
  • The same search repeated on every server
  • Nobody’s sure which schema holds the current version
  • Searching definitions needs different SQL on each engine

A practical approach

  1. Connect with a reader account

    Use a least-privilege account, and check that it can see what you need. Search only covers what it can see.

  2. Run object sync

    SQL Cockpit reads metadata through the Agent and adds it to a search index. It doesn’t read your business data.

  3. Search names and definitions

    Look for a table or column name across definitions, and filter by engine and object type.

  4. Confirm before you change anything

    Check what you found in the engine’s dependency views or a test environment, because text search can’t see dynamic SQL.

Database object search by technology

SQL Server

Available: Tables, views, columns, stored procedures, functions, triggers and constraints.

sys.objects and sys.sql_expression_dependencies.

PostgreSQL

Available: Tables, views, materialized views, sequences, indexes, columns, functions, procedures, triggers and keys.

pg_class, pg_proc and pg_depend.

MySQL

Available: Tables, views, columns, routines, triggers, indexes and keys, subject to your grants.

information_schema views.

MariaDB

Available: Tables, views, columns, routines, triggers, indexes and keys, plus sequences where the catalogue shows them.

information_schema views.

Oracle

Available: Tables, views, materialized views, indexes, keys, procedures, functions, triggers, sequences, packages and package bodies.

ALL_OBJECTS, ALL_SOURCE and ALL_DEPENDENCIES.

SQLite

Available: Tables, views, columns, indexes, triggers and keys, using the SQL stored in the file.

sqlite_schema and table-valued pragmas.

What success looks like

Your team starts each change with a shared list of what it’s likely to touch.

Results reflect the last sync and the account’s permissions. Outside SQL Server, dependency graphs are incomplete.