Checking Log-shipping on a Secondary SQL Server with PowerShell
You can validate the status of log-shipping to a secondary server if you suspect it has been broken. Below is the script, which…
Read MoreYou can validate the status of log-shipping to a secondary server if you suspect it has been broken. Below is the script, which…
Read MoreHere is an example of using Measure-Command to gather the execution time for loading the SQL Error log into a Out-GridView object:
1 2 3 4 5 |
# First, lets get the SQL Server object... $sqlServer = gi "SQLSERVER:\SQL\MySqlServer\Default" # That's all we needed to do. Let's get error log for any entries after the date listed and return to the Out-GridView object, and then output the measurement to the console. Measure-Command {$sqlServer.ReadErrorLog() | ? LogDate -gt '11/24/2014' | Out-GridView} | Out-Host |
…
Read MoreDRAFT Here is a lot of info about SQL Server Trace Flags and their usage: Links Finding out who dropped a table using…
Read MoreChanging the new script header template The path to the new script template is located on this path in Windows:
1 |
C:\ProgramData\SAPIEN\PowerShell Studio 2014\Templates\FileTypes\PowerShellStudio Template.ps1 |
Change, or…
Read MoreI will post some of my findings about trusted foreign keys and constants here since this has become a minor issue at work.…
Read MoreI am doing some research on how to implement auditing of schema and security changes and will use this post to track notes…
Read MoreI recently had a situation where a database that was set to SIMPLE recovery mode had an ever-growing log file. I had tried…
Read MoreHere is where SQL Server stores any pages it has identified as suspect:
1 2 |
SELECT * FROM msdb.dbo.suspect_pages sp |
Views – 2218
Read MoreThe possible values in the State and State_Desc columns of sys.databases are: 0 = ONLINE 1 = RESTORING 2 = RECOVERING 3 =…
Read MoreThis is amazing. Reminds me of the old War Games movie. Norse Honeypot Hacking Tracker Views – 2162
Read More