Viewing encrypted data using Trace

Today morning I got an email from a customer to review some design recommendation. In the recommendation, another DBA claimed that encrypting the data by using EncryptByKey or EncryptByPassPhrase is not secured because we can trace the data and read it as plain text. This is not correct and if you have the patience to…

0

Select everything from every table in every database

[Caution: This is for testing only if you want to have a cached dataset, will have severe issues in production servers if you just executed it for trial]   We all know the undocumented (then it’s not supported) procedure that executes a code in every database which is sp_msforeachdb And its twin that executes against…

0

Inequality predicates do not trigger scans

I see sometimes there is an understanding that when using inequality operators in the where clause, this will make the query optimizer decide to do a table scan for the table or index and will not use seek operations. Sometimes this is called non-SARGable predicate. This blog post is to discuss this understanding, but if…

0

Lenovo W530 doesn’t duplicate screens as expected

I recently faced this problem with my new Lenovo W530. On Windows 8 when using win+P to duplicate my display on a projector for a demo, it doesn’t work. Only extended works. I found this blog post that describe the same problem and it has good solution for it. I used the solution 1. The…

0

New columns in exec_sessions DMV in SQL 2012

While reproducing the issue with DBCC OpenTran I wrote about earlier this week here I found a pleasant addition to the sys.dm_exec_sessions DMV. In SQL 2012 we have 3 new columns added Open_transaction_count: which shows the number of open transactions for the session whether or not these transactions are reading or writing. So an open…

0

When DBCC OpenTran doesn’t list all open transactions

Recently I was troubleshooting a customer problem on SQL 2000 instance when there was a hanging session that locking tens of sessions on the server. The customer was suspecting that there was an open transaction for days which causes this problem but when using DBCC OpenTran it doesn’t show any transaction. However when checking sysprocesses…

0