In this issue

Featured Contents

Editorial

Featured Script

 
 advertisement
 
SQL Monitor Understand Locking, Blocking & Row Versioning
Read Kalen Delaney's eBook to understand SQL Server concurrency, and use SQL Monitor to pinpoint excessive blocking and deadlocking. Download free resources.
 
SQL Prompt Make working with SQL a breeze
SQL Prompt 5.3 is the effortless way to write, edit, and explore SQL. It's packed with features such as code completion, script summaries, and SQL reformatting, that make working with SQL a breeze. Try it now.
 
SQL Backup Pro Disaster Recovery is made quick and easy with SQL Backup Pro
Use SQL Backup Pro's restore wizards and scripts to get your database back online as quickly as possible following a disaster scenario. Download a free trial today.

In This Issue

Free Tools for the DBA: PAL Tool

The Performance Analysis of Logs tool is a general tool for collecting and analysing log data. With the addition of a template, it becomes an effective way of analysing data from performance counters for SQL Server, in order to diagnose performance problems and capture baseline information. More »


Automatically Generate Stored Procedures

This article will show you how to automatically generate insert, update, and delete procedures for tables in your database More »


Editorial - The Year 2013

Today is the first day of a new calendar year. I'm hoping most of you have the day off, and I certainly do, but I wanted to ring in the new year with a look forward. What will happen in 2013? I think it's incredibly hard to predict, but I'll take a chance and make a few predictions.

Mobile devices will continue to grow in popularity. No great surprise there for many of you, but I think that we will see more smartphones sold than regular phones in 2013. With a large market of used devices and the constant push of new devices, new form factors and sizes, I truly think that we will be in a very data centric world most for most of the time in 2013. Between tablets and laptops sporting cellular connections and pocket sized smartphones, most of us (including non-technical people) will have some type of data consumption device in our lives.

What does this mean for data professionals? I don't think it matters which platform sells the most phones because all of them will be looking for more data-drive applications. Whether these are apps, HTML5 websites, or something new, all of us that manage data will have to deal with more and more mobile delivery of information in 2013. That means security, especially XSS and injection attacks, will be more of a concern. Good backups, warm copies of data in the event of vandalism, and comprehensive auditing will be something we need to focus on implementing.

I think we'll continue to see more and more BYOD at work, though with the nature of security being what it is and constant data loss, there will be a push to work through more virtual interfaces like RDP. It won't succeed and we'll have more data breeches in 2013, including some big ones as Verizon as predicted. Encryption will become a bigger battle in 2013, with more companies asking for personal devices to implement encryption. I'm not hopeful that this will become the norm

Lastly, I'll predict that we see a change for SQL Server. I think that some of our instances will move away from SAN storage pools and move to dedicated SANs or perhaps back to local storage. We will get more SSD storage implemented in new system, perhaps the standard becoming 2-4 SSDs for new hardware. I think flash is here to stay, at least until high speed optical storage becomes economical.

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


The Voice of the DBA Podcasts

We publish three versions of the podcast each day for you to enjoy.

Everyday Jones

The podcast feeds are available at sqlservercentral.mevio.com. Comments are definitely appreciated and wanted, and you can get feeds from there. Overall RSS Feed: or now on iTunes!

Today's podcast features music by Everyday Jones. No relation, but I stumbled on to them and really like the music. Support this great duo at www.everydayjones.com.

You can also follow Steve Jones on Twitter:

» To submit an article, rant or editorial, log in to the Contribution Center


Question of the Day

Today's Question:

Which code below will return the date of New Year's Eve if run every day in January?

