In this issue

Featured Contents

Editorial

Featured Script

 
 advertisement
 
Red Gate Cloud Services Schedule Azure backups
Red Gate’s Cloud Services makes it simple to create and schedule backups of your SQL Azure databases to Azure blob storage or Amazon S3. Try it for free today.
 
SQL Storage Compress Compress live data by 73% 
Red Gate's SQL Storage Compress reduces the size of live SQL Server databases, saving you disk space and storage costs. Learn more.
 
SQL Skills SQLskills Immersion Events - Deep SQL Server Training
Deep technical training by world-renowned experts in Bellevue, WA in August 2012. You can't get better ROI for your training budget. Learn more.

In This Issue

Stairway to SQL PowerShell Level 2: SQL PowerShell Setup and Config

Now that you know how to get started with PowerShell, it is time to configure PowerShell for SQL Server use. This level covers the components you'll need and how to configure them. More »


Red Gate’s new custom metrics site - with a little help from our friends

With contributions from MVPs and the SQL Server community, the SQL Monitor team at Red Gate has put together a custom metrics site, SQL Monitor Metrics, to accompany the release of SQL Monitor 3.2. The site hosts T-SQL scripts which can be imported directly to SQL Monitor for custom metric monitoring. More »


SQL Saturday #157 - San Diego

Southern California isn't all beach time. SQL Saturday comes to San Diego on Sept 15, 2012. Join fellow SQL Server pros for a day of learning. More »


Implement Continuous Integration In Your Software Project

Continuous integration, or CI, brings developers closer to delivering error-free software flawlessly. Find out how to implement it.  More »


PASS Data Architecture VC presents Louis Davidson on Designing for Common Problems in SQL Server

On Thursday August 16th 12PM noon Central, Louis Davidson will do a design and code review of several common patterns of solving problems that a typical programmer will come up against in SQL Server. More »


From the SQLServerCentral Blogs - SQL Server: Understanding the Data Page Structure

We all know very well that SQL server stores data in 8 KB pages and it is the basic unit... More »


Editorial - Learning C

Someone else gets it. Besides me, I mean. We should be teaching people the C programming language. An interview with David Griffiths, author of Head First C, says that learning C is a good idea. I concur, and I stand by my statement.

It's not that I think everyone should be a C expert, but I'd like to see more programmers spend 5 months, a semester, early in their programming careers. If you've written your own iOS app, this would be a piece of cake. If you're a Python guru, it would broaden your horizons. Getting closer to hardware helps you write code in a more thoughtful way.

I'd like to see a C programming course as a semester requirement for quite a few fields that might need to develop programs. Not only computer science majors, but also scientists that might need to deal with building their own algorithms. In the same vein, perhaps it's worth a SQL class for everyone to better understand how to work with sets of data. A query class could also include some of the other query languages, perhaps MDX and XQuery would make sense as well.

I know this sounds like busy work, but as we become more and more dependent on data and scripting for all sorts of jobs I think it makes sense to start setting a baseline of expected skill for knowledge workers. Those people that knew programming could potentially pass a C test,  and they would be exempt. As we evolve into the future, especially as we may move to more vocational type training, I think it would be good to still require some basics of people as they begin their journey to working with code and computers.

» 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:


DECLARE @EmployeeDetails TABLE (EmpNo Int ,
                     EmpName Varchar(10),
                     EmpPlace Varchar(100))
                    
Insert into @EmployeeDetails Values(1,'samith',NULL)
Insert into @EmployeeDetails Values(2,'sreepathi','Kannur')
Insert into @EmployeeDetails Values(3,'Jamsheer','Calicut')
Insert into @EmployeeDetails Values(4,'Naseer',NULL)
Insert into @EmployeeDetails Values(5,'Rejith','Palakkad')

SELECT *
FROM @EmployeeDetails
WHERE EmpPlace <> 'Kannur'

What are the number of rows returned in this query?

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

This question is worth 1 point in this category: T SQL. 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.

Professional SQL Server 2012 Adminstration

Microsoft SQL Server 2012 will have major changes throughout the SQL Server and will impact how DBAs administer the database. With this book, a team of well-known SQL Server experts introduces the many new features of the most recent version of SQL Server and deciphers how these changes will affect the methods that administrators have been using for years. Loaded with unique tips, tricks, and workarounds for handling the most difficult SQL Server admin issues, this how-to guide deciphers topics such as performance tuning, backup and recovery, scaling and replication, clustering, and security.

