SQL Server Index Report with Included Columns, Storage and more for all Tables in a Database

My new tip about “SQL Server Index Report with Included Columns, Storage and more for all Tables in a Database" has been published at MSSQLTips.com, you can read it here http://www.mssqltips.com/sqlservertip/3450/sql-server-index-report-with-included-columns-storage-and-more-for-all-tables-in-a-database/

Let me know if you have any question or comment. Thanks.

Script all Primary Keys, Unique Constraints and Foreign Keys in a SQL Server database using T-SQL

Yesterday my latest tip about “Script all Primary Keys, Unique Constraints and Foreign Keys in a SQL Server database using T-SQL” has been published, you can read it at http://www.mssqltips.com/sqlservertip/3443/script-all-primary-keys-unique-constraints-and-foreign-keys-in-a-sql-server-database-using-tsql/

Let me know if you have any comment or question.

Script out all SQL Server Indexes in a Database using T-SQL

Today my latest tip has been published about “Script out all SQL Server Indexes in a Database using T-SQL” and you can read it at http://www.mssqltips.com/sqlservertip/3441/script-out-all-sql-server-indexes-in-a-database-using-tsql/

Please let me know if you have any comments or questions.

I am in the running for “Rookie of the Year” in MSSQLTips.com, I count on your vote, thanks!

As many of you know I am writing some tips since this year for MSSQLTips. I encourage you to vote for me as I am in the running for “Rookie of the Year”. If you want to vote for me you can do it here http://www.mssqltips.com/MSSQLTipsAuthorVoting.asp . I count on your vote, thanks!.

Please let me know if you have any comment.

How to use DBCC CHECKPRIMARYFILE to attach several SQL Server databases in seconds

A few hours ago my tip has been published at mssqltips.com about “How to use DBCC CHECKPRIMARYFILE to attach several SQL Server databases in seconds”. You can read it at http://www.mssqltips.com/sqlservertip/3342/how-to-use-dbcc-checkprimaryfile-to-attach-several-sql-server-databases-in-seconds/

If you like this tip then you can follow me @percyreyes on twitter.

SQL Server Analysis Services Error: The following system error occurred: (Microsoft.AnalysisServices)

We can get this error “The following system error occurred: (Microsoft.AnalysisServices)” when we are trying to add user to the server administrator role in Analysis Services via the GUI or by code.

This type of error are raised sometimes when you have orphaned users already added as server administrators. The orphaned users has not got a correct matching with any Windows User in the Active Directory. They were removed from AD but not in the Analysis Services, so, only their invalid users ID are still linked like they are showed in the following picture.

SNAGHTML514aba

What you have to do to fix it is first remove these orphaned users and then add the Windows Users you want to.

If you like this tip then you can follow me @percyreyes on twitter.