In this issue

Featured Contents

Editorial

Featured Script

 
 advertisement
 
SQL Monitor logo

Check SQL Server performance at a glance

We consulted 1000 SQL Server professionals to make SQL Monitor’s UI as clear as possible. Start monitoring with a free trial.

 
SQL Data Compare

Save time when comparing and synchronizing database contents

"It has also streamlined our daily update process and cut back literally a good solid hour per day." George Pantela, GPAnalysis.com. Download a free trial of SQL Data Compare now.

 
SQL DBA Bundle

‘10 Tips for Efficient Disaster Recovery’

Steve Jones gives the final lesson in the ‘Top 5 Hard-earned Lessons of a DBA’. Read now and learn from the best.

In This Issue

Log Shipping Lite with PowerShell

A PowerShell driver that performs incremental restores on a standby server, a lite weight log shipping solution. More »


xp_cmdshell for Non-System Admin Individuals

There may be times when you want to allow non-System Admin logins to be able to execute the xp_cmdshell extended stored procedure. In this articleGreg Larson will show you how to setup xp_cmdshell so non-System Admins can use this extended stored procedure. More »


SQL Server CREATE TABLE syntax diagrams

Many of us have seen, on MSDN, the heading 'Syntax', followed by a rash of nested brackets and keywords, enough to put off the most resolute of code-cutters. However, there is a goldmine of information there, and Phil had an ambition to get at it, and share the gold. The result is this article, full of railroad diagrams. More »


From the SQLServerCentral Blogs - The Secret to Keeping Your Cool Like an Experienced Production DBA

Your actions as a Database Administrator can make the difference between a disaster being a minor nuisance or a major... More »


Editorial - Give

There's a lot more to life than just working to support yourself. Sometimes you need to do just that, but often we have more flexibility to enjoy and appreciate the world around us. We can take joy and pleasure in the experiences we have, the people we encounter, and the accomplishments we achieve. However there's another part of life that I think is important for everyone, and that's giving of yourself to help others.

I believe that almost everyone should volunteer their time or resources and give back to society. We should all work to make this a better world for everyone. Whether this is through a church, a non-profit, your local community or some other way, we are all better off for the efforts. I also believe this isn't something you do constantly throughout your life, though if please feel free to do so. Some of us will volunteer when we are young, some when we retire. The important thing is that when we are able to do so, we act.

Giving of yourself helps others, and it can provide you with positive feelings. It can also be good for your career. This piece talks a bit about the traits of those people that give, and it seems they often find their own personal success grows. This is because the way they view themselves, their time, and their accomplishments, changes when they help others. Volunteering can reduce stress, and may help you enjoy your job more. That last item might be the most important reason of all.

This is something you can learn to do, by making time to help others at work, or in your life. Please be sure to balance this with the rest of your life, but you might find that taking a little of your free time to help others ends up improving the quality of your life, well beyond the price you pay in accomplishing less yourself. However please volunteer because you want to, not because you want to look good or add an item to your resume. Give because you want to give.

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

What does the select statement return? Note: This has only been tested on SQL Server 2008 SP3.
Create Table #QotD (
       Num1 Real
     , Num2 Float);

Insert Into #QotD
Values (99.99999999991
      , 99.99999999997);

Select * From #QotD;

Drop Table #QotD;

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

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

If you've designed your SQL code intelligently, and implemented a sensible indexing strategy, there's a good chance your queries will "fly", when tested in isolation. In the real world, however, where multiple processes can access the same data at the same time, SQL Server often has to make one process wait, sacrificing concurrency and performance, in order that in order that all can succeed, without destroying data integrity. Transactions are at the heart of concurrency. I explain their ACID properties, the transaction isolation levels that dictate the acceptable behaviors when multiple transactions access the same data simultaneously, and SQL Server's optimistic and pessimistic models for mediating concurrent access. Pessimistic concurrency, SQL Server's default, uses locks to avoid concurrency problems.

Get your copy from Amazon today.


Yesterday's Question of the Day

The following SELECT statements will return values 1-4 exclusively.  Rank them in order from 4-1.

A note about DIFFERENCE: The return value ranges from 0 through 4: 0 indicates weak or no similarity in their SOUNDEX value, and 4 indicates strong similarity or the same values.  So ranking from 4-1 lists the strongest match first.

A. SELECT DIFFERENCE('SQL','sequel')
B. SELECT DIFFERENCE('SQL','eh skyu well')
C. SELECT DIFFERENCE('SQL','ess kyu ell')
D. SELECT DIFFERENCE('SQL','seek well')

Answer: A, D, C, B

Explanation: Apparently SQL pronounces itself "sequel".

Ref: http://msdn.microsoft.com/en-us/library/ms188753.aspx

» Discuss this question and answer on the forums

Professional SQL Server 2012 Internals and Troubleshooting

The 2012 release of SQL Server is the most significant one since 2005 and introduces an abundance of new features. This critical book provides in-depth coverage of best practices for troubleshooting performance problems based on a solid understanding of both SQL Server and Windows internals and shows experienced DBAs how to ensure reliable performance. The team of authors shows you how to master the use of specific troubleshooting tools and how to interpret their output so you can quickly identify and resolve any performance issue on any server running SQL Server.

Get your copy from Amazon today.


Featured Script

To remove the specified Characters in the Given String

You can select alphabets alone, Numbers alone, Alphanumeric, or Non Alphanumeric alone. 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

Drop All Users in the Database - Is there a way to drop all users in a particular database instead of deleting each.

SQL Server 2005 : SS2K5 Replication