Get your copy from Amazon today.


Yesterday's Question of the Day

Given the following table:

DECLARE @table TABLE (
  RowID INTEGER IDENTITY,
  BitValue BIT NOT NULL);

Which of the following values will be inserted as a true / 1 value into the BitValue column? (select all that apply)

 INSERT INTO @Table (BitValue)
  SELECT -1 UNION ALL
  SELECT 0 UNION ALL
  SELECT 1 UNION ALL
  SELECT 25;

Answer:

  • -1
  • 1
  • 25

Explanation: Converting to bit will convert any non-zero value to 1.

Reference: Bit: http://msdn.microsoft.com/en-us/library/ms177603

» Discuss this question and answer on the forums

Delivering Business Intelligence with Microsoft SQL Server 2012

Equip your organization for informed, timely decision making using the expert tips and best practices in this practical guide. Delivering Business Intelligence with Microsoft SQL Server 2012, Third Edition explains how to effectively develop, customize, and distribute meaningful information to users enterprise-wide. Learn how to build data marts and create BI Semantic Models, work with the MDX and DAX languages, and share insights using Microsoft client tools. Data mining and forecasting are also covered in this comprehensive resource.

Get your copy from Amazon today.


Featured Script

Unattended Install with PowerShell

A PowerShell script which will guide you through an interview and produce the configuration file(s) necessary for an unattended installation of SQL Server 2008/2008R2. 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

sqlcmd question - I've created a number of scripts to create stored procedures, one per script file. I'm aware that I can use...

How should i free up the space from the BACKUP Drive whcih is increasing Rapidly - How should i free up the space from the BACKUP Drive whcih is increasing Rapidly Thanks Rohit

Filegroup vs performance - Hi, I currently have a +50GB database with only 1 filegroup (Primary). I am planing to archive some tables base on...

Error running Job - I get this error after I've created a job. I've logged on as 2 different users but both times have...

SQL Server 2005 : Backups

T log back up - Hi Experts, I have a doubt about full and T log backup, Today when I was working on one of my prod...

SQL Server 2005 : Business Intelligence

Continues looking for new files in 2008R2 - Hi All I am new to SSIS Development I have one requirement for my client That is...We have one secured network...

Easy way to use timestamp for updating warehouse - Our erp system has a timestamp column in each table, and so ideally I would like to compare the timestamp...

Last Day of Month subscription for Shared SSRS schedule - I need to create a shared schedule in SSRS 2005 for the last day of the month. Not the last...

SQL Server 2005 : Development

create procedure with execute as - I have stored procedure which includes bulk insert, activating and deactivating the access to xp_cmdshell and executing xp_cmdshell. I am...

Store proc or trigger - I have a situation where, we have SQL Server 2005 Standard edition SP4 - Over 100 little table per customer - each table...

Step by Step approach to add an identity colum to an existing table.... Please Comment... - I have an existing Person table with about 4 million rows. I have an existing PkeyColumn, PersonId, that has values from...

SQL Server 2005 : SQL Server 2005 General Discussion

The multi-part identifier could not be bound. - I've read some suggestions on this forum, but none were able to help.. so am posting a new question. I am...

Office/Clerical/Data Entry ! - :-) PART TIME office/data entry in a great office environment. Bright, energetic person for customer support and data entry. Attention to...

sql traces capturing all the sp_reset_connections all the time - I am wondering what is going on with the trace? It is a production sql 2005 box Enterprise Edition 2005. The schedule...

SQL Server 2005 : SQL Server 2005 Security

Linked Servers and Security Concerns - The company I work at has a general policy not to link servers at all, and the DBAs won't really...

SQL Server 2005 : SQL Server 2005 Strategies

Splitting DBs into multiple files for IO spread - We have a shared SQL server with a few hundred small DBs on it. Currently all the DBs consist of...

SQL Server 2005 : SQL Server 2005 Integration Services

Use credentials in Foreach loop container - Hello all, I'm using a foreach loop container to move files between two servers. My problem is that I have to...

