May 2009 - Posts

SQL Server Management Studio Hack

Database administrators are lazy by nature. And although Books Online is a very good resource I'd like to get my own mini overview of most used statements in a new query template such as this one:

 

So whenever I hit "New Query" I get my template. It's also usefull when you want to send your script to a colleague so you won't have to tell him/her what server they need to connect to and which database to select.

You might want to give it a try.

1. Open file 'C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\SqlWorkbenchProjectItems\SQL\SQLFile.sql' in Management Studio and copy the code below and save.

-- ! Please execute in SQLCMD mode ! click SQLCMD Mode on the SQL Server Management Studio Query menu,

SET NOCOUNT ON
:CONNECT <servername>

USE <databasename>
GO

 
/*

 DBCC SQLPERF(LOGSPACE)WITH NO_INFOMSGS
 DBCC OPENTRAN WITH TABLERESULTS
 DBCC INPUTBUFFER ( session_id )
 DBCC SHOW_STATISTICS ("Person.Address", AK_Address_rowguid) WITH HISTOGRAM;
 DBCC SHOWCONTIG ("HumanResources.Employee");
 DBCC FREEPROCCACHE WITH NO_INFOMSGS;
 DBCC DROPCLEANBUFFERS [ WITH NO_INFOMSGS ]
 DBCC CHECKCONSTRAINTS ("Production.CK_ProductCostHistory_EndDate");
 DBCC DBREINDEX ("HumanResources.Employee", " ", 70);
 DBCC INDEXDEFRAG (AdventureWorks, "Production.Product", PK_Product_ProductID)
 DBCC CHECKDB;
 DBCC CHECKTABLE ("HumanResources.Employee") WITH PHYSICAL_ONLY;

 EXEC sp_helpfile
 EXEC sp_spaceused
 EXEC sp_change_users_login 'Report';
 EXEC master.dbo.xp_fixeddrives

*/
 

Posted by Steve with no comments
Filed under: ,

Community Day 2009

 

Community Day is back again, are you ready for our Third Edition of Microsoft Community Day?
 
Eleven Microsoft User Groups combine their efforts to organize this unique networking and knowledge sharing
event. A unique opportunity to learn about Microsoft’s latest developments and technologies like Exchange
2010, Silverlight 3, Visual Studio 2010, SQL Server 2008, Windows 2008R2, Powershell V2, Forefront
Identity Manager 2010, XNA 3.1. and OCS R2.
 
Microsoft Community Day will take place on Thursday 25th June 2009 in Utopolis, Mechelen, where we will
bring together 300 IT Pro’s and developers.
 
The Microsoft Community Day 2009 is supported by BESUG, BIWUG, IT-Talks, MVUG, Pro-Exchange, SCUG, SQLUG, VBIB, Visug, WinSec, XNA-BUG.

(Original source: www.mscommunity.be)

 

Posted by Steve with no comments
Filed under:

SQL Server 2008 Developer Training Kit

I stumbled upon the SQL Server 2008 Developer Training Kit in the latest weekly Microsoft Download Notifications: May 15, 2009 newsletter.

Download the SQL Server 2008 Developer Training Kit to understand how to build Web applications that deeply exploit the rich data types, programming models, and new development paradigms in SQL Server 2008. (Source: Microsoft Download Notifications: May 15, 2009 newsletter.)

Topics discussed in the training kit:

  • Filestream
  • Spatial
  • T-SQL
  • Date and Time Types
  • SQLCLR
  • Reporting Services
I only got so far as the spatial demo. I've seen two live sessions about spatial data so far and I fell asleep (really). They should of taken the more practical approach like the spatial demo in the SQL Server 2008 Developer Training Kit.

Let the wife know you won't be available this week.

 

Posted by Steve with no comments

Real World DBA podcasts

A very nice collection (2.4 hours) of the Real World DBA podcast series by Buck Woody: http://edge.technet.com/Tags/Real+World+DBA/

 

Posted by Steve with 1 comment(s)
Filed under: