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 «««12345

SQL Server 2005: Script all Indexes Expand / Collapse
Author
Message
Posted Monday, June 17, 2013 10:10 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, August 7, 2013 10:13 AM
Points: 2, Visits: 12
Problem with the script in that if any of your variables are null you don't get the create string produced. i.e., in my experimentation @FileGroupName was null on one of my tables so the Drop index is created but the Create Index is not produced.
Post #1464247
Posted Monday, June 17, 2013 10:21 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Friday, December 5, 2014 4:27 AM
Points: 346, Visits: 1,439
tom-580235 (6/17/2013)
Problem with the script in that if any of your variables are null you don't get the create string produced. i.e., in my experimentation @FileGroupName was null on one of my tables so the Drop index is created but the Create Index is not produced.

Which version of the script are you using?
Post #1464264
Posted Monday, June 17, 2013 11:28 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, August 7, 2013 10:13 AM
Points: 2, Visits: 12
I am using the last one published.
Post #1464290
Posted Monday, October 21, 2013 6:20 AM


Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, February 10, 2014 7:31 AM
Points: 6, Visits: 49
I have i doubt

when I recreated an index using this script ,I found 1 difference in FILLFACTOR value in case of '0'

----------------------------------------------
This is what I generated before this script
----------------------------------------------
CREATE NONCLUSTERED INDEX [ABC_StudentIdCardNumber] ON [dbo].[StudentAccounts]
( [StudentIdcardNumber] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF
, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO

----------------------------------------------
Then i drop the indexes and create it again using the script generated with above script & again generate Create Script
----------------------------------------------

CREATE NONCLUSTERED INDEX [ABC_StudentIdCardNumber1] ON [dbo].[StudentAccounts]
( [StudentIdcardNumber] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF
, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, = 100) ON [PRIMARY]
GO
----------------------------------------------
Are these 2 create index scripts technically same of OR script needs some correction ?
Post #1506644
Posted Wednesday, March 26, 2014 6:04 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, March 28, 2014 8:28 AM
Points: 1, Visits: 9
Rephrasing my query. Currently the create index script is coming as a message. Can we have the complete message as a table column. Actually , I am calling this stored procedure from JAVA. There is no function in Java to get the messages returned by script but java can capture the table column of the table returned by the stored procedure.

Please help.
Post #1555231
« Prev Topic | Next Topic »

Add to briefcase «««12345

Permissions Expand / Collapse