HOW TO READ A ZIP FILE WITH THE SAME NAME FROM MULTIPLE FOLDERS AND UNZIP THEM - Hi, Iam relatively new to bids.Following is the scenario where i need help. c:\archive has 3 sub folders c:\archive\1 c:\archive\2 c:\archive\3 1 ,2,...

SQL Server 2005 : T-SQL (SS2K5)

TSQL process JSON string to update table, need suggestions for my code - Thanks to Phil Factor's parseJSON function first. "Consuming JSON Strings in SQL Server" [url=http://www.simple-talk.com/sql/t-sql-programming/consuming-json-strings-in-sql-server/]http://www.simple-talk.com/sql/t-sql-programming/consuming-json-strings-in-sql-server/[/url] I have a simple json data which...

How do you use a sub query in a join? - Looking to take the following query: SELECT sales_order_number , count(sales_order_number) as Notification_cnt from ztb_IMP_Notifications group by sales_order_number and use it to feed the ztb_IMP_Notifications section...

Inserting data in one table as selecting from other tables - Hi all! I have a simple question. I've made a simple database in Access and upsized it in my SQL Server...

get Count(*) to return 0 - I have to join two tables that share the column report_Id. I want to return the counts of all report_ids...

SQL Server 2005 : SQL Server Newbies

SQL server table on a PC - Hello, can we create a SQL server table on a PC based on a query on the sql server ? Thank you

SQL Server 7,2000 : Administration

Rename Instance of SQL Server - I know how to rename a SQL server, but how do I rename another instance of SQL server 2000. Thanks

SQL Server 7,2000 : Data Corruption

Suspect Mode - Good morning, It is a bit of a long story but i'm recently hired and have had a sql server that...

SQL Server 7,2000 : SQL Server Newbies

Multiple Aliases for a single Column - Hello, I am new to SQL and have been asked to perform a query of our Dispatch database. Although I am...

SQL Server 7,2000 : SQL Server Agent

How can i make the data transformation in DTS to do an update instead of insert? - Hi guys, this is the dilemma im in now. i have to create a DTS package that instead of doing the...

SQL Server 2008 : SQL Server 2008 - General

Column level collation to store multi linguage characters. - Morning all. We receive data from a 3rd party, the flat file is correct in that it contains the right characters...

want to know which stored procedures are being run most often - Hello, In my organization Excel reports are query driven, but these queries are executed with an EXEC sp statement. I...

Subscriptions not running - Hello, I'm new to SSRS and am having problems with subscriptions. when I create a subscription FOR Windows File Share I...

Change the partition column to a different column - Would there be any issues if i change the partition column of an existing Partitioned Table to a different column,...

"Scan for startup procs" in sp_configure - Is there any security risk on enabling SQL Server configuration sp_configure 'scan for startup procs',1 reconfigure

Help to join two tables become one table - Hi guys, I'm creating two temporary table from a query: SELECT branch_description ,qty_order ,current_open_orders FROM ( SELECT p21_view_branch. branch_description as branch_description ,SUM (CASE...

Querying Data From One Table Against Another Table For All Results - Hello, I am new to the forums and overall new to SQL and SRSS. I have two 2008 SQL databases that...

