Brent Ozar SQL Server Expert Quest Software SESSION CODE: DAT316
CREATE TRIGGER trig_addUser ON Users FOR INSERT AS VARCHAR(10) = (SELECT StatusName FROM Inserted) = 'INACTIVE' PRINT ‘Inactive employees can no longer be added.’ ROLLBACK
SELECT TOP 100 * FROM dbo.Posts WHERE OwnerUserId = 1538 SELECT TOP 100 Tags, Id FROM dbo.Posts WHERE OwnerUserId = 1538
VARCHAR(100) = 'select * from authors' EXEC
VARCHAR(100) = 'select * from authors’ + 'ORDER BY ' EXEC
SELECT object_name(i.object_id ),p.rows,user_seeks,user_scans,user_lookups,user_updates,last_user_seek,last_user_scan,last_user_lookup FROM sys.indexes i INNER JOIN sys.partitions p ON i.object_id = p.object_id AND i.index_id = p.index_id LEFT OUTER JOIN sys.dm_db_index_usage_stats ius ON i.object_id = ius.object_id AND i.index_id = ius.index_id WHERE type_desc = 'HEAP' ORDER BY rows desc --
Remove Indexes Add Indexes Observe
Required Slide Track PMs will supply the content for this slide, which will be inserted during the final scrub.
Sign up for Tech·Ed 2011 and save $500 starting June 8 – June 31 st You can also register at the North America 2011 kiosk located at registration Join us in Atlanta next year