Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

The Ultimate Object Searcher

By Jesse Roberge,

*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
Util_ObjectSearch
By Jesse Roberge - YeshuaAgapao@Yahoo.com

Searches for objects who's names contain the search string. outputs IDs, names, and types of the object and its parent.
LIKE wildcards are not automatic, which allows for easy 'begins with', 'ends with', and 'equal to' queries.

Required Input Parameters:
@ObjectName sysname Filters tables. Can use LIKE wildcards. All tables if blank.

Optional Input Parameters:
@SchemaName sysname='' Filters schemas. Can use LIKE wildcards. All schemas if blank.
@UserOjbects TinyInt=0 Searchthe names of user objects
@SystemObjects TinyInt=0 Search the names of system objects
@AllTypes TinyInt=0 Also search the names of constraints and old-style rules/defaults

Usage
EXECUTE Util_ObjectSearch '%mpi%'
EXECUTE Util_ObjectSearch @SchemaName='dbo', @ObjectName='%order%', @SystemObjects=1, @AllTypes=0

Copyright:
Licensed under the L-GPL - a weak copyleft license - you are permitted to use this as a component of a proprietary database and call this from proprietary software.
Copyleft lets you do anything you want except plagarize, conceal the source, proprietarize modifications, or prohibit copying & re-distribution of this script/proc.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.

see <http://www.fsf.org/licensing/licenses/lgpl.html> for the license text.

*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=

Total article views: 1084 | Views in the last 30 days: 6
 
Related Articles
FORUM

Licensing Question?

Network inventory software licensing

SCRIPT

Object Search

Procedure to search any database (or a combination of databases, including all) for a specific strin...

FORUM

SSIS Licensing Question

Licensing

ARTICLE

Easy Licenses

Software licensing can be complex and confusing. Even in Windows and SQL Server, where hard limits a...

ARTICLE

Software Licensing Cuts - Database Weekly (Mar 16, 2009)

In the news this week, Microsoft is cutting some licensing costs for larger companies. A good move f...

Tags
administration    
indexed views    
maintenance and management    
search    
sql server 2005    
sqlclr    
stored procedures    
tables    
t-sql    
utility    
 
Contribute

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones