Grant a MS SQL login Read Only access to ALL databases

 Here is a SQL code snippet I used today that loops through all the databases on a server and creates a SQL script that will give a user Read Only access to all databases (including system databases).

  Read the rest of this post »

Posted on June 3, 2013 at 20:16 by simon · Permalink · Leave a comment
In: SQL

Using DD-WRT on an Asus RT-N16 router to share a 3 MIFI Internet connection on LAN

Yes a snappy title!  I’ve spent so long getting this configuration to work that I have to save the info here for my own future reference.Three MiFi  I originally tried to use the latest firmwares and spent a couple of frustrating day’s trying to get it working.  I eventually gave up and tried the specifically mentioned firmware below and it worked as expected.

DD-WRT is an open source firmware that can be installed on many different routers.  It opens a whole world of possibilities and configuration options, turning a mediocre router in to something that could cost a lot more.

ASUS RT-N16 is a wireless router that is considered particularly good to use with DD-WRT, mainly because it has masses of internal memory which allows you to install the biggest versions of DD-WRT which gives you all the bells and whistles such as OpenVPN, USB support, Hotspot etc.

MIFI is a small portable Internet connected Access Point that connects via 3G/4G.  Mine is provided by the 3 network and I can get better speeds using the MIFI than i can from my home ADSL connection.  I use the MIFI as a backup internet connection or for when I’m away from home.  I wanted a way to share that MIFI connection with my home wired LAN, and DD-WRT is the way to do it.

Read the rest of this post »

Posted on April 13, 2013 at 1:42 by simon · Permalink · 4 Comments
In: Hardware

How to clear down winsxs folder in Windows 7

MS-DOS2If you have found that you have a folder called winsxs that is eating up gigs and gigs of your C drive, then this command line can free up several of those valuable gigs.

 

 

Read the rest of this post »

Posted on April 11, 2013 at 0:40 by simon · Permalink · One Comment
In: Windows · Tagged with: ,

Simple script to backup all databases at once

Script to backup all non system databases

To backup all your MS SQL databases quickly on a SQL instance use the following script in a new query window.

You must change the “SET @path” string to a suitable location. Read the rest of this post »

Posted on March 21, 2013 at 20:00 by simon · Permalink · Leave a comment
In: SQL · Tagged with: , , ,

Mount SMB shares in Ubuntu

ubuntuHere is a quick guide on how to install CIFS and use it to mount SMB shares (aka Windows shares) in Ubuntu.  This is tested on Ubuntu 12.04 but should work on most recent versions as well as other Debian releases. Read the rest of this post »

Posted on March 20, 2013 at 23:05 by simon · Permalink · One Comment
In: Linux · Tagged with: , , , , , ,

Which is faster iSCSI or NFS when used as an ESXi datastore

esx

I have a QNAP NAS (which is an excellent bit kit by the way), and I have 2 servers running ESXi 4 and 5 respectively.  I had some free time tonight so finally got around to setting up both an NFS and an iSCSI datastore on the NAS.  I was curious as to which would be the fastest so here are my very unscientific results. Read the rest of this post »

Posted on January 11, 2013 at 0:45 by simon · Permalink · Leave a comment
In: Linux, Vmware

Change Ubuntu keyboard layout

vector-icons-realvista-flagsTo change the layout of the keyboard in ubuntu 12.04 use the following command:

sudo dpkg-reconfigure keyboard-configuration
Posted on January 6, 2013 at 13:06 by simon · Permalink · Leave a comment
In: Linux

Change Ubuntu Time or Timezone

ubuntuIt took me a while to figure out how to change the timezone in Ubuntu 12.04.  it wasn’t at all intuituve, so to save you the bother here are the commands you’ll need:

 

Read the rest of this post »

Posted on January 6, 2013 at 13:04 by simon · Permalink · Leave a comment
In: Linux

Setting SQL Server to accept date in DD/MM/YYYY format

I’ve been working on a web based database project for the wifes business and during development I realised that half of the dates where being saved in M-D-Y format.

As I live in the UK we use the correct date format which is D-M-Y obviously ;).

The problem turned out to be a single settings on the SQL server:

Read the rest of this post »

Posted on December 3, 2012 at 23:22 by simon · Permalink · One Comment
In: ASP.NET, SQL, Tech · Tagged with: , , ,

Query AD group membership with Powershell

Here are a couple of very useful scriptlets if you ever need to enumerate or count the quantity of users in an AD group.

Read the rest of this post »

Posted on October 25, 2012 at 14:47 by simon · Permalink · Leave a comment
In: AD, Power Shell