troubleshooting Question

sql cursor - need help

Avatar of sg05121983
sg05121983 asked on
Microsoft SQL ServerMicrosoft SQL Server 2008SQL
24 Comments3 Solutions465 ViewsLast Modified:
The attached sql script performs index rebuild for single DB.

We need to perform index rebuild against all DB's present on sql instance in single script.

I have tried to create cursor but it was not returning results as expected.

Please help me to create cursor for the attached script (need to perform index rebuild against all DB's present on server using attached script).

Thanks in advance. .
Saurabh Bhadauria

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 3 Answers and 24 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 24 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros