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

Citizen Scientists

The tremendous growth of computing power, especially in the form of mobile devices, means that more and more people can analyze data themselves, or have applications do it locally, reducing the need for large central systems to perform all the calculations. Indeed some of the value from Hadoop and other cluster computing systems comes from using lots of small, relatively powerful systems to do more work than one single computer could.

However we can not only analyze, but also gather data. There is a rise in the citizen scientist, in which individuals can help scientists by gathering data and sharing it with others. This can reduce the costs of gathering data, but more importantly, gather much more, and varied, data than might otherwise be possible. There are a number of projects available if you're an amateur scientist that wants to join in.

Most of us are data professionals and might be interested in working with more data. Perhaps we want a set for demo purposes, or perhaps we want to work on a project that interests us and could use our technical talents. Many of the projects out there make their data available, and you should consider using such a set if it strikes your fancy.

More importantly, I would hope that more people would analyze the raw data and look to verify, or dispute, the conclusions of the project owners. As data professionals, we can help people learn how they can analyze and manipulate data better with the tools we have available.  With more transparency, we can have healthier debates on the causes, the effects, and even the potential future implications of how to build a better world in the future.

Steve Jones from SQLServerCentral.com

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

Video and Audio versions

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.

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

Steve Jones

Windows Media Video ( 17.5MB) feed

MP4 iPod Video ( 20.3MB) feed

MP3 Audio (4.2MB) feed

Feeds are available at iTunes and Mevio

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

SQL DBA Bundle

‘10 Tips for Efficient Disaster Recovery’

Learn Steve Jones’ disaster recovery lessons, and be better prepared for future disasters, big or small. Read now.

Deployment Manager

A simpler way to deploy

Red Gate’s Deployment Manager can deploy your .NET apps, services, and databases in a single, repeatable process. Get started now.

SQL Backup Pro

Want faster, smaller backups you can rely on?

Use SQL Backup Pro for up to 95% compression, faster file transfer and integrated DBCC CHECKDB. Download a free trial now.

Featured Contents


SQL Server Cloud Migration Part I

Edward Polley from SQLServerCentral.com

A SQL Server migration with minimal business impact while synchronizing schema and data. More »


The PoSh DBA – Getting to know PowerShell

Additional Articles from SimpleTalk

Although it was primarily designed for System Administrators, PowerShell is now extending its use to Database, SharePoint, Exchange and all Microsoft products. In this article Laerte Junior offers an introduction to PowerShell and describes how DBAs can use PowerShell to automate repetitive tasks. He also explains when to use PowerShell instead of, or in addition to, T-SQL and SSIS. More »


From the SQLServerCentral Blogs - sp_SrvPermissions V2.0

Kenneth Fisher from SQLServerCentral.com

Last month I posted my stored procedures sp_SrvPermissions and sp_DBPermissions. I’m posting V2.0 of each with a few fixes. The... More »


From the SQLServerCentral Blogs - sp_DBPermissions V2.0

Kenneth Fisher from SQLServerCentral.com

Last month I posted my stored procedures sp_SrvPermissions and sp_DBPermissions. I’m posting V2.0 of each with a few fixes. The... More »

Question of the Day

Today's Question (by Raul Gonzalez):

Is it a good idea to disable the [guest] database user in the [msdb] database?

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: Guest User.

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


SQL Queries 2012 Joes 2 Pros® Volume 4: Query Programming Objects for SQL Server 2012

The SQL developer needs to be able to create processes for the working database by using one of the many programming objects (like functions, stored procedures, constrains, or triggers). By creating objects that talk with SQL you simply the way other programs (like applications or web pages) can interconnect. These eternal programs only need to call on the names of your programming objects by name rather than needing to submit large pieces of advance code. With SQL Queries 2012 Joes 2 Pros® Volume 4, you learn how programming objects work in SQL Server. For those of you who have read the 2008 series for the 70-433 Exam you will find a lot of the same material from the SQL 2008 book in this SQL 2012 book. This is because much of the 70-461 test covers the same material as the 70-433. I have added material that is new to the test and removed material that is no longer relevant. If you have already read this series or have already passed the 70-433 exam you may choose to read my book which covers only the changes from 70-433 to 70-461 entitled "Joes 2 Pros SQL 2012 Queries 70-461 Exam for SQL 2008 Pros".

Get your copy from Amazon today.

Yesterday's Question of the Day

Yesterday's Question (by sqlnaive):

What will be the output of the last Select statement:

SELECT COALESCE(Col1, Col2) AS 'FirstNotNull' FROM dbo.T_TEST

Note: Code is tested in SQL 2008 version.

Answer: 5000.50, 100.00, 6666.25

Explanation: Coalesce returns the data type of expression with the highest data type precedence. In this case decimal datatype has higher precedence over int datatype, so the int value from col2 will be returned as decimal (100 as 100.00).

Ref: COALESCE - http://msdn.microsoft.com/en-us/library/ms190349(v=sql.105).aspx

» Discuss this question and answer on the forums

Featured Script

Get all the Child Tables up to N level

Thava from SQLServerCentral.com