Please help= My SSIS package is keep failing - Here is the error message; [Derived Column [232]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "component "Derived Column" (232)" failed because error...

Using REPLACE with a string where I need to replace %anystring% with some new string - Hi everyone, I am actually fairly new to using the REPLACE function and don't know if I can use regex with...

Odd values in msdb.dbo.backupset - I'm seeing a series of entries in my backupset table that have a null value for name and the size...

Survey data structure - Boss want me to create a asp.net application for survey in which there are about 50 questions. Most question is...

Loopback address - Hi, I wanted to know what is the use of the Loop back address. What importance and when it is used...

XML PATH Concatenate Syntax - I use a nested query to concatenate row data for an aggregate. The syntax I use within the nested query...

SSIS package load data from SQl to Mysql - Try to create a SSIS package to insert data from SQL to Mysql. The setup is as follows OLE DB connection to...

Calculating average for 3 consecutive years - Hi, I have this data: 12/30/2012 0:00 Car ford focus 0 12/30/2011 0:00 Car ford focus 11 12/30/2010 0:00 Car ford focus 7 12/30/2009 0:00 Car ford focus 15 12/30/2008 0:00 Car ford focus 6 12/29/2012 0:00 Car ford focus 12 12/29/2011 0:00 Car ford focus 44 12/29/2010 0:00 Car ford focus 21 12/29/2009 0:00 Car ford focus 6 12/29/2008 0:00 Car ford focus 3 12/30/2012 0:00 Car Audi TT

Pivoting the table - I need some help in pivoting the table. The table is like this: [b]File Main Sub Text[/b] 1 1 A. hello 1...

deployed SSRS report is slow, dev report is fast - platform: SQL Server 2008 R2 Enterp Ed with an SSRS instance installed on the same 2-box Windows Server 2008 cluster...

SQL Browser service needed for non-standard static port? - If I am using dynamic port settings on my sql server instance, I need the sql browser service to run...

RSClintPrint - So we are in the process of converting over from Crystal to SSRS. Things seem to be going fine; however,...

LSASS.EXE CPU Bloating - I've seen a lot on LSASS.EXE CPU and Memory Bloating. Since I'm having the problem in the context of SQL...

SQL Server 2008 R2 Service Pack 2. - Hi All, I wanted to know whether the service pack 2 for sql server 2008 r2 is available for download. I...

SQL Server 2008 : T-SQL (SS2K8)

Geography datatype problem in updation - Hi I have a location table [code="sql"] SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [dbo].[LocationCopy]( [LocationID] [int] IDENTITY(1,1) NOT NULL, [LocationName] [varchar](100) NOT NULL, [CityID]...

IF EXISTS DROP INDEX ... IF NOT EXISTS CREATE INDEX - How can I make the following a little more error proof where I check the Table and Schema Name? IF EXISTS...

UPDATE when the values are the same - Does an UPDATE query overwrite existing values if the already existing value is the same as the one your updating...

Calculated/Derived Column on existing table...please help - Hey guys, I have been going nuts over this issue for some time and I am seeking help. I have SQL...

"UPDATE" Is Not Updating Correctly - I am executing the SQL Statements on SQL Server 2008 (SSMS). What am I missing? (I'm sure it's me, not the...

What is meant by set based programming? - Hi all, I have come across various section on this website where it is mention that SQL Server is a set...

comma in SQL - I just found out we have a sql script to create a table. CREATE TABLE [dbo].[DayList]( [DateID] [int] NOT NULL, [EnrDate] [int] NOT...

Filer on Period for Active Versions only. - Hi, I have a scenario where I have a version table that holds multiple versions. One or more versions can be...

SQL Server 2008 : Working with Oracle

Cannot convert between unicode and non-unicode string data types - I am working on an SSIS project, to pull data from Oracle 10.2g into SQL Server 2008R2, 64-bit. This project...

SQL Server 2008 : SQL Server Newbies

Can not drop user from master database - So hey guys again....Sorry If I'm asking stupid questions, but to be honest, I don't have the slightest idea how...

Format number thousands separator with point - Format number thousands separator with point Hi there, I need your help. I have this number in my database output result of...

remove last line - Hi I ´ve this code on a ERP framework, the only problem is that on the .TXT file it creates a...

Just starting first job - SSIS & SSAS - I graduated recently from college and will by starting my first job in Business Intelligence in October. I'm currently going through...

Can't connect to sql server from an XP machine, but I can from win7 - Hi there, I've been given access to a SQL Server and I wrote a VBA script (in excel) to query the...

How to prevent deadlocks - We have been noticing more deadlocks in our database what kind of steps could we do to identify why? Thanks for...

SQL Server 2008 : SQL Server 2008 High Availability

SQL Distributed Transactions - DTC - Hi All I'm trying to understand the reason for DTC in Clustered Systems If we have a 2 node Cluster with Shared...

creatiing a new distribution database - i want to create a new distribution database and make the present publisher use this new distribution database. sp_adddistributiondb How can...

Dear All this post is about logshipping DC- DR Drill [switch over and switch back (or)failover and failback ] - Dear All HI this is Rohit like all DBA's iam also a starter but iam working in a cluster environment...

SQL Server 2008 : SQL Server 2008 Administration

SQLIO Disk Testing - Hi I'm using the SQLIO Tool to test my disks on my server Problem is that when I choose to test multiple...

How change Analysis Server services account - Hi, I have installed a SQL Server 2008 R2 in a Windows Server 2008 R2 Server (this server is DC). All sql...

Restoration question? - For the Restoration 1. Restore full backup 2. Restore latest Differential backup 3. Restore the TLog backup. (one by one and last Tlog apply with RECOVERY...

Checklist to troubleshoot low disk space issues in SQL server - All, I need help from all of you to put together a checklist for troubleshooting disk space issues. In our environment,...

How to identify a SQL Agent job by Schedule number - I've had a couple of errors happen recently, and right around the same time there were warnings stating the following: [191]...

maintenance script to exlclude dbs - I am starting to try to use http://ola.hallengren.com/ site maintenance script. I would like to exclude some database that start with...

How to reset the list of backup for a restore process? - I did many tests of backups and restores on a DB Many of the backups are bad (have bad data) and...

When does a database get marked as suspect? - Theoretical question thankfully :-D I know it can be marked as suspect on startup due to damaged or missing data or...

Registered Server Shows Stopped But is Available - In SSMS, I have one server that shows stopped but I can connect to it. It is a SQL 2008...

AppDomain 12 (mssqlsystemresource.dbo[runtime].11) is marked for unload due to memory pressure. - Hi All, I am getting these errors in sql log and windows event log as, 1)AppDomain 12 (mssqlsystemresource.dbo[runtime].11) is marked for unload...

Upgrade from SQLServer Express to Full Version - How easy is it to move a production server from SQLServer Express to the full version? Is it just a...

script to check long running job - Recently we found there is a job in one of our testing server runs about 3 days and it is...

what is the Best way to run huge script on production server ? - what is the Best way to run huge script on production server ? (code drops) The script has several alter procedures to...

Index Range_scans - Hi All I'm struggling to understand why my Index is reporting Range_scans DDL: Table: [code="sql"]CREATE TABLE [dbo].[Indexing2]( [Col1] [int] IDENTITY(1,1) NOT NULL, [Col2] [int] NULL, [Col3] [int]...

Career : Certification

Number of MCSE Data Platform certified people in the world ? - I am curious to know the number of MCSE Data Platform certified people in the world as of today. There...

Programming : Connecting

Microsoft DB2 OLEDB Provider 4.0 - Has anyone managed to connect to DB2/AS400 using the new version (4.0) of Microsoft's DB2 OLEDB provider? I had the version...

Programming : Service Broker

I want to be able to stop my queue when there is a backlog... - We've had a few problems lately with the size of the target queue growing into the multi-millions, and knock-on effects...

Slow performance - Hi, I have a problem in SQL2005 so after several days of work without problems, suddenly takes a very slow (sqlserv.exe...

recommendations for MAX_QUEUE_READER option on queue - does anyone have any best practice details or suggestions on how to choose a value for MAX_QUEUE_READER parameter of a...

SQLServerCentral.com : Anything that is NOT about SQL!

Crazy Interviews - Reading the topic 'Stupid Interviewer Tricks' reminded me of an interview where I couldn't tell if I was crazy or...

Today's Random Word! - HI When you woke up today, or logged-onto Opera Forums, you may have had a dream, a thought, a scene...

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

Reporting Services : Reporting Services

Subreports within table/matrix cells are ignored. - Hi All, Can anyone provide a solution for error while exporting data to excel from SQl Reporting Services 2000. Sub report data is...

Data Warehousing : Integration Services

Why adding Data in file name works in Flat File destination but not in Excel Destination? - I am loading data from SQL Server to Flat File and add date at end of filename. It works perfectly....

Query regarding Look Up Transformation-Look up transformation fetching multiple matched records from ther reference table - Look up transformation fetching multiple matched records.More information as below 1. Input data comes from a table called Contact(ContactID is unique...

Data Warehousing : Strategies and Ideas

Slow Changing Dimension Question - I think I already know the answer to this question, but I want to double check. We have a Suggested Retail...

Data Warehousing : Analysis Services

Cnofiguring SQL 2005 in clustering - HI, to ALL. =========== Q. 1 ====== I M totally new in this field,, basically I M a network Administrator. But due to some special...

Can anyone let me know why not so many companies choose SSAS for data analysis and base layer for dashboard? - I kept tracking the job market and noticed not a lot of company developed their DW with the use of...

MDX query issues - Hello, I am very new to MDX and I need some help from you pros... I have a working SSAS cube. I...