Skip to main content

Posts

Showing posts with the label SQL Server

Useful PowerShell Scripts

Have started a project to collect some powerful and useful PowerShell scripts that are really handy when working with Microsoft technologies like SharePoint, SQL Server etc. Here you go: http://ups.codeplex.com Scripts included in the initial release: create document library create site Content Type report on active Site Collection features  Will add more scripts there as I go.

SharePoint 2013 Q&A - SBS

Have recently got a question regarding SharePoint 2013: "How do I create the service accounts can't find sql managment studio installed on virtualbox host os is SBS 2011 Essentials" Answer: I think service accounts should be created in AD, not the SQL Server. If that is what was requested. As per SQL Management Studio on SBS 2011 Essentials it should be SQL Server 2008 Express. Then you might need to download the SQL Management Studio Express from Microsoft site here: http://www.microsoft.com/en-us/download/details.aspx?id=7593

SQL Server Scripts - Part 1

This post will start a series of useful MS SQL Server scripts. Here's the one to display all tables and related columns that were created in the certain database: /* Begin */ SELECT  a.[TABLE_NAME], c.COLUMN_NAME FROM ( SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE (TABLE_TYPE = 'BASE TABLE') ) a INNER JOIN ( SELECT s.[name] as COLUMN_NAME, tt.name as TABLE_NAME FROM syscolumns s INNER JOIN (SELECT * FROM sysobjects WHERE type = 'U') tt ON tt.id = s.id ) c ON c.TABLE_NAME = a.TABLE_NAME ORDER BY a.TABLE_NAME /* End */ The following script will display just table names: /* Begin */ SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE (TABLE_TYPE = 'BASE TABLE') /* End */ Enjoy! :)