Powershell: Create new routes based on existing routes

bschelst/ June 8, 2019/ PowerShell/ 0 comments

It’s possible that you want to change routes on a system which point to a certain gateway, and replace them with a new gateway. The only thing this silly powershell is doing, is getting the list of routes, filter out the ‘old gateway’, replace that gateway, and put the deletes/add in a batch script which then can be executed when

Read More

T-SQL: Check progress of DBCC checkdb

bschelst/ May 10, 2019/ SQL-Server/ 0 comments

Doing a dbcc checkdb can take a lot of time, and in case of corruption you really want to see the progress. You can use the t-sql statement below to find the progress. Keep in mind to replace the YOUR_DB_ID to the id of your database. (find out in sys.databases)

Oracle: solving block corruption

bschelst/ April 29, 2019/ Oracle/ 0 comments

Step 1:  If block corruption was found, first find the corrupted blocks: Stzp 2:  Check to which table/index/etc that block belongs to. Step 3:  Resolve the block corruption using RMAN (which is one of the possibilities):  

Linux: “du” values don’t match “df” values.

bschelst/ February 16, 2019/ Linux/ 0 comments

If you do a df, and you compare those values with ‘du’, it is possible that those values don’t match. There are multiple reasons why this can happen, and one of those reasons if that files where deleted, but that the files are still in use by an application.In that case, it is possible that you need to stop/restart the

Read More

T-SQL: List transactions & log used

bschelst/ February 11, 2019/ SQL-Server/ 0 comments

The code below will list the transactions on the instance, and it will also include the size of the log which is used for that transaction.The output is ordered by log size. You can also use the below to find more info regarding a transaction