-- select 1
SELECT dateadd(day,-(datepart(day,dateadd(mm,1,GETDATE()))),dateadd(mm,-1,GETDATE())
-- select 2
SELECT dateadd(day,-(datepart(day,dateadd(mm,1,GETDATE())),GETDATE())
-- select 3
SELECT dateadd(day,-(datepart(day,dateadd(mm,1,GETDATE()))),dateadd(mm,1,GETDATE())

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

This question is worth 7 points in this category: humor. We keep track of your score to give you bragging rights against your peers.

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

SQL Server 2012 Query Performance Tuning

SQL Server 2012 Query Performance Tuning leads you through understanding the causes of poor performance, how to identify them, and how to fix them. You’ll learn to be proactive in establishing performance baselines using tools like Performance Monitor and Extended Events. You’ll learn to recognize bottlenecks and defuse them before the phone rings. You’ll learn some quick solutions too, but emphasis is on designing for performance and getting it right, and upon heading off trouble before it occurs. Delight your users. Silence that ringing phone. Put the principles and lessons from SQL Server 2012 Query Performance Tuning into practice today.

Get your copy from Amazon today.


Yesterday's Question of the Day

In SQL Server hardware configurations, what does the 'R' in RAID stand for?

Answer: Redundant

Explanation: The 'R' stands for Redundant, as in 'Redundant Array of Independant Disks'.

Ref: http://en.wikipedia.org/wiki/RAID

» Discuss this question and answer on the forums

SQL Server 2012 Query Performance Tuning

SQL Server 2012 Query Performance Tuning leads you through understanding the causes of poor performance, how to identify them, and how to fix them. You’ll learn to be proactive in establishing performance baselines using tools like Performance Monitor and Extended Events. You’ll learn to recognize bottlenecks and defuse them before the phone rings. You’ll learn some quick solutions too, but emphasis is on designing for performance and getting it right, and upon heading off trouble before it occurs. Delight your users. Silence that ringing phone. Put the principles and lessons from SQL Server 2012 Query Performance Tuning into practice today.

Get your copy from Amazon today.


Featured Script

Generate Drop / Create Script for views, stored Procedures

This Script generates drop and create scripts for views or stored procedures. 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 2005 : Administering

Question about server alias - We currently have two production servers at my company, let's call them DB1 and DB2, each with a handful of...

sprocs executed but rolled back? is there any log? - if a sproc started executing and then the transaction was killed, is there a way to check which sproc it...

SQL Server 2005 : Business Intelligence

SSIS Transfer data ON INSERT - I have 2 SQL servers: SQL_Local and SQL_Remote. I have SSIS on SQL_Local. I want to transfer records from SQL_Remote.Customers...

Data update from one database to another database (Insert and Update both) - Hi, I have 2 database tables. 1) From Production 2) From Dev. The task is to move the data from Production to Dev Server....

rsInvalidReportDefinition error when trying to deploy AdventureWorks sample reports - Hi, I have been trying to deploy the AdventureWorks report samples through BIDS, but I am getting the following error: [rsInvalidReportDefinition] The...

SQL Server 2005 : SQL Server 2005 Performance Tuning

Turn off auto-stats at table level in 2005? - Hi Folks, Is it possible to turn off automatic stats gathering at the table-level in SQL 2005? I want to turn...

SQL Server 2005 : T-SQL (SS2K5)

find item that does not have a specific entry - Ok here is a sql I run that tells me all my machines that have java installed. [code="sql"]SELECT DISTINCT i.guid, i.name ...

data for Min/Max rows - Hi All, Please can someone tell me how to select min/max rows in a single query similar to the one below. [code] Select...

DB connection error issue while running a batch job from the APPLICATION Server. - Hi All, I have an DB connection error issue while running a batch job from the APPLICATION Server. I have 3 servers....

sp_send_dbmail is not giving proper formate in txt attachement of SQL query output - Hi , I have following code to execute. i want to have functionality to send email for the following query output...

Reg: SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED - Hi, I am new to this DB Development. Please advice, why we need this "SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;" while creating...

SQL Server 2005 : SQL Server Newbies

Birthdays in next 7 days - Hi, I need to display all the employees whose date of birth comes in the next 7 days. I have tried...

SQL Server 7,2000 : Backups

Transaction log back and point in time recovery - SQL Server 2000 - Full database back up at 9:00pm; transaction log backup at 12:00pm. Internal database, therefore, database use normally...

SQL Server 2008 : SQL Server 2008 - General

SQL Newbie with some (hopefully) simple SSIS questions. - Greetings. I hope someone can point me in the right direction as I'm new to SQL in general and SSIS...

How can I delete records base on the value of a fieled in the 1st recor? - I generate a small table with a SELECT INTO from a larger table. One of the fields in the new...

Error: semaphore timeout period - Hi, I am seeing this emergency error in spotlight history. Users also reporting about data connection errors. Is it releated...

SQL Server 2008 - profiler settings - I am collecting queries using sql profiler which are taking more than 10 seconds using column filters. I also want...

Pivot Query - I just don't get it :w00t: Here's some sample data:- [code="sql"] create table SalesFigures (Id int, SalesMan varchar(20), Product varchar(20), NbrSales int, SalesValue money) insert...

FULL DB backup job - Hi, Full backup job is failing with below error in our production. this is a LITESPEED full backup for Sys and User...

Diasbling index on replicated table - Hi There I have a table which is being replicated from Live server. To performance tune on procedure, I created an...

Export wizard failed? - Hi, pl. suggestion me, what could be on issues during export to another new database by export wizard? how to resolve...

Simple SQL Query - I have the following table in my database: dataName graph yesNo data1 pie 1 data1 pie 1 data1 bar 0 data1 line 1 Using this...

Record locking - Question1: How can a user, say User1, be able to lock a row, say Row1, and any dependent rows, say...

Upgrading to 2012? - Is it worth upgrading from SQL Server 2008 R2 Developer to 2012 Developer? I believe most companies are still using SQL...

Database restore issue - Hi, I am facing an error while restoring adventure works database to my sql server 2008. TITLE: Microsoft SQL Server Management...

Run A query on Multiple servers using CMS - Hi , I want to run a query on Multiple servers i am using CMS to run it on multiple on...

Query Execution Plan - Hi, I have to improve the performance of some stored procedure as they take long time to execute. I checked the cost...

New in this world.. no experience and no knowledge - Hi guys :) my name is Fabrizio and i'm from italy :) i work in a IT company here in italy, and...

