SQLServerCentral - www.sqlservercentral.com

A community of more than 1,600,000 database professionals and growing

The Voice of the DBA

The Intrusion of Life

I really try to be professional in my career. I try to meet my deadlines. I take pride in my work. I try to ensure that the commitments I've made, I keep. If that means I need to work late or on weekends, I do so. That doesn't mean that my life revolves around work, or that I allow myself to be abused by an employer, but if I'm behind, or I haven't given 100% of my effort during a project, I make an extra effort to catch up.

Recently as I was stressed and preparing for SQL in the City, life intruded into work in a very visible way. A family injury, resulting in some doctor visits and additional work around the house for me, severely cut into some of my work time. Fortunately my flexible schedule allowed me to work early in the mornings or at night to try and make up for the errands and appointments, but I still fell behind. 

To add to the stress and pressure, there were business continuity issues. If I couldn't attend SQL in the City, someone needed to be able to deliver the talks in my place. Not only was it important I finish the content, but I also needed to practice myself, as I had still planned to make the trip if at all possible. In the end everything worked out well, but it was a very busy couple of weeks for me to finish this "project" for my job, continue to manage the daily work, and tackle the extra load at home.

That's not much different than the challenges and pressures that many of you face in your jobs as data professionals. You have regular responsibilities, you have special projects with hard deadlines, and you sometimes struggle to fit the rest of your life into the remaining time you have. However, you shouldn't fit your life into work most of the time. There are always situations where you must, but for the most part we work to have a life outside of work. We want to spend time with family, friends, and on hobbies. I would hope that all of you would ultimately see your family and life outside of work as more important than work.

I'm lucky. My boss was very supportive and understood I might cancel the trip if my family needed me. Red Gate was willing to work with me to rearrange things, have remote meetings, and support my by tackling a few of my daily tasks. Not all companies or bosses are like that, and I've struggled with those that were difficult in the past.

I hope that you really think about the priorities that you set in life, and limit the compromises you make when the demands of work conflict with those in the rest of your life. 

Steve Jones

PS: Everyone at the ranch is fine.


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:

Steve Jones from SQLServerCentral.com

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

ADVERTISEMENT
SQL Developer Bundle

12 essential tools for database professionals

The SQL Developer Bundle contains 12 tools designed with the SQL Server developer and DBA in mind. Try it now.

SQL Backup Pro

Free eBook! SQL Server Transaction Log Management

Find out how understanding how log files work makes all the difference in a crisis. Then try SQL Backup Pro to put the tips into practice. Download your free resources now.

Deployment Manager

Total Deployment

Enjoy easy release management for your .NET apps, services, and databases with Deployment Manager. Get your free Starter edition now.

Featured Contents

 

A New Look

Site Owners from SQLServerCentral.com

We've changed the newsletter and would love to know what you think. More »


 

Change the Maintenance Plan Owner

Shashank Srivastava from SQLServerCentral.com

This article shows how you can change the maintenance plan owner in SQL SERVER More »


 

SQL Saturday #214 Louisville KY

Press Release from SQLServerCentral.com

Join us for a free day of SQL Server training and networking in Louisville Kentucky on July 13. This SQL Saturday event also has 2 paid pre-con all day sessions on July 12 presented by Dave Fackler and Bill Pearson. More »


 

Performance Tuning in the Age of Big Data

Additional Articles from Database Journal

Database Administrators must now deal with large volumes of data and new forms of high-speed data analysis. If your responsibility includes performance tuning, here are the areas to focus on that will become more and more important in the age of Big Data. More »


 

From the SQLServerCentral Blogs - First steps with Extreme Transaction Processing – Hekaton

Klaus Aschenbrenner from SQLServerCentral.com

A few hours ago Microsoft released the first public CTP of SQL Server 2014. The download and the installation went... More »

Question of the Day

Today's Question (by Revenant):

DECLARE @i INT = 32767;

DECLARE @s TINYINT = 0;

PRINT @i & @s;

What will be printed?

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: Bitwise AND.

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

ADVERTISEMENT

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

Yesterday's Question (by Dave):

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;

Answer: The select statement returns 100 for Num1 and < 100 for Num2

Explanation: "The float and real data types are known as approximate data types. Approximate numeric data types do not store the exact values specified for many numbers; they store an extremely close approximation of the value."

