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)


By zendance,

Runs a SQL statement against each database based on a LIKE pattern for the name of the database.

* IsLike and IsNotLike parameters let you specify both a matching pattern and an exclusion pattern for the database name.
* Script_Only mode generates the script of what the stored proc executes.  Especially useful for DDL statements.
* List_Only mode generates the list of the databases affected by the IsLike/IsNotLike parameters.

* Max query string limit of 4000 characters

Be sure to read the USAGE section in the top of the stored proc.

Thanks for looking!

Total article views: 375 | Views in the last 30 days: 1
Related Articles

Free Webcast Series: Patterns and Practices in Database Administration

SSWUG.ORG’s virtual webcasts will prepare the “Accidental DBA” for patterns and practices they wil...


Incremental pattern matching

Incremental pattern matching in column.


Generating a Sequential Pattern

For many of us, working with the identity property allows us to easily generate a sequential series ...


SQL lunch #28-SSIS Design Patterns 1a: Introduction to SSIS Design Patterns

In this three part series SQL Server MVP Andy Leonard will discuss SSIS Design Patterns. Speak...


T-SQL 2005 String Pattern??

T-SQL 2005 String Pattern??


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

Already a member? Jump in:

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