A client wanted a script to show when each SQL login will expire. LOGINPROPERTY makes it easy on SQL 2008 onwards. Here is the query I used.
Identify Used Space in Log File- Interview Question of the Week #090
Question: How to identify Used Space in Log File?
Answer: Use following command to display used log file size and total used space in the log file.
PowerShell – Reading Tables Data Using Script
Read-SqlTableData is a PowerShell cmdlet for reading tables data from SQL Server without writing a query. Here is how I tried it on my box.
SQL SERVER – How to Join a Table Valued Function with a Database Table
I use APPLY to Join a Table Valued Function with rows from another table. The example passes each customer’s delivery city.
SQL SERVER – Set AUTO_CLOSE Database Option to OFF for Better Performance
How I helped a customer get better performance by setting the AUTO_CLOSE Database Option to OFF, and why this setting hurts busy databases.
SET NOCOUNT ON in SQL Server: How to Hide Rows Affected Messages
SET NOCOUNT ON stops SQL Server from sending a rows affected message after every statement. This post tests what it changes and what it doesn’t: @@ROWCOUNT, scope inside a procedure, timing and the text that sp_updatestats prints. It also covers client programs that depend on the count.