from: Ref: http://msdn.microsoft.com/en-us/library/ms187912(v=sql.10).aspx

There's probably a much deeper explanation than this, which I'm hoping will come to light in the discussion.

Enjoy!


» Discuss this question and answer on the forums

ADVERTISEMENT

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.

Featured Script

Free space for all database files

James Stuckert from SQLServerCentral.com

This script is great for determining which files are taking up the most space on a SQL Server.  It collects the free space on the drive, space used, the data/log file size, capped size of the file, filegroup, and file name.   

If there is a specific drive that is having space issues, you can set that variable to pull data for only those data/log files.  You also have the option to report on specific databases and even file IDs.

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

Tables Refresh from one database to other database - I have 2 database tables. 1) From Production 2) From Dev. The task is to move the data refresh from Production to Dev...

SQL Agent Job Rights - Best Advise - For all DBA's Currently, I have sysadmin rights on our SQL Server 2008R2/2012. My DBA are now implementing policy where they...

SQL Server 2005 : Backups

Automate restore script - Hi, I'm using Ola's backup script (http://ola.hallengren.com/) to backup the database. The problem I'm facing the Restore process. It took 4 hours to...

Snapshot Backups and Transaction Logs - Here goes my first post in here...I have recently slipped into the "Accidental DBA" role and my first task is...

SQL Server 2005 : Business Intelligence

Tables Refresh Solution - I have 2 database tables. 1) From Production 2) From Dev. The task is to move the data refresh from Production to Dev...

SQL Server 2005 : SQL Server 2005 General Discussion

SQL Server freezes (because of application) need logging - We have an application running ontop of our SQL Server 2005 instance and a couple of times a week this...

Server log error - Hi, My company user complain to me about the web application getting error every day on certain time. So I check...

