SQL 2016 is right around the corner and one of the new security enhancements promised is Row-Level security for tables. It’s a great new feature and pretty easy to implement. I have created a simple demo that gives various users access to data based on specific clearance level to the data. Feel free to modify the code and play around with it how to see fit. There are many different ways to setup Row-Level security and this is just one scenario. One of the things you’ll notice if you go through the scripts below is that the dbo user does not have access to the data after the the security policy is applied. This is key for many environments where customers do not want administrators to have access to sensitive data. Of course anyone with good coding skills and the proper permissions could circumvent that, but that’s why we put auditing measures in place 🙂
I’ve broken up the code into three sections. The first is for setting up the database and permissions. The second section creates the tables in the database and puts test data in them. The third section is for the creation of the function and security policy which enables Row-Level Security. After creating the function and security policy, go back to the second section and re-run the select statements to see the security policy in action. This demo was created on SQL 2016 CTP 2.2. If you are interested in learning more about Row-Level Security and to see some other demos please refer to this webinar from PASS.
Read the rest of this entry »
Like this:
Like Loading...
Tags: database administration, SQL Server 2016, SQL Server Security, sqlserverpedia
Less than a week left and I’m extremely excited about SQL Saturday in Philly on June 7th, 2014 and the Precon the day before (I signed up for Allan Hirt’s). I lived in Philadelphia for about 10 years during which I went to college, had my first two full-time jobs, and my first to kids were born in that area. This SQL Saturday is going to be a blast from the past for me. The actual event takes place in Malvern PA which is off of 202 in the Northwestern Region of the Philadelphia suburbs. It is part of the “mainline” and close to Valley Forge, King of Prussia and other historic/tourist attractions. I used to work in the Mainline area for Johnson Matthey in Wayne (and part time in Malvern) so I’m very excited about taking this trip back to visit friends and family.
For those of you that don’t know about SQL Saturday it is a fantastic event. Here are some of the reasons I’ve encouraged people to attend SQL Saturday events:
Read the rest of this entry »
Like this:
Like Loading...
Tags: database administration, database development, sql server, SQL Server 2012, SQL Server BI, sqlserverpedia
People are always concerned about Security when it comes to their data. I don’t blame them, I love keeping my job and I love to protect the sensitive data we store. You also don’t want someone with little SQL skills going in and running huge queries that bring the server to a screeching halt. In all honesty though, security has a HUGE aspect that is outside the realm of anyone’s technical expertise, it’s the “social factor” of security that is tricky.
Read the rest of this entry »
Like this:
Like Loading...
Tags: SQL Server Security, sqlserverpedia
Ever wanted to know the reason behind the Database color scheme in SQL Server Management Studio?
I have always wondered why all the Databases in management studio were Yellow (Online), Grey (Read-Only), Lighter Yellow with text next to it (something like Restoring), or Yellow with a Red Icon (Offline). Have you ever wondered why there aren’t any more useful colors like Red for when a Transaction Log is Full or Purple when your Statistics are Outdated. I have a theory on this that I have entitled “The Theory that you have to actually work to call yourself a DBA.”