Get all the dependent tables for a master table  up to N level(Till the leaf ) you can either find dependency or you can find all the child tables.
To find the  Complete Relation
SELECT TableRelation
FROM   cte
Order by TableRelation
To find only the Dependent Table only
FROM   cte

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 2012 : SQL 2012 - General

MSDB Error in backup of user database - Hi all, A new database was created on our existing single instance Sql Server 2012 Enterprise . Our over night maintenance job...

sql server 2012 licensing question - Hello all We have a fairly simple SQL server environment today (licensing wise) All of our SQL Server instances are...

SSRS report with dynamic column headers - Hi, I have a report which runs for last 12 months data. Since this is going to be last 12 months...

Adhoc queries and DB id - Dear All I want to get last executed queries on a DB. Using dm_exec_query_plan , dm_exec_query_stats ,dm_exec_sql_text gives this information. But it...

screenshot on view - I had a table like this: [code="other"]Name StartTime EndTime -------------------------------- abc 10:00 14:00 bcd 10:05 12:32 cde 13:10 14:08 dfe 11:00 11:08 [/code] We planning to create the...

Extended Events - Dear All I am trying to find out why some procedures are getting recomiled. For this when i run following select, SELECT...

SQL Server 2012 : SQL Server 2012 - T-SQL

Build menu with CTE .... - Hi, I've a menu that has several levels and each level has a position to order the entries. We had a cursor,...

SQL Server 2008 : SQL Server 2008 - General

Stored procedure invoking Elastic Search through HTTP Post. How to increase the 8K limit? - Hi, On one hand, I would like to use SQL Server database to store all the data and use this database...

Passing Type Table as parameters into Function - Hi All, I am having an experiment with passing tables as parameters into Functions. I have a table type set-up as...

Stored Procedure calling other stored procedure - Hi All, Can someone help me on how to tackle this. I have a stored procedure on my server called usp_RPT_HSG_JobType. This...

How to Move Table with Non-Clustered Index? - I am moving tables with clustered and non-clustered indexes to a different filegroup. The clustered index moved the table and...

Tooltip On Image not getting displayed on FireFox & Chrome - I am using SSRS 2008 and have a requirement to show the tooltip on Image. Tooltip is coming fine on...

SQL Server 2008 : T-SQL (SS2K8)

Repeating update or replace statement for column - I want to create an update or replace statement which replaces Event_Code column with repeating values instead for example B100 B102 B103 .... ... all...

T-SQl help... - Hi, I have the sql sample code and the below image has the ouput needed.. thanks in advance... I`m working with...

SQL Server 2008 : SQL Server Newbies

Search Using Stored Procedure - Hi to all :-) I want to have a result like this ---- SELECT * FROM TestMyView WHERE firstname = 'test5' but my code will...

Insert date in yyyy-mm format - Hi, I'm trying to insert random date in yyyy-mm format to have expiry Credit card date column. Haw can I do it?...

How to insert in 3 tables using stored procedure - Hello Everyone and Hello World How should i use stored procedure in inserting in three tables? like this one... i Have 3...

SQL Server 2008 : SQL Server 2008 Administration

Looking for powershell script - Hi, i am looking to find powershell expert, so that can help on my query.below script does return sql installed...

SQL Server 2008 : SQL Server 2008 Performance Tuning

TempDB best practices - Doubt - Hello guys, I have two doubt: -- 1 script: SELECT cpu_count AS [Logical CPU Count], hyperthread_ratio AS [Hyperthread Ratio], cpu_count/hyperthread_ratio AS [Physical CPU Count],...

SQL Server 2005 : SQL Server 2005 General Discussion

How to Write Query for the Below Requirement? - Hi everyone Can Any Body Help me how to write Query for the below requirement. I have Table in my Attachment I want...

SQL Server 2005 : SQL Server 2005 Performance Tuning

awe enable? - hello experts, please go through my server configuration windows server 2003 enterprise sdition 32 bit sql server 2005 enterprise edition 32...

Reporting Services : Reporting Services

Use of SSRS in desktop applications like web applications - Like we use reports on web application, can we use it on desktop applications?

Reporting Services : Reporting Services 2008 Development

Parameter setting for DateTime - I have a StartDateTime parameter for my report and I'd like to always set to 2pm yesterday time. The expression...

Data Warehousing : Integration Services

For Each Loop Uploads the Same File Infinitely - I have set up an SSIS package to upload nearly 400 Excel files into a table. The problem I'm having...

Data Warehousing : Data Mining

Opening existing package - Data Mining query is missing! Cryptographic error - I am opening an existing SSIS package at a new job and when I do that, the encryptSensitiveWithUserKey setting was...

Database Design : Design Ideas and Questions

Struggling with this Data Mart - I'm doing dimensional modeling and i'm struggling with this data mart. Can someone help? I'm building a data warehouse for a...

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...

SQL Server 7,2000 : T-SQL

TempDB best practices - Doubt - Hello guys, I have two doubt: -- 1 script: SELECT cpu_count AS [Logical CPU Count], hyperthread_ratio AS [Hyperthread Ratio], cpu_count/hyperthread_ratio AS [Physical CPU Count],...

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 ©2013 Red Gate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
Contact: webmaster@sqlservercentral.com