Tag Archives: Database

Automating MySql Scripts

So I needed to run a mysql script on a daily basis to do some maintenance on a database. Pretty straight forward davessql.sql:

davesbatch.bat

Then a scheduled task to call the batch file, job done.

web.config Connection String Monitoring with PRTG Network Monitor

I use PRTG Network monitor to check all our websites, and I generally just check the homepage for certain words to make sure it’s loaded ok. I also have checks on the SQL Server to make sure the service is …

Read more »

Modifying SQL Server Memory Usage

This can either be done from the GUI (right click on server, properties, memory) or via the following commands: Advanced Mode: EXEC sp_configure ‘show advanced options’, 1 Limit to 2GB EXEC sp_configure ‘max server memory (MB)’, 1024 Make the change …

Read more »

SQL Backup and Restore Commands

Some useful code snippets for backing up and restoring data in MS SQL. Create full backup: (also output times for reference) select {fn Now()}  as ‘Start Time’ BACKUP DATABASE DBNAME TO DISK = ‘d:\DBNAME.bak’ WITH INIT select {fn Now()}  as …

Read more »

Backing up mySQL Databases Batch File / Script

And another, this time to backup the databases, based on an earlier post or creating simple backups, I can then call this batch from within another batch file. @echo off IF %1.==. GOTO No1 ECHO Dave’s mySQL Database Backup UtilityECHO …

Read more »

mySQL Restore Batch File / Script

I got bored typing mysql commands so wrote a little script to keep on my box for easy access to restore databases from .sql files. It’s very simple and may not be any use to anyone. It also stores the …

Read more »

OSTicket Database Errors (Polish Characters)

I’ve had a few emails from OSTicket recently, telling me that there was a DB error, specifically: Incorrect string value: ‘xC2x0AThan…’ for column ‘message’ at row 1 The email had originated from a Yahoo address and so my initial thought …

Read more »

.jira-home.lock not removed when restarting Windows

Following a machine reboot the other day, my copy of Atlassian JIRA stopped working with a startup error that the lock file was still in place. I have had this happen before and so to make sure it doesn’t happen …

Read more »

Speeding up MySQL Databases by setting the Query Cache Size

I use MySQL in a Windows Server 2008 R2 box and it runs very well, I never have any issues with it and currently there are about 18 databases on there. However, it now has a fair bit of data …

Read more »