SQL Server: A More Flexible xp_ReadErrorLog That Reads All Error Logs Including Archives

I am sure that all of you are already familiar with the extended stored procedure xp_ReadErrorLog and its less flexible and published equivalent sp_ReadErrorLog (which takes less parameters) for reading the SQL Server Error Log. xp_ReadErrorLog - To read current error log: The extended stored procedure xp_ReadErrorLog is very useful. It helps with reading the … Continue reading SQL Server: A More Flexible xp_ReadErrorLog That Reads All Error Logs Including Archives

Advertisements

PowerShell: Simple Challenge

As I said before, I am a regular at my local PowerShell user group. I keenly look forward to our monthly meetings. We share a lot amongst ourselves. It is a small but close-knit group. Recently, one of the members, Sergii Cherkashyn came up with a coding challenge for the group. This blog post is about … Continue reading PowerShell: Simple Challenge

Thoughts On When To Use – Write-Host, Write-Output, Write-Debug, Write-Warning, Write-Verbose & Write-Error/Throw

PowerShell has matured as the automation tool of choice on the Microsoft platform, be it on Windows or Azure. However, there is no official guidance on best-practices and standards around some things. At times, bloggers do things incorrectly in their examples thereby reinforcing bad practices. Hopefully, this small post will help connect some dots for you! Please … Continue reading Thoughts On When To Use – Write-Host, Write-Output, Write-Debug, Write-Warning, Write-Verbose & Write-Error/Throw

SQL Server: Using Data From Another Instance To Drive Logic In Current Instance (Using Linked Server)

Data is in another DB/Instance - but logic needs to be in this DB/instance Your logic in the current database/instance sometimes is driven by data in a completely separate SQL Server instance. People do this using different methods Use LinkedServer to bring over and join data Use SSIS or another mechanism to copy the data … Continue reading SQL Server: Using Data From Another Instance To Drive Logic In Current Instance (Using Linked Server)

Oracle – Return SELECT Statement Results Like SQL Server SP’s – Using Pipelined Functions

Note: You can find a simpler version of this in my answer on StackOverflow. Returning SELECT statement results from procedures/functions? Everyone is familiar with Oracle functions that return basic data types (simple values with no internal components). Although rarely used, Oracle functions are however capable of returning more complex data types like cursors, arrays and … Continue reading Oracle – Return SELECT Statement Results Like SQL Server SP’s – Using Pipelined Functions