Read the rest of this entry »
Like this:
Like Loading...
Tags: database administration, database files, sql, sql performance, sql server, SQL Server 2012, SQL Server Security, sqlserverpedia, t-sql
For the past couple of months I have been working with Ben Weiss a Digital Marketing Strategist at Infusive Solutions (http://www.infusivesolutions.com/). Our partnership was based on a mutual understanding that there is much needed career growth and guidance among IT Professionals. Since my background is primarily with Database Management Systems I have been helping him with writing articles, guides, and even interview questions for top professionals in the field, all for the purpose of furthering the careers of IT professionals.
Our latest project is a Lessons Learned pamphlet based on several articles I wrote about a year ago after attending open heart surgery (as an observer, not a patient). Here is the link to the final product, I hope you enjoy and benefit from it.
Here is a link to a summary of the project
http://www.infusivesolutions.com/blog/bid/98928/3-Ways-Business-Observation-Catalyzes-SQL-Server-DBA-Job-Growth
Like this:
Like Loading...
Tags: backup, backup and recovery, database files, sql, sql clustering, sql performance, sql server, SQL Server Security, sqlserverpedia
Recently in the news an article circulated about a coordinated attack by a team of hackers known as Anonymous. Information about this incident is all over the internet here is one article with details RT News.
Part of that attack included deleting a database belonging to the Israeli Foreign Ministry. The details are not clear, but I wanted to write about what may have happened and how you can prevent it or recover from it in your own environment.
Read the rest of this entry »
Like this:
Like Loading...
Tags: backups, database files, recovery model, sql security, SQL Server Security, sqlserverpedia
Building upon the code in my previous post, I will be retrieving permissions information from remote servers that I have access to. This was a little more difficult to accomplish because security is different on different servers and I did not want to create Linked Servers with escalated permissions. Read only SQL users was an option, however there is no good way to make sure that these users will have read permissions on all current and future databases. It took a while to over come these challenges but I got it working; obviously since I have this blog post.
You can read Part 1 here if you haven’t yet.
Read the rest of this entry »
Like this:
Like Loading...
Tags: reporting services, sql server, SQL Server Security, sqlserverpedia, ssrs, t-sql
I was approached with a unique problem to solve; find out who has what permissions on my Database Servers. This is the first post in a three part series about finding all user permissions on your SQL Server instance. The next posts will build upon this and introduce a way to use the same queries to get permissions from remote servers. In the final post, I will create a report that will nicely display the results of all those queries making it easy to audit and fix security problems. The granularity I’m going for is mapping logins/users to their corresponding roles at the instance and database level.
Read the rest of this entry »
Like this:
Like Loading...
Tags: reporting services, sql security, sql server, SQL Server Security, sqlserverpedia, ssrs
The whole “7 Habits” title is so cliché so I decided to make it eight! Plus that will probably relieve me from any copyright violations as well. So anyway, these are the eight habits/skills of Highly effective Database Administrators in my humble opinion. Although I come from the Microsoft SQL Server world, I believe most of these traits or skills can be adapted cross-platform.
Feel free to add your feedback in the comments section, this is after all just my own opinion.
Read the rest of this entry »
Like this:
Like Loading...
Tags: sqlserverpedia
Every wonder who all your orphaned SQL Server users are on your server? Just run the script below and copy the results of the query into a new query window then execute them. Make sure you keep the spacing and the quotes as they are so that the Dynamic SQL generated is free of Syntax errors.
USE master
SELECT 'USE '+ name+ ' EXEC sp_change_users_login ''Report'' '
FROM sys.databases
WHERE name not in ('master','msdb','model','distribution','tempdb')
ORDER BY name
But wait a minute, I only know which orphaned users are on my server. I want to actually fix them! Ok, ok relax, I have the solution for that just keep reading.
Read the rest of this entry »
Like this:
Like Loading...
Tags: sp_change_users_login, sql, sql server, SQL Server Security, sqlserverpedia, t-sql
Professional Association for SQL Server Presentation
Topic: SQL Server Security Architecture Decomposed
Presenter: Ayman El-Ghazali
Abstract: Security can be difficult to understand when first approaching SQL Server due to the many layers. In this webinar we will take a top down look at SQL Server Security and then “peel” its layers one by one to understand how it works. This webinar will help those who wish to understand security layers and concepts better with in SQL Server. We will cover how to properly manage individual and group access to your SQL Instance, Databases, and many other securables. Please join us on this journey from your server’s network port all the way to your tables, stored procedures, and functions.
http://dba.sqlpass.org/MeetingArchive.aspx
June 27, 2012 – SQL Server Security Architecture Decomposed. Click here to start streaming.
Slides and Code for all Presentations can be found here
Like this:
Like Loading...
Tags: sql clustering, sql server, SQL Server 2012, SQL Server Security, sqlserverpedia, t-sql