I needed to run code I wrote for PHP 5 on a PHP 4 installation. Everything worked except the file_put_contents function. I scoured the web […]
Continue readingTerminate Connections to an SQL Database
Have you ever tried to restore a database to an SQL server with existing connections? Unless the connections are terminated, the database restore will fail […]
Continue readingList all Connections to an SQL Database
A simple, but useful command, this script will show all connections to an SQL server. Replace Database Name with the name of the database and […]
Continue readingSearch for Orphaned Users After a Database Restore
After a database has been restored, users may become orphaned, or disconnected, from the database. You will see an entry for the user in the […]
Continue readingQuery Table Sizes from a SQL Database
I pulled apart a few stored procedures and ended up with this code. Very nice way to query the row count and size for each […]
Continue readingFind string within files on a Linux Server
This is a very useful bit of code, used to search within files on a Linux server. Replace the . after find to search within […]
Continue readingRecursively count the number of files on a Linux server
Simple script to recursively count the number of files on a Linux server. ls -laR | wc -l How this works: ls (lists folder contents), […]
Continue readingVBScript and WMI to stop and restart a running service
Option Explicit Dim objWMIService, objItem, objService Dim colListOfServices, strComputer, strService, intSleep strComputer = “.” intSleep = 15000 WScript.Echo “Click OK to begin” ‘On Error Resume […]
Continue readingSimple MySQL Database Backup
Another simple backup script. This script builds on the rsync file backup to allow daily, monthly, and yearly incremental MySQL database backups. The backup will […]
Continue readingSimple rsync Backup
This is a simple rsync backup that creates daily, monthly, and yearly incremental backups. This type of script would allow for recovery of just about […]
Continue reading