SQL Server Tips & Tricks - Ike Ellis
-
Upload
red-gate-software -
Category
Technology
-
view
923 -
download
1
description
Transcript of SQL Server Tips & Tricks - Ike Ellis
![Page 2: SQL Server Tips & Tricks - Ike Ellis](https://reader033.fdocuments.us/reader033/viewer/2022051610/54811de3b4af9fbe158b6052/html5/thumbnails/2.jpg)
•
•
–
•
![Page 3: SQL Server Tips & Tricks - Ike Ellis](https://reader033.fdocuments.us/reader033/viewer/2022051610/54811de3b4af9fbe158b6052/html5/thumbnails/3.jpg)
http://extras.sqlservercentral.com/prettifier/prettifier.aspx
Red Gate PlugIn for SQL Server Management Studio
![Page 4: SQL Server Tips & Tricks - Ike Ellis](https://reader033.fdocuments.us/reader033/viewer/2022051610/54811de3b4af9fbe158b6052/html5/thumbnails/4.jpg)
•
•
•
•
![Page 5: SQL Server Tips & Tricks - Ike Ellis](https://reader033.fdocuments.us/reader033/viewer/2022051610/54811de3b4af9fbe158b6052/html5/thumbnails/5.jpg)
•
•
![Page 6: SQL Server Tips & Tricks - Ike Ellis](https://reader033.fdocuments.us/reader033/viewer/2022051610/54811de3b4af9fbe158b6052/html5/thumbnails/6.jpg)
•
•
•
![Page 7: SQL Server Tips & Tricks - Ike Ellis](https://reader033.fdocuments.us/reader033/viewer/2022051610/54811de3b4af9fbe158b6052/html5/thumbnails/7.jpg)
•
•
•
•
![Page 8: SQL Server Tips & Tricks - Ike Ellis](https://reader033.fdocuments.us/reader033/viewer/2022051610/54811de3b4af9fbe158b6052/html5/thumbnails/8.jpg)
•
•
•
•
•
![Page 9: SQL Server Tips & Tricks - Ike Ellis](https://reader033.fdocuments.us/reader033/viewer/2022051610/54811de3b4af9fbe158b6052/html5/thumbnails/9.jpg)
• Result set can be used in SELECT, INSERT, UPDATE, or DELETE
• Advantages of common table expressions:
– Queries with derived tables become more readable
– Provide traversal of recursive hierarchies
WITH TopSales (SalesPersonID, NumSales) AS
( SELECT SalesPersonID, Count(*)
FROM Sales.SalesOrderHeader GROUP BY SalesPersonId )
SELECT * FROM TopSales
WHERE SalesPersonID IS NOT NULL
ORDER BY NumSales DESC
![Page 10: SQL Server Tips & Tricks - Ike Ellis](https://reader033.fdocuments.us/reader033/viewer/2022051610/54811de3b4af9fbe158b6052/html5/thumbnails/10.jpg)
•
![Page 11: SQL Server Tips & Tricks - Ike Ellis](https://reader033.fdocuments.us/reader033/viewer/2022051610/54811de3b4af9fbe158b6052/html5/thumbnails/11.jpg)
•
•
•
•
•
![Page 12: SQL Server Tips & Tricks - Ike Ellis](https://reader033.fdocuments.us/reader033/viewer/2022051610/54811de3b4af9fbe158b6052/html5/thumbnails/12.jpg)
•
–
–
–
–
•
•
![Page 13: SQL Server Tips & Tricks - Ike Ellis](https://reader033.fdocuments.us/reader033/viewer/2022051610/54811de3b4af9fbe158b6052/html5/thumbnails/13.jpg)
•
–
–
•
![Page 14: SQL Server Tips & Tricks - Ike Ellis](https://reader033.fdocuments.us/reader033/viewer/2022051610/54811de3b4af9fbe158b6052/html5/thumbnails/14.jpg)
•
•
•
•
![Page 15: SQL Server Tips & Tricks - Ike Ellis](https://reader033.fdocuments.us/reader033/viewer/2022051610/54811de3b4af9fbe158b6052/html5/thumbnails/15.jpg)
select c.Name, e.InstanceName, e.UserName, e.Parameters, e.TimeStart, e.TimeEnd, e.TimeDataRetrieval, e.TimeProcessing, e.TimeRenderingfrom executionlog ejoin catalog con e.reportid = c.ItemID
Send a Link, or a file on a shared folder that you can audit. Find someway to audit who opened the link or the file in the folder. Try to avoid sending the PDF without a way to audit it.
![Page 16: SQL Server Tips & Tricks - Ike Ellis](https://reader033.fdocuments.us/reader033/viewer/2022051610/54811de3b4af9fbe158b6052/html5/thumbnails/16.jpg)
•
•
•
•
•
![Page 17: SQL Server Tips & Tricks - Ike Ellis](https://reader033.fdocuments.us/reader033/viewer/2022051610/54811de3b4af9fbe158b6052/html5/thumbnails/17.jpg)
•
•
![Page 18: SQL Server Tips & Tricks - Ike Ellis](https://reader033.fdocuments.us/reader033/viewer/2022051610/54811de3b4af9fbe158b6052/html5/thumbnails/18.jpg)
•
•
•
•
–
•
–
![Page 19: SQL Server Tips & Tricks - Ike Ellis](https://reader033.fdocuments.us/reader033/viewer/2022051610/54811de3b4af9fbe158b6052/html5/thumbnails/19.jpg)
•
•
•
•
•
![Page 20: SQL Server Tips & Tricks - Ike Ellis](https://reader033.fdocuments.us/reader033/viewer/2022051610/54811de3b4af9fbe158b6052/html5/thumbnails/20.jpg)
•
•
![Page 21: SQL Server Tips & Tricks - Ike Ellis](https://reader033.fdocuments.us/reader033/viewer/2022051610/54811de3b4af9fbe158b6052/html5/thumbnails/21.jpg)