Find-DbaObject - Add unified command to search database objects by name#10321
Find-DbaObject - Add unified command to search database objects by name#10321potatoqualitee merged 4 commits intodevelopmentfrom
Conversation
Adds Find-DbaObject which searches all database object types (tables, views, stored procedures, functions, synonyms, triggers) by name pattern, with optional column name searching. Uses T-SQL against sys.objects and sys.columns for performance. (do Find-DbaObject) Co-authored-by: Andreas Jordan <andreasjordan@users.noreply.github.com>
|
@claude one test is still failing: |
|
Claude finished @andreasjordan's task in 1m 1s —— View job Fixed failing test
Root cause: The test searched for Fix: Added |
syslogins is a system view (is_ms_shipped=1) so IncludeSystemObjects is required to find it alongside IncludeSystemDatabases. (do Find-DbaObject) Co-authored-by: Andreas Jordan <andreasjordan@users.noreply.github.com>
|
@claude the test is still failing. |
|
Claude finished @andreasjordan's task in 4m 41s —— View job Fixed failing test
Root cause: The test tried to find Fix: Rewrote the "System databases" context to follow the established dbatools pattern used by
No |
… in master Replace unreliable search for system-shipped syslogins view with the established dbatools pattern: create a user object in master, then verify IncludeSystemDatabases finds it. Matches Find-DbaView and Find-DbaStoredProcedure test patterns. (do Find-DbaObject) Co-authored-by: Andreas Jordan <andreasjordan@users.noreply.github.com>
|
Ok, tests pass now. |
|
Woohoo! Thank you 🙇🏼 |
…10321) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Closes #9245
Adds
Find-DbaObject, a unified command to search all database object types by name pattern, with optional column name searching.What does this PR do?
-IncludeColumns-ObjectTypeGenerated with Claude Code