We have an old messy thirdparty application at work that uses Oracle. Sometimes the application tends to lock the Oracle system and use a LOT of threads, leaving the system pretty much unresponsive. To be able to kill all 1000+ Oracle-plus processes i created a small script that kills all processes.
To shrink the MS-SQL transactionlogs for emergency storage needs we can use the following syntax. USE MYDB; GO — Truncate the log by changing the database recovery model to SIMPLE. ALTER DATABASE MYDB SET RECOVERY SIMPLE; GO — Shrink the truncated log file to 1 MB. DBCC SHRINKFILE (MYDB_Log, 1); GO — Reset the database […]
Today i found myself in a situation where i needed to copy some data from one table on a MS-SQL server to another. I found the following T-SQL syntax to be very helpfull. UPDATE DST SET DST.Title = SRC.Title, DST.ContractNumber = SRC.ContractNumber, DST.ContractDescription = SRC.ContractDescription FROM Contracts AS DST INNER JOIN [SERVERNAME].[DBNAME].DBO.Contracts AS SRC ON […]