Overwriting a table which is replicated - Hi, I have 3 tables in a database in SQL Server 2005, which are replicated through a transactional replication to 3...

SQL Server 2005 : SQL Server 2005 Integration Services

SSIS job failing intermittently, connectionmanager failing - I have an SSIS package running fine 90% of the time, but for stretches of the day it fails over...

SQL Server 2008 : SQL Server 2008 - General

credential/proxy - I have a proc as below ALTER PROCEDURE [dbo].[sp_proc_test] WITH EXECUTE AS 'ABCD\svcaccount' AS EXEC msdb.dbo.sp_start_job @job_name = 'JB_ABC_Run' GO I setup a...

Transfer The Logins and The Passwords Between Instances of SQL Server - we want to Transfer The Logins and The Passwords Between Instances of SQL Server 2008 we have 78 logins and 78...

Transfer The Logins and The Passwords Between Instances of SQL Server - we want to Transfer The Logins and The Passwords Between Instances of SQL Server 2008 we have 78 logins and 78...

Linked Server Creation Stalling - I am trying to create a linked server to a MySQL server. My SQL box has the MySQL 5.2 ODBC...

Bulk insert with data field encryption - We get a daily file of employee ids and their associated social security numbers. Right now, I have a stored...

SQLSERVER INTEGRATION SERVICE - 1. How to provide security for the configuration file (xml package configuration file)? 2. Different approaches of deployment of package in...

1. How to provide security for the configuration file (xml package configuration file)? 2. Different approaches of deployment of package in ssis? 3. Three tasks are running in your package and 2 tasks are successfully executed and third task is failed, in this situation I need to roll - [email][/email]

upgrade 2005 SP3 to 2008 R2 - Hi, maybe already posted somewhere, but I can't find: we want to upgrade "in place" from 2005 SP3 to 2008 R2 RTM...

triggers not found in replicated table - Dear, I have done Snapshot Replication in my database. I noticed that the triggers corresponding to a specific table are not...

Replication DB - Dead lock issue - Hi, We have One Database which is a Replication Db, sometimes during beginning of the month, lot of user activities going...

model and tempdb - service startup problem - Hi all, I have a big problem (it's two actually). I wanted to move system databases back to C: drive (they were...

Understand about index page,B Tree - Hi, I am intermediate on MSSQL . There are many article related to index and Btree . Here i stuck with one question...

Implications of OR in WHERE Clause - Hi Dears, I have a problem that my index are not getting used because of using OR in my WHERE clause....

Need conditional sequence number - [code="sql"]declare @t table ( id int, PayCode char(2) null, Amount decimal(15,2) null, CDate date, TranSeq int null ) declare @c int,@max int set @c = 1 insert into...

Replication Issue: Multiple Publishers, One Subscriber, Same Schema..Please Help! - Hello, Am relatively new to Replications as such, the scenario I am dealing with is like as follows: 1. I am having...

Can use clr function in select but not in update - I have a complicated clr function that does a formula calculation. The variable values of these formulas comes from different...

Buying SQL - License - We need to buy MSQL Server 2008 Standard or 2012 for a very light application. I have quote: 228-09884 Microsoft SQL Server...

SQLCMD hanging - Hi All I have a php exec command which runs SQLCMD as follows the sqlcmd command works by itself but when...

Is there any way to track tempdb usage when checkdb is running - please help me with this q:-)

Replication Distribution Agent Failure "memory mapped file read failed" - Please advise on resolution steps that worked for you for the below error description while delivering snapshot data to subscriber...

Failing agent job - Hi, Strange one bugging me have almost identical code running in another database on the server without issue. I have an agent...

Database Mail not sending mail if number of recipients are more - Hi All, In one of the servers, database mail is not sending mails if the To address is more than 4...

DB Size Growing after moving fields - Hi All, I am new here, but have read the site a lot. I have been doing some SQL maintenance on...

SQL Server 2008 : T-SQL (SS2K8)

Running Dynamic SQL - Hi All, I have in the past created dynamic SQL in a tally table and looped through to execute it....

Help on triggers - Dear Friend, Am I able to capture the query inside the trigger that I was executed..? For example, I have instead of...

Select Distinct for 4 columns but return all columns.. how? - dear friends, I have a table with too manly fields. there are duplicate records in in rows BUT ONLY for some...

Group by - Retaining all serial numbers - Hi, I am trying to group a dataset by the variable Sale_Type and retain the serial numbers along: Here is the data: Table1: Sno Sale_Type Amount 1 Drug ...

Query Help - Hi, I need help in getting this type of output, I tired with MIN and MAX function but didnt get required...

Insert Multiple rows using Transacrtions - Hi.. I have a table and need insert multiple data into it. First i have delete all data into the...

sql query questio - I have 2 tables Case CaseID Name ------------------- 12341 XYZ 23451 ZZZ 90892 XXQ CaseCode CaseID CaseCode TypeFlag -------------------------------- 12341 001 P 12341 003 S 90892 111 S 90892 222 S 90982 999 P Here...

Need some help in solving the below logic of averages - I have a requirement to work with the below 2 tables and get the last table as my output. Any...

Converting Integer date & time into datetime variable .. help! - Hi! I have two fields that are integer type in this format DATE: 1130627 = (exclude the first digit)(13-06-27) TIME: 51458 (24hr) = 5:14:58 I am...

SQL Server 2008 : SQL Server 2008 High Availability

Change Destiation Folder on 2008 R2 - Hi All, Was wondering if it's possible to change the destiation folder for log shipping and if there are any gotchas....

Programming : General

multi currency credit card processing - To avoid online credit card fraud, many companies that offer internet merchant accounts as well as credit card processing companies...

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