SQLServerCentral - www.sqlservercentral.com

A community of more than 1,600,000 database professionals and growing

Featured Contents

Featured Script

The Voice of the DBA

The Matrix

Do you want the red pill or the blue one?

Many of us know the famous scene in The Matrix where Neo decides if he will come out of his dream. We also see the exciting moments in the movie where he has various martial arts downloaded to his brain, and discovers he "knows kung fu" in a small fraction of time. Certainly he doesn't ever need to physically practice the art, but much of learning is comprehending and understanding a subject in our brains.

We aren't at the point of desiring a skill and purchasing a download. Yet. However there is research into using various types of stimulation to actually help improve learning and training. Using pilots and flight training, a complex and varied skill involving both physical coordination and mental understanding, the researchers think they can affect learning. Which is amazing.

This is barely scratching the surface of learning directly in the brain, but it is interesting to see people researching the topic. After all, this is an area that ought to be of great interest to those of us working in technology, where the acquisition of new skills is important. Few of us do it well, and any improvement that could dramatically improve our capabilities to adapt and grow as technology rapidly advances, would be welcome.

Unless it involves electrical shock potential. In that case, I'll stick with my slow read-and-practice method for learning new skills.

Steve Jones from SQLServerCentral.com

Join the debate, and respond to today's editorial on the forums


The Voice of the DBA Podcast

Listen to the MP3 Audio ( 2.2MB) podcast or subscribe to the feed at iTunes and LibSyn. feed

The Voice of the DBA podcast features music by Everyday Jones. No relation, but I stumbled on to them and really like the music.

Everyday Jones

Follow Steve Jones on Twitter to find links and database related items and announcements.

ADVERTISEMENT

SQL Server Source Control Basics
Free eBook

Continuous Integration

Automation

Branching and Merging

Choosing a VCS and Structure

Core Concepts

This free eBook also includes walkthroughs and code samples to pair with the concepts outlined.
Pick up your free copy.

Featured Contents

 

Enumerate Windows Group Members

Lowell Izaguirre from SQLServerCentral.com

Here a quick script showing how to get all the Active Directory users in a AD group. More »


 

Documenting SQL Server with PowerShell

Additional Articles from SimpleTalk

SQL Server instances are generally poorly-documented. How easily can you tell if something has changed? How easily can you check that there is adequate space for growth? Are you up-to-date with licenses? What errors are happening? Who has accessing the system? Before PowerShell, it was difficult to be on top of all this. Now you can, with the help of Sander's database documenter. More »


 

From the SQLServerCentral Blogs - Recompile Monitoring using XEvents

SteveHood79 from SQLServerCentral Blogs

Recompiles can be a hidden bottleneck on your server, and it may not be too obvious.  I should know, it... More »


 

From the SQLServerCentral Blogs - Query the status of SQL Agent jobs

matt.bowler from SQLServerCentral Blogs

I’ve been involved in building a solution on top of SQL Server peer to peer replication (SQL 2014 SP1) and... More »

Question of the Day

Today's Question (by Steve Jones):

I am working with Row Level Security and have a function that determines if a particular user should have access to rows in a table. My function looks like this:

 CREATE FUNCTION DBO.RLS_Customer_Check (@username AS sysname) RETURNS TABLE WITH SCHEMABINDING AS   RETURN SELECT 1 AS RLS_Customer_Check_Result      WHERE @username = USER_NAME() GO 

I have a table, CustomerAccessList, with a column for CustomerID and UserName. I add a filter predicate as follows:

 CREATE SECURITY POLICY rls_CustomerFilter ADD FILTER PREDICATE dbo.rls_customer_check(customerid) ON dbo.CustomerAccessList; GO 

Now the bsmith user wants to insert a row into the CustomerAccessList table for a new customer, with no rows in the table matching the customerID. The bsmith user has rights to insert/update the table.

Here is the insert statement that bsmith runs:

 INSERT dbo.CustomerAccessList ( CustomerID, username ) VALUES ( 5 -- CustomerID , 'bsmith' -- username ) 

What happens when they perform the insert with this FILTER PREDICATE?

Think you know the answer? Click here, and find out if you are right.


We keep track of your score to give you bragging rights against your peers.
This question is worth 1 point in this category: Security.

We'd love to give you credit for your own question and answer.
To submit a QOTD, simply log in to the Contribution Center.

ADVERTISEMENT

Expert T-SQL Window Functions in SQL Server

Expert T-SQL Window Functions in SQL Server takes you from any level of knowledge of windowing functions and turns you into an expert who can use these powerful functions to solve many T-SQL queries. Replace slow cursors and self-joins with queries that are easy to write and fantastically better performing, all through the magic of window functions. Get your copy from Amazon today.

Yesterday's Question of the Day

