November 19, 2014 at 12:17 pm
I am debugging a DB maintance script which creates a table of index maintainance commands which are created separately for each index according to the level of fragmentation and other factors.
For the debugging process, I'm looking for a way to parse each command in the table without actually running them to locate any syntax errors. In other words, as if you clicked the blue check on each one.
Does such a function exist in SQL 2008 (the version I'm doing this on) or other versions?
November 19, 2014 at 12:53 pm
Just use PRINT or SELECT that @ variable which contains the dynamic sql and comment out the
e.g.
--Exec @sql
--execute @ variable
November 19, 2014 at 2:38 pm
These are ALTER INDEX statements, so I'm not sure that will work.
November 21, 2014 at 2:54 pm
Check this out:
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply