|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Wednesday, August 29, 2012 5:09 PM
Points: 42,
Visits: 194
|
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Friday, May 17, 2013 1:35 AM
Points: 95,
Visits: 1,083
|
|
Hi all,
I´ve tried to create the procedure but I got an error during the parsing process. Msg 170, Level 15, State 1, Procedure USP_ExecReorgRebuildIndex, Line 48 Line 48: Incorrect syntax near '('.
I have no idea where the error can be, maybe I´m blind.
If someone has an idea, please give me a hint.
Best regards, Dirk
/EDIT Forget it, it was all my fault. I´ve connected to the wrong database engine and parsed the command against SQL 2000
-- May you never suffer the sentiment of spending a day without any purpose. @DirkHondong on Twitter
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 8:06 AM
Points: 900,
Visits: 654
|
|
Can you post the sample code. so dat it will be more easy to tell you the error.
the error is because of braces u are using. R u creating the dynamic SP or simple SP
Abhijit - http://abhijitmore.wordpress.com
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Friday, May 17, 2013 1:35 AM
Points: 95,
Visits: 1,083
|
|
Hi,
thanks for the reply. I just took the code from here, as it is. http://www.sqlservercentral.com/scripts/SQL+Server+2005/63287/
-- May you never suffer the sentiment of spending a day without any purpose. @DirkHondong on Twitter
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Wednesday, August 29, 2012 5:09 PM
Points: 42,
Visits: 194
|
|
Hi Dirk,
which version of SQL Server are you using ?
This script uses the DMV sys.dm_db_index_physical_stats usable only by the 2005 version of SQL Server.
To defragment indexes with SQL Server 2000 you can use this script (for the moment in Italian language, also released a brief translation in English).
Thanks.
Sergio
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Friday, May 17, 2013 1:35 AM
Points: 95,
Visits: 1,083
|
|
Hello Sergio,
thanks for the reply. In our company environment we´re using SQL 2000 and 2005 servers. So both scripts will be useful. I think, I will try both after my 2 week holidays. :)
Best regards Dirk
-- May you never suffer the sentiment of spending a day without any purpose. @DirkHondong on Twitter
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Wednesday, August 29, 2012 5:09 PM
Points: 42,
Visits: 194
|
|
OK, and happy holidays :) .
Sergio
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Monday, June 18, 2012 2:09 PM
Points: 1,
Visits: 89
|
|
I've created this sp but when I run it with the print option I get no returns. I've already separately identified an index or 2 that are fragmented past 20% but don't show up, even though I've set my threshold at 10. Any ideas?
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Wednesday, August 29, 2012 5:09 PM
Points: 42,
Visits: 194
|
|
Hello wthigo,
before executing the stored procedures you've connected to the database ?
For example:
USE TestDB
EXEC USP_ExecReorgRebuildIndex 'TestDB', 0, -1, 10
Bye
Sergio
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Wednesday, April 10, 2013 6:26 AM
Points: 365,
Visits: 135
|
|
Hello,
Do you really need UPDATE STATISTICS when executing REBUILD?
I thought that this will be executed automatically by the rebuild.
Best regards, Alex
|
|
|
|