How to find column is having value or not - Hi, How to find column is having value or not Id Col_1 Col_2 Col_3 Col_4 Col_5 Col_6 1 1 NULL 2 NULL 3...

SSIS loading only 5 of 42 fields to SQL - Greetings all. I am learning SSIS and having great fun with Sequence Containers, Control flows and Data flows. I believe I...

Keeping all three environment(Dev,Stag,Prod) in sync - In our office we run jobs to keep these environment in sync. We get data from outside source and run...

TLOG GROWING VERY LARGE - Hi, I have implemented mirroring (high safety without automatic failover) and replication (snapshot replication) simaltaneously on the same database. But my...

How to install an oracle linked server on SQL Server 2008 r2 failover cluster manager - How to install an oracle linked server on SQL Server 2008 r2 failover cluster manager I'm reading some articles and applying...

Sharepoint and SQL Server 2008 - Hi all - I'm trying to find out if I can take an existing installation of Sharepoint Services 3.0 and move...

SQL Server 2008 : T-SQL (SS2K8)

Sentiment Analysis - I want to do sentiment analysis, I need to know how I can achieve this using SQL Server?

is it possible to change an instance server properties with T-SQL ? - hi can i change the properties of a server instance with T-SQL ...like Enabling mixed mode or change the name of...

Dynamic IN clause - Can anyone point out what is wrong with following query declare @Territory varchar(max) set @Territory = 'Domestic' SELECT * FROM Account WHERE PrimaryCountry IN (CASE WHEN...

How to Update Columns of a Table with two instance in one update Statement. - I have two tables Table1 and Table2 with ID in both tables. I want to update records of First table...

CTE with multiple tables - I've seen lots of examples of CTE's on line using a single table.......my situation I need to recurse thru 2...

Need To Generate XML File - Hi, I Have Table Data For The Following Stucture.. [code="sql"]CREATE TABLE [dbo].[xmldata]( [FirstName] [varchar](110) NULL, [LastName] [varchar](210) NULL, [Email] [varchar](110) NULL, [Phone] [varchar](110) NULL, [Position] [varchar](110) NULL, [Branch]...

TSQL and percentile (not percentilerank :) - Hi all, I would like to ask for some help and maybe the best practices on calculating the 90th percentile using...

how to fetch records from multiple tables - i have Demo,elections and electionshist tables where i should neglect the pepole who have status='t' from demo table and for...

i want to add column in exiting view - Hi i am trying to use design mode. but it is throwing error . is there other wayt to add column in...

SELECT * INTO Table without propagating IDENTITY attribute? - Using the simplest SELECT INTO syntax, the IDENTITY property of a column is part of the definition of the destination...

Updating an Entire Column in a 10 GB table - Hi Folks, I have a very big table with size around 10 GB(Data+NC Indexes). There is a need to update an...

How To Generate XML File....From the Table... - Hi, I Successfully Imported the Following XML File ... Again I Want to Export (Generate) the Same XML File Format... Using The Output...

sp_OAGetProperty @obj, 'responseText', @response OUT cannot handle large output - Hi All, This is quite weird, so thought you can have some ideas, please: I use HTTP POST to send and XML...

SQL Server 2008 : SQL Server Newbies

Database Monitoring tool - Hi, Do anyone knows what is the best tool for database monitoring. Basically I need to monitor more than 50 database...

Taking a vertical list and transposing it to horizontal and then grouping - Hello, Is this possible? I have several columns, such as: Coulmn A red green yellow black Column B shirt jumper blouse coat Column C for women for men for girls extra large I have permutated the columns in...

Creating a trigger - I have the following to create a trigger. But get this error message: Msg 207, Level 16, State 1, Procedure triggername,...

Permutations of Columns in a Table - Hello, I have several columns, such as: Coulmn A red green yellow black blue green pink Column B shirt jumper blouse coat t-shirt skirt Column C for women for men for girls extra large for boys one size fits all I need to...

Create Table and Bulk Insert - Hi guys, I have a .csv file wich has the following information (exactly like this): List Name: User Format Version:1.2.5.0 Date:12/11/2012 12:00:34...

SQL Server 2008 : Security (SS2K8)

editting data in an encrypted column - Hi all, I'm attempting (unsuccessfully) to reset a password, the issue is that the column with the passwords in is...

SQL Server 2008 : SQL Server 2008 High Availability

Log Shipping exe location - Hi All Environment: 2 Node Cluster, Win2008 Ent, SQL 2008 Sp3 Ent Log Shipping was always working fine, even after failover between...

SQL Server 2008 : SQL Server 2008 Administration

(SQL2005) SQLAgentReaderRole-->SQL2008? - Vendor documentation (for SQL 2005) says: "assign the system administrator permission to each of the following roles: SQLAgentUserRole, SQLAgentReaderRole, and SQLAgentOperatorRole". What are...

Creating Roles in SQL Server - Hi, I am new in Administration group. I read over internet that user that are created using windows auhentication have all...

sql sever 2005 logshipping - i got below issue in the SQL Server 2005 log shipping Log Shipping Backup job has failing since 1 week with...

Fragmentation size - Dear Friends 1-1-How to know the fragmentation size for whole database not only for certain table, to decide if it exexceeds...

Log File Size Issue - Hi, One my DB Log File Grown to large and now user were getting "transaction Log Full" error. When i checked server...

Career : Certification

Querying Microsoft SQL Server 2012 Training Kit (Exam 70-461) publishing delay - I've been waiting patiently for this training kit coming out for months now, expectantly waiting for it's arrival end of...

70-461 - Hi, Id like to take this exam and looking for some good prep.. My T-SQL skills are basic at present...

SQLServerCentral.com : Anything that is NOT about SQL!

Are the posted questions getting worse? - Is it me, or are the posted questions getting worse these days? I just read a post by someone apparently in...

SQLServerCentral.com : Editorials

How to do data quality ( name, address, account, data , matching/reconciliation) using SQL server 2008 - Dear Experts, Happy new year to all of you!!!! 1) Could you please provide some info on how to do data quality...

SQLServerCentral.com : Suggestions

Can we have Android & IOS mobile App please - Hi All, Can some one please take an initiative to build mobile app for this site. and include forum discussion & QotD...

Reporting Services : Reporting Services

SSRS functionality - Hi all, I'm new to reporting services and i would like to see if the following objective can be accomplished...

Reporting Services : Reporting Services 2005 Development

What is the best way to create a SSRS 2005 Line Chart Report for a 12 month period? - I'm looking for advice on how to create a SQL Server 2005 query and line chart report for SSRS 2005. ...

Data Warehousing : Integration Services

SQL 2008 SSIS package Conversion error - Hi I have a package loading data from a flat file to a table. At about 90,000 rows one of the...

ssis 2012 package - I have successfully deployed my first package to sql 2012. The package runs fine in visual studio but when deployed...