4
votes
1answer
128 views

Database having only db_datareader shows invalid properties for a index

If a SQL server database user has only public permission in server roles and for a particular database only db_datareader and public permission then while trying script index as CREATE To option in ...
1
vote
2answers
2k views

Auto-generate scripts to create tables, indexes, etc

In SSMS, we can right click a database/table/index/... and select the "Script As" option to generate a drop and create script. Is there a way to automate this script generation and drop the scripts ...
4
votes
4answers
4k views

When to add indexes to #temp tables?

When testing stored procedures in SSMS, it sometimes says there is a missing index on #someTempTable____________________000000000000005B] (someField) etc etc When I do add them like this to the sp: ...
16
votes
3answers
1k views

Is it OK to blindly add missing indexes?

I often use SSMS to test my slow stored procedures for missing indexes. Whenever I see a "Missing Index (Impact xxx)" my kneejerk reaction is to just create the new index. This results in a faster ...