SSMS
There are 3 entries for the tag
SSMS
Considering how integrated Microsoft tools usually are the result is frustrating when you tell Visual Studio to open SQL files using Sql Server Management Studio (SSMS). I really don't like using Visual Studio to edit T-SQL files but in the past, before I discovered this tip, each SQL file I opened would open in a new instance of SSMS. Try it: Open a solution which contains SQL files Right-click any SQL file and select “Open With…” Click “Add” Browse to "C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe" or if you're...
Ever have to work on a database with a large number of views and you needed to search the content of the objects? Well, here's a query which will allow you to search inside your view objects:DECLARE @search VARCHAR(1000)SET @search = '[text]'SELECT c.[Text]FROM dbo.sysobjects AS vINNER JOIN dbo.syscomments c ON c.id = v.id AND CASE WHEN c.Number > 1 THEN c.Number ELSE 0 END = 0WHERE v.type = 'V' AND c.[Text] LIKE '%' + @search + '%'Just set the value of @search to the value you'd like to find.This was very useful to me as I was trying...
Well after a long absence due to a crazy workload, I'm baaaack!Keepin' it simple at this point. I've resumed studying for MCTS exams and I've been reading about dynamic management views. I love them. What's more, I love the detail they provide and the capability for deeper analysis.So today I was exploring sys.dm_exec_query_stats and I run across the ability to use CROSS APPLY to view the execution plan xml or the sql text using sys.dm_exec_query_plan and sys.dm_exec_sql_text. I'm really excited about this - I figure I can use all these together like I might use Profiler to find problem queries....