RustProof Labs: blogging for education (logo)
My book Mastering PostGIS and OpenStreetMap is available!

Using SYSTEM_USER to Filter Data

By Ryan Lambert -- Published December 09, 2013

In this post I want to show a cool trick I discovered recently that has made my life much easier. I build a lot of database systems with SQL server holding the data and a variety of technologies used for the front-end interface, mainly MS Access (unfortunately!). Sometimes I have a need to filter the data based on who is viewing it, and using SYSTEM_USER has made this much easier with just a little bit of prep work. The system I'm building right now will be used to distribute surveys to our call centers so their employees can call the appropriate people with this survey.

Before getting into the details, let's see what SYSTEM_USER actually does:

SQL SYSTEM_USER() Example

The above screenshot shows the domain (one of my development VMs) followed by a slash ( \ ) and the username I log in with. Because we use Windows Authentication with Active Directory, I assume this is fairly hard to bypass but I do not know that for certain. Regardless, it's much more secure than putting the similar code inside VBA in Access where anyone with a clue can fiddle with it. Alright... now to the real work...

Continue Reading

Long Road - My Site Backup Process

By Ryan Lambert -- Published December 03, 2013

Warning: This post is outdated. It is here for reference purposes only.

This post is part of the series Long Road to the Right Solution and gives an overview of how I have setup our backup collection process for all client sites.

Continue Reading

Distractions At Work

By Ryan Lambert -- Published December 02, 2013

At 3:00 PM today I finally started my music and put on my headphones. That is not normal for me, but was a casualty of the office environment today.

Continue Reading

Long Road - Setup Your Dev VM (Part 3)

By Ryan Lambert -- Published November 26, 2013

Warning: This post is outdated. It is here for reference purposes only.

This post is the third post that gives a quick crash course to setting up a development Linux virtual machine. Please read the first and second parts if you haven't already if you like. If you're just looking for what I install on the machine once it's up and running, then this is the place for you! If you don't want to go through a whole bunch of command line commands, this probably is n't the post for you.

Continue Reading

Long Road - Setup Your Dev Virtual Machine (Part 2)

By Ryan Lambert -- Published November 23, 2013

Warning: This post is outdated. It is here for reference purposes only.

This is the third of many posts about developing BCS Group's automated backup and restore system. This post builds off the previous post by going over how to setup the network adapters in a different way, how to setup your user to take advantage of sudo, and setting up a password-less connection via SSH.

Continue Reading

<-- Older Posts          Newer Posts -->