Yesterday's Question (by Steve Jones):

The SSIS Term Extraction Transformation can work with which languages?

Answer: English only

Explanation:

The Term Extraction Transformation  works with English only. It contains it's own dictionary.

Ref: Term Extraction Transformation - https://technet.microsoft.com/en-us/library/ms141809(v=sql.110).aspx


» Discuss this question and answer on the forums

Featured Script

Transaction Log VLF Alarm

Edward Pochinski from SQLServerCentral.com

This will send a alert email using native DB Mail when the VLF counts from any auto growth on transaction logs take place too much. Best practice is to have a auto growth set to a reasonable size growth like from 256-512mb a growth. We had to put his in place as a counter measue from an outage caused by too many VLF's and ther log reader agent had issues reading the transaction logs. One thing you need to do is create the table in a database that matches the references in the code for the insert and selects performed. This worked great and alerted until we foun the nice very large size this tran log needed to be for the maint taking place Sunday AM once fully completed. Create table code supplied at the bottom od the code. Hope you find this useful.

More »

Database Pros Who Need Your Help

Here's a few of the new posts today on the forums. To see more, visit the forums.

SQL Server 2014 : Administration - SQL Server 2014

Update Trigger - Keep Old value unchanged for a column - using UPDATED and DELETED temp tables, how can I override the new value and keep the old value for a...

How to Move MS SQL Cluster to Standalone - Hi We need to move MS SQL Cluster to Standalone SQL Server, what are the steps we need to follow & how...

Default constraints OR INSERT trigger for Audit columns (create date time/user) - Which is the best practice to implement in audit columns for create datetime and create user, INSERT trigger or default...

sp_send_dbmail - Error when passing @query parameter. - Hi All, When I send mail using "sp_send_dbmail" it works fine. But it fails when I set "@query" paramerter, fails with below...


SQL Server 2012 : SQL 2012 - General

Multiple DataFiles on SAN disks? - In the past, an i/o performance enhancing option was/is to split up your database into multiple datafiles and put each...

Is this possible - Here's what I'm trying to accomplish....I'm pulling week to date sales data (ex. if I were to run it tomorrow...

Replicas, indexes and different SQL versions - Hi all We're upgrading on of our servers from SQL2005 to SQL2012. On the 2005 box, we have mirroring set up to...

Dealing with large tables (Financial transactions) - Hi, We have in our production database a large table that is storing financial transactions, currently the table has about 90mlns...

Unable to start SQLAgent - MSDB is Read-Only - I am unable to start the SQLAgent service. It is reporting that MSDB is read-only. I have checked in SQL...


SQL Server 2012 : SQL Server 2012 - T-SQL

Copy image from one folder to another with sql server except duplicate image - Hello, I am planning to implement a script to copy image from one folder to another with sql server script. But...

Add two columns to make one total - okay guys, I am stuck. I have two columns that I need to add and make one total for a...

Getting the error "Maximum stored procedure, function, trigger, or view nesting level exceeded" - I have a SSRS report when generated, getting the error Server: Msg 217, Level 16, State 1, Line 1 Maximum stored procedure,...


SQL Server 2008 : SQL Server 2008 - General

How do I add a text qualifier to a bcp command - I need to export the results of a stored procedure in a pipe delimited, text qualified .txt file. I have...

Memory recommendation - I was told that the memory needs to be atleast 30% of the largest database size. Is there a document...

subtracting a case statement result from a Convert(char(8) result - Hello, I am struggling to get a case statement result to be subtracted from another result in the same format.I want...

logical and physical file names of all databases - Is there a query or sp that I can pull all databases on the server along with their logical file...


SQL Server 2008 : T-SQL (SS2K8)

0 is equal to zero length string. Can someone explain how this can be? - --I know this has to do with an implicit conversion of the varchar to int, --but why does the zero...


SQL Server 2008 : SQL Server Newbies

How many IP address include in 2 node active -passive cluster - Hi, How many IP address include in 2 node active -passive cluster ..... i answered Five ........2 for private network 2 for...


Data Warehousing : Integration Services

SSIS package creation with txt file having multiple select statements - Hi, I have a TXT File with 20 Select statements. Requirement is Execute each Select statement and Email the output in CSV...


SQL Server 2005 : T-SQL (SS2K5)

Previous week date range - Right, this is prooving to be a right headache, as many date related things in SQL seem to be for...

This email has been sent to newsletter@newslettercollector.com. To be removed from this list, please click here.
If you have any problems leaving the list, please contact the webmaster@sqlservercentral.com.
This newsletter was sent to you because you signed up at SQLServerCentral.com.
Feel free to forward this to any colleagues that you think might be interested.
If you have received this email from a colleague, you can register to receive it here.
This transmission is ©2015 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
Contact: webmaster@sqlservercentral.com