Auto Save / Auto recover in Management Studio? - I have come in today to find my PC rebooted, I suspect due to windows updates, (it decides to reboot...

SQL Server 2005 : SQL Server 2005 Integration Services

Script task not executed after first loop in Foreach container - As per the subject really, though this is SSIS 2008. I have an Execute SQL task followed by a Foreach Loop...

SQL Server 2005 : T-SQL (SS2K5)

sp to move data between matching tables - I find myself having to move specific portions of data from a final staging table to a live table on...

SQL Server 2005 : SQL Server Newbies

Linked tables in Acess from Sql server (call failed) error!!! - i have an access db which has appx 25 linked tables which read from a SQL server db, i have...

SQL Server 7,2000 : Administration

Database in suspected mode - Hello, Can some one please help My production database in suspected mode. How can I fix it? Thank you

The log for database "databasename" is not available. - "The log for database MYDB is not avaiable" .. when writing an UPDATE statement to a table. We first observed this problem...

SQL Server 2008 : SQL Server 2008 - General

NULL datetime field. Is it possible? - When I query a datetime field, the result is a date and time. SELECT SentDate FROM MyTable. Result = '2013-07-01 12:32:47.000',...

Need to create a snaphot for reporting server? - Hi Looking for some help/links to where I can figure out how to copy all our tables in our production database...

Backup Scenario - Hi all, I want to know the backup scenario for the accidental deletion of table in a database. 1. we...

Import multiple files into multiple tables - Dear DBAs, I have 200 flat, text files. Each one has different fields separated by one specific charactere (¶). The name of...

Cycle errorlog based on numer of records. - Is there any way I can read the number of records in the errorlog without reading the output of xp_readerrorlog...

Create Report for each day of month with sepaarte tabs for each date - Hi, I wanted to create a report with separate tab for each day of month in excelsheet . 1. I have table...

Missing Index - Good Day, I ran a report on one of the SQL Server 2008R2 databases which identified an index as missing . I...

Export using bcp problem - Hi All I have a stored procedure which extracts data and creates a file in the cleansed directory. All works fine except...

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

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

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

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

Massive slowdown in SELECT statement in Cursor from SQL 2000 to 2008 -- need help! - I have a SELECT statement in a cursor in a stored procedure that ran extremely fast in SQL Server 2000....

Using RAISERROR with Dynamic SQL - Can anyone provide me a short example of how to implement this? I am not able to do this and...

TSQL Challenge - [b]Taken from TSQL Challenge[/b] The challenge idea is taken from a problem discussed in the MSDN TSQL forum. The challenge is...

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

Need SQL Function ? - Dear all, Hope things are going well at your end. I need sql function for getting the following Scenarios: Input parameter : ShiftDate Need to...

Return numbers in a range - Hi all, I have a table with 3 fields (index, startNumber, EndNumber) and i'm trying to make a select so...

Partitioning on Existing table with non clustered index in date column. - Hi All, I have one table with 10 lacks records. I partitioned that table on CreatedDate column with non clustered index (...

Replicate pending transactions manually - Hi all, I have configured the transactional replication between two servers which is different locations, it was working fine till...

SSIS Scheduled Job Completes in 2 Seconds - I have a long running SSIS package that I have run manually so far via "Execute Package Utility". Now I...

Queries that cause full scan table - Hi everybody , I would like to retrieve queries that cause full scan table in sql server. Someone can help me please??...

RESTORE DATABASE - Hello, What is the syntax on how to restore database on these requirement: I need to run restore sql job from server...

After cancelling SQL job database stuck in restoring state - Hi I was doing restore operation and i cancelled SQL agent job in middle now my DB is stuck in...

Get the LOG ( Text ) file name in SSIS Script task - Hello, I have configured Logging to generate the log files, filename example given below, using expressions to create a Logging Text file. Since...

SQL Server 2008 : T-SQL (SS2K8)

Find lowest populated field, not min value - Hi all, I have a tricky one. I have a dataset as below which deals with airport delays. CREATE TABLE #delaystats ( airport VARCHAR(10) ,thedate...

substring comparison for last 2 characters - I have a field with data like below I need to join on patid 123453 124344ME 323390 3233MS I need to remove the last 2 charcters...

Move Log file - Hi, I have data file and log file at different location. data file at location: D:\Folder1\test.mdf while log file at place D:\folder2\test_log.ldf Now I want...

Top One by one - Hi All, I have a list of 800000+ records. Now I want to see if someone selects 1 he will get...

compare SQL syntax but need the total and %??? - Hello SQL GuRu's, A few weeks ago I asked the following (http://www.sqlservercentral.com/Forums/Topic1459631-150-1.aspx?Update=1). For this I had received a clear answer and...

Query suggestion - I have a table A (VoucherNo) and table B (VoucherNo, ModifiedDate) What I want is whenever any voucherno gets inserted in...

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

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

Dynamic Vertical Rows to Horizontal - I read through the following topic already, and it has moved me MUCH closer to the solution that I'm seeking...

Top 2 with Count - Hi All, I have written a query. [quote]declare @N int declare @N int Set @n=isnull(@N,2000) select top(@N) * from ( select 10 'Top 2' Union Select 20 Union Select 30 union select 40 union select...

Extract first numeric value from a string - Brothers, I need to parse the first numeric value from a string that usually contains several numerics. This function works OK when...

Logic for a complex query which involves grouping and average in SQL - I have 2 tables. Below are the steps I need to follow to get my desired output. I could follow...

SQL Server 2008 : SQL Server Newbies

Performance Tuning on Very Small Databases - When is it worth it - When does rebuilding an index make sense? When does Shrink Database make sense on a Very Small Database? Some say...

Replicating tables (temp) on another server - Hello all. I am in a situtation where I need to take data from a few of tables from our internal...

sqlcmd - Hi All, I am a newbie to sqlserver.I recently came across "sqlcmd"utility feature while surfing.So here is my doubt. I connect to...

sqlcmd - Hi All, I am a newbie to sqlserver.I recently came across "sqlcmd"utility feature while surfing.So here is my doubt. I connect to...

sqlcmd - Hi All, I am a newbie to sqlserver.I recently came across "sqlcmd"utility feature while surfing.So here is my doubt. I connect to...

Connect SQL Server 2012 with Database Engine - Hi all, Installed SSMS 2012 Express addition with localDB. I don't know how to connect with Database engine and start using...

Access form front end to database - Hi, I have created a database with a table called "cable" Fields are ID - identity cableID - nchar(8) not null other fields are present but irrelevant...

SQL Server 2008 : Security (SS2K8)

PDF virus threat - Hello An application that sits outside of our network will allow the user to store pdf files on the database. The concern...

SQL Server 2008 : SQL Server 2008 High Availability

Mirroring server being moving/down - If your DR/mirroring server will be down for 24 hrs.....do you need to stop the mirroring? I was thinking if...

SQL Server 2008 : SQL Server 2008 Administration

change dbo login name - I have a database that I need to change the dbo owner from user A to user B. I'm getting...

Rebuilding / creating indexes as a bluk-logged operation and point-in-time recovery - So, skimming blogs this fine day, I came across a suggestion to switch a DB from Full Recovery to Bulk-Logged...

Refresh Development from Production Backup Disk Space Error - Post removed.

stack dumps - I'm running integrity checks on my databases and a couple of days ago I started seeing this job failed. It's...

Snapshot agent failing: Cannot promote the transaction to a distributed transaction - Hi, I'm receiving the next error when i create my publication snapshot (my publication only have a table/article): " Error messages: Message: Cannot promote...

backup- fastest - Hi, If I have a 100 GB of database and what are the best best options if I need to take...

PowerShell snap-ins - Hi, I'm reading through a book on PowerShell and tried the examples about finding the available cmdlets for a snap-in. What seems...

Does this sound like a good place to enable "Optimize for ad-hoc workloads?" - I recently ran the "Server Dashboard" report on a new server here. Imagine my reaction to seeing Adhoc Queries sucking...

Restore database - We do weekend full backup, daily differential, and hourly transcation log backup. Do I need to do a full backup right...

EXEC xp_cmdshell error - So I am trying to run a powershell script in SQL Management Studios: netsh advfirewall firewall add rule name="SQL_Admin_IPs" dir=in...

Programming : General

Need Help on SQL query script on sum - Hey guys, New to the site, new to writing SQL queries and have no background in this type of thing. But I've...

Programming : XML

LOADING COMPLEX XML FILE - The file below came from a web request I want to load it into SQL Server but it is too...

Programming : Powershell

Update Table with get-date - Hi, i want to update my table Field Date_Import=get-date -f (without time) TBL_Import [Count_Import] int NULL, [Count_Fault] int NULL, [Date_Import] date NULL $Command = $Connection.CreateCommand() $Count_Fault...

Getting Cluster information from Powershell scripts - Hi I am logged in remotely to a workstation and connecting locally to sql server 2008r2 cluster node. Is there a...

SQLServerCentral.com : Anything that is NOT about SQL!

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

SQLServerCentral.com : SQLServerCentral.com Website Issues

"Advanced Search" for Scripts - I would appreciate some kind of advanced search on "scripts", or maybe a "search within results" feature. We have a...

Reporting Services : Reporting Services

SSRS Number Format - Hi geniuses! Need to format numbers in order to set 12332100 to get: 123.321,00 instead of 123,321.00. How can I accomplish that? Any...

Radar graph help - Hello, I need to create a radar type graph like the one below using SSRS. This shows individual risks plotted in...

Compare 2 tables... How to do that??? - Hi SQL GURU's, Im trying to compare 2 table but i dont want that Table2 use a text .noc in the...

Troubleshooting ReportServerTempDB growth - We're having periodic issues with the ReportServerTempDB gradually growing until it threatens to fill the drive. It does not respond...

Reporting Services : Reporting Services 2005 Development

create a report with separate tab for each day of month in excelsheet - Hi, I wanted to create a report with separate tab for each day of month in excelsheet . 1. I have table...

Comparable values in MDX - Hi all I really need ur help... Imagine this dataset: Year Institution Value 2012 A 130 2012 B 150 2013 A 200 When I fetch the data...

Data Warehousing : Integration Services

PROXY BYPASS IN BUSINESS INTELLIGENCE DEVELOPMENT STUDIO - The Gurus, Could someone, please, tell me how to bypass proxy in Business Intelligence Development Studio. I know how to do...

Data Warehousing : Analysis Services

Newbie on MDX: How to use dimension as a query parameter? - [code="other"] SELECT NON EMPTY {([Measures].[Agent - Prcnt Default AUX0]), ([Measures].[Table - Info A]), ([Measures].[Table - Info B]), ([Measures].[Table - Info C])} ON COLUMNS, [Dim Employee Main].[Employees].[Employee] on...

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