PowerShell & SQL Server: Run In Parallel – Collect SQL Results With PRINT Output From Across Your SQL Farm – Fast!

If you have been working with PowerShell and SQL Server for a while now, you know that it is not difficult to capture the PRINT statement output as VERBOSE output (which can then be redirected to a variable or file). You also know that it is not too difficult to run SQL in parallel against … Continue reading PowerShell & SQL Server: Run In Parallel – Collect SQL Results With PRINT Output From Across Your SQL Farm – Fast!

Advertisements

PowerShell: Export-QueryToSQLTable – Export All Of Glenn Berry’s DMV’s, sp_WhoIsActive, sp_Blitz & Any Of Your Own Queries To SQL Server Tables

There are native PowerShell cmdlets to export to CSV  or text but I have not seen one that can easily export any SQL query output to a SQL Server table in bulk (Write-DbaDataTable function of dbatools does it for one table which I use in my solution below). I probably did not look too hard … Continue reading PowerShell: Export-QueryToSQLTable – Export All Of Glenn Berry’s DMV’s, sp_WhoIsActive, sp_Blitz & Any Of Your Own Queries To SQL Server Tables

Oracle – Capture OS Command Output Using Oracle External Tables

Case for the OS side: Some things are best done on the OS side and there is no question about that. Case for the DB side: Some things are best done on the database side and there is no question about that either. What if? Some things need the output of one in the other … Continue reading Oracle – Capture OS Command Output Using Oracle External Tables

Oracle – Capture PL/SQL Output From DBMS_OUTPUT.PUT_LINE To Table Or File

Debugging PL/SQL Code: Stepping through code is a basic necessity for programmers to test and verify logic flow in code. Very few PL/SQL programmers use this capability. Most, if not all, rely on the capabilities of the Oracle supplied package DBMS_OUPUT. Specifically, the PUT_LINE procedure within DBMS_OUTPUT is used as a crutch for debugging needs. … Continue reading Oracle – Capture PL/SQL Output From DBMS_OUTPUT.PUT_LINE To Table Or File

Oracle – Find A Needle In The Hay Stack – How To Pinpoint Data Errors Like “ORA-12899: value too large for column”

Nasty data-related errors: If you are looking to resolve one of these types of errors, you are in the right place. Please keep reading. ORA-01400: cannot insert NULL into (string) ORA-01401: inserted value too large for column ORA-02290: check constraint (string.string) violated ORA-02291: integrity constraint (string.string) violated - parent key not found ORA-02292: integrity constraint … Continue reading Oracle – Find A Needle In The Hay Stack – How To Pinpoint Data Errors Like “ORA-12899: value too large for column”