Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

Index Fragmentation Expand / Collapse
Author
Message
Posted Friday, May 30, 2008 3:32 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, August 29, 2012 5:09 PM
Points: 42, Visits: 194
Comments posted to this topic are about the item Index Fragmentation
Post #509394
Posted Thursday, July 24, 2008 3:22 AM


SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Tuesday, July 15, 2014 1:06 PM
Points: 95, Visits: 1,137
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
Post #539949
Posted Thursday, July 24, 2008 3:30 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Monday, June 23, 2014 6:03 AM
Points: 920, Visits: 702
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
Post #539953
Posted Thursday, July 24, 2008 3:41 AM


SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Tuesday, July 15, 2014 1:06 PM
Points: 95, Visits: 1,137
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
Post #539959
Posted Thursday, July 24, 2008 9:03 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC 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
Post #540250
Posted Friday, July 25, 2008 12:10 AM


SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Tuesday, July 15, 2014 1:06 PM
Points: 95, Visits: 1,137
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
Post #540708
Posted Friday, July 25, 2008 12:50 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, August 29, 2012 5:09 PM
Points: 42, Visits: 194
OK, and happy holidays :) .

Sergio
Post #540723
Posted Thursday, July 31, 2008 2:40 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum 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?


Post #544720
Posted Friday, August 1, 2008 1:15 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC 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
Post #544884
Posted Friday, October 21, 2011 4:39 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Tuesday, July 8, 2014 12:06 AM
Points: 528, Visits: 163
Hello,

Do you really need UPDATE STATISTICS when executing REBUILD?

I thought that this will be executed automatically by the rebuild.

Best regards,
Alex
Post #1194246
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse