You can use dynamic SQL cursor. Change the following index REBUILD dynamic SQL script to fit your objective:
http://www.sqlusa.com/bestpractices2008/rebuild-all-indexes/
sys.databases system view has the list of databases.
Kalman Toth Database & OLAP Architect sqlusa.com
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012
No comments:
Post a Comment