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

Flying high on the Big Data hot-air

Today we have a guest editorial as Steve is on vacation.

I love Big Data twaddle. ‘Big data will become a key basis of competition, underpinning new waves of productivity growth, innovation, and consumer surplus’, ‘Big Data helps drive efficiency, quality, and personalized products and services, producing higher levels of customer satisfaction and experience.’,  ’ In an era of dramatic technology changes, the rise of big data analytics has certainly been one of the most influential’,  ‘Big Data: A Revolution That Will Transform How We Live, Work and Think’. Yes, it’s horsefeathers, and I could go on quoting this stuff for ages, giggling between breaths.

I love this caffeine-talk, but it is wrong to dismiss it entirely as the babble of over-excited marketeers. It is a great change to be able read so much enthusiasm within the industry. They are excited about  ‘predictive’ technologies that enable us to find significant trends from the data we already have using techniques  that are by no means new, and which have little to do with the products now heavily marketed as ‘Big Data’.

I reckon that we should capitalise on the buzz about big data, by steering it gently but firmly to reality.  For years, we in the database industry have struggled to explain to businesses the great value of multivariate statistical techniques, regression and predictive modelling on data. Suddenly, the industry understands the value of this sort of  magic  but attributes it to the wrong wizard. We have the tools already. We don’t actually need huge datastores  to keep all the data once we’ve done the preliminary aggregations. The most spectacular successes of statistical modelling have used relatively small data sets, but the right data, and the tools to provide these ‘insights’ have been around for years and are freely available.  R and SQL Server fit together remarkably easily, and I imagine that there are only two things that have restrained us in the past. Firstly has been a previous lack of management enthusiasm for it and secondly  has been our lack of training in statistical regression analysis and multivariate analysis. It is up to those of us who do business Intelligence to wise up to what is really fuelling this wave of enthusiasm and exploit it by showing the industry that  it can be delivered without having to open the big wallet.

Phil Factor from SQLServerCentral.com

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

ADVERTISEMENT
SQL Compare Pro

Compare and sync databases with SQL Compare

“SQL Compare is fast, extremely easy to use, full-featured and affordable. I wouldn't bother messing around with anything else.” Adam Machanic, SQL Server MVP. Download a 14-day free trial.

ANTS Performance Profiler free eBook

Free eBook: 25 Secrets for Faster ASP.NET Applications

Want to speed up your web application? Our new eBook has 25 tips for getting maximum performance from ASP.NET - download it free

SQL Toolbelt

Want to work faster with SQL Server?

If you want to work faster try out the SQL Toolbelt. "The SQL Toolbelt provides tools that database developers as well as DBAs should not live without." William Van Orden. Download the SQL Toolbelt here.

Featured Contents

 

Enable/Disable a table to be read only on the fly

Steven Rao from SQLServerCentral.com

Wouldn't be nice if we can set the "read only" property of any table to be on or off easily with one simple stored procedure call? More »


 

SQL Saturday #236 St Louis, MO

Press Release from SQLServerCentral.com

SQL Saturday is returning to St Louis for a full day of free SQL Server training and networking. This year's event will be on August 3, 2013 at the Saint Louis University's Center for Workforce & Organizational Development. We hope to see you there. More »


 

Free eBook: SQL Server Execution Plans, Second Edition

Press Release from Red-Gate

Every day, out in the various online forums devoted to SQL Server, and on Twitter, the same types of questions come up repeatedly: Why is this query running slowly? Why is SQL Server ignoring my index? Why does this query run quickly sometimes and slowly at others? My response is the same in each case: have you looked at the execution plan? More »


 

Baselining with SQL Server Dynamic Management Views

Additional Articles from SimpleTalk

When you're monitoring SQL Server, it's better to capture a baseline for those aspects that you're checking, such as workload, Physical I/O or performance. Once you know what is normal, then performance tuning and resource provisioning can be done in a timely manner before any problems becomes apparent. We can prevent problems by being able to predict them. Louis shows how to get started. More »

Question of the Day

Today's Question (by Kapil Singh):

What will be the output of these SELECT queries?

DECLARE @var money = 123457756
Declare @dec decimal =12345
Declare @dec1 Decimal(10,2) = 12345

--Select 1
SELECT LEN(@var)

--Select 2
SELECT LEN(@dec)

--Select 3
SELECT LEN(@dec1)

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: T-SQL.

Did you miss yesterday's question, TSQL- XQuery: answer it now or check out the answer.

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

Finding Object On Your SQL Instance

Paul Andrew from SQLServerCentral.com

  • Copy the code into a new query window.
  • Edit the SET @Object variable as required.
  • Execute the script.

Simples

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

unexpected transaction log growth - Hey all, we are running SQL 2005 Ent. x64 in production. The transaction log of one of the databases suddenly grew...

Adding RAM to SQL 2005 SE, but 2000 Compatibility - We have a Windows Sever 2003 server, running SQL 2005 Standard Edition SP3 with 4 Gig RAM. I would like...

Database File Autogrowth - I have a SQL Server 2005 on Windows Server 2003 all the latest service packs I am managing my database file...

SP4 installation for SQL 2005 fails - I am trying to install SP4 for SQL 2005 and getting this error below even though I am a system...

SQL Server 2005 : Business Intelligence

Config File Package Configuration - The Scenario is that I am deploying the SSIS packages from test network to production server. The architecture of my...

SQL Server 2005 : CLR Integration and Programming.

Is it possible to make an SQLCLR data type 'comparable'? - I have a C# project to implement a complex number type and wanted to execute [code="sql"]SELECT DISTINCT c1 FROM complex[/code] This gives...

SQL Server 2005 : Development

Full Text Index on view with left outer join - Hi All, I'm trying to create Full Text Index on a view that has Left Outer Join. But in order to...

Query really slow with eager spool - Hi,I have a query which become slower as the number of item in the temp table increase.Here's my code:CREATE table...

SQL Server 2005 : SQL Server 2005 General Discussion

multiple values from BATCH file - Hi, I am creating a batchfile that calls SQL query in a file the batch contains: [b]SET/P keyid1=Please enter multiple keyids: echo %keyid1% SQLCMD...

create table valued function - i need to create a function passing those two varaibales. How do i do that? Table valued function select DISTINCT bb.level...

DTExec: The package execution returned DTSER_FAILURE (1) - hi, Please help me for SQL 2k5.I have created a Maintenanace plan for daily backup of all databases and cleanup task.This...

SQL Server 2005 : SQL Server 2005 Strategies

XMLDocuments growing bigger - I have a xml table in which it has 10 million records in it . Every day there will be approx...

SQL Server 2005 : SQL Server 2005 Integration Services

Running SSIS 2008 and SSIS 2012 on same server - Hi guys, hope someone can help me out. This msdn article: [url=http://msdn.microsoft.com/en-us/library/ms143731.aspx]http://msdn.microsoft.com/en-us/library/ms143731.aspx[/url] suggests that SSIS 2012 can be installed on the...

file name property is not valid. The file name is a device or contains invalid characters - Having an issue using a TEXT file as my data source in an SSIS pkg… I've coded 40+ SSIS pkg's...

Write data in Teradata using SSIS - Hi, I'm designing a package to WRITE a data read from Excel / SQL DB into Teradata. Using .Net provider for Teradata, i'm...

handling row length in SSIS - I have created a SSIS package in BIDS for loading data from text file. I have bad rows where the...

SQL Server 2005 : T-SQL (SS2K5)

assign Null value to a column - In a result sql dataset if the value of a particular column is 0 i need to return Null, how...

Creating comma separated values for a column in TSQL - Hi All, Need help in writing tsql for creating comma separated values for a table based on batch size. For eg i...

SQL DB Email sending,HTML body formatting from two tables - I am working on a sql server DB mail sending task in which the mail body should be as HTML....

SQL Server 2005 : SQL Server Newbies

Need urgent help with query - Hello friends, One table (table1) cardno, datetime1, channel_no another table (table 2) cardno, datetime1, channel_no values in channel_no can be either 1 or 2. I...

SQL Server 7,2000 : T-SQL

SQL PIVOT problem - Hi I'm getting the error message 'Incorrect syntax near PIVOT' when I try the following code as a view SELECT year_,...

Update field in INSERTED inside trigger - Hello, I have a table that constantly has rows inserted, and one of the fields is always empty. I want to create...

SQL Server 2008 : SQL Server 2008 - General

SSIS transferring unprintable characters between systems - We are using SSIS, Transfer SQL Server Objects Task Editor to move data from one SQL Server system to another. A...

SSIS Import - Delimited File with Fields > 8k Characters - Hello all, I'm attempting to import a text delimited file with a few fields that have greater than 8k characters. I'm...

Dynamic SQL Unpivoting and re - Pivoting seems overly complicated... - Hi All, It is fairly common where we work to have a questionnaire output in the form of two tables, one...

How to update data in a table having primary key - foreign key link with another table - Hello, Could someone please tell how can data be updated (refreshed) in one table if the data is refreshed on another...

How can I avoid Eager Spool on my Update Statement which consumes 56% of total cost - Hi Guys, I found my Update Query is getting the usage of Eager Spool, and the temp table (implicit) cost about...

Index Fill Factor - We have a database is isnt performing as it should. A while back I had a database which grew quite...

Email to Mutiple users with different subject i.e Subject variable - Hi, I stuck in a weekly report which i have to send to every user for their access. i want to send...

Using like over charindex to search for pattern - We where using charindex to search for a string as shown below [code="sql"]SELECT * FROM tablename WHERE ( Charindex('47a%$.abc',CAST(columnname AS VARCHAR(MAX)))>0 ) [/code] I am planning...

Email Stop - SQL 2k8? - Hi, Email alert stopped automatically due to as below error messages, what could be reason? The mail could not be sent to...

Pooling:more than one connection to a database - I have a doubt that whether Pooling actually works. I used below query to check the connection to the database from...

Populate object hierarchy in an additional column - Hi, In my database I have a table "ObjectHierarchy" having following columns. ObjectID [Primary Key] ObjectName ParentObjectID [ObjectID from the same table] Now in this...

SSIS package works in BIDS Fails in In SQL AGent and Store - I have a simple SSIS package that uses and odbc connection using a dl4 driver connection. It works fine in...

SQL Query - Hi all, suppose if we have student name, and subjects so we want student name and max marks scored subject...

moving log files - Hi, I'm quite new to this SQL admin stuff. I need to move all the log files(user and system databases) on several...

Cannot start in Single User Mode - For a disaster recovery test we are being required to restore our master database to an alternate server. Several servers have...

Conditional print for testing scripts. - Dear Reader, For testing I want to replace PRINT statements with a procedure call. A Global substitute should replace all 'PRINT' with...

Fuzzy searching - Hello everyone, I'm having trouble finding a way to use fuzzy searching (specifically Levenstein) in my database. For now, I've...

reinitialize subscription cancel - One of our IT staff has accidently initiated a reinitialize subscription on a 150GB database via a VPN link. Anybody...

Update table values if corresponding values change in another table - Hi, I am very new to SQL and really dont know how to phrase my question. There are 2 tables linked...

Alerts for Database Mirroring - Hi I'm trying to get SQL Server to alert me via email when the Primary instance loses connection with Mirrored instance...

A way to shred an XML Deadlock report for easier reading... - I'm not taking credit for this, I just took some code WayneS posted a couple years back here: [url=http://www.sqlservercentral.com/Forums/Topic955603-360-1.aspx]http://www.sqlservercentral.com/Forums/Topic955603-360-1.aspx[/url] and...

general - i have table with name orders and field as order_number,order_amt,order_date,order_customer,order_saleperson i want to write a query that selects all orders save...

SQL Server 2008 : T-SQL (SS2K8)

Find the last 6 Tuesdays or Wed or Whatever day. - I have a sales report that shows the previous days sales. I need to modify to a rolling report that...

Find the first record for each month - I'm trying to pull out the file size and backup size for each database using the msdb backup history table....

Update all but last two rows of each category - I would like to update the complete flag of all the rows of a table except the most recent two...

select or count based on condition - [font="Courier New"]I have a query that returns results similar to this: Name-Order-Item - ItemShipDateTime Joe - O23 - I11 - 2013-07-29 13:05:00 Jim - O24 - I11 - 2013-07-29 13:07:00 Jim...

Handle error record from User Defined Function - Hi, Please let me know if we can handle error record from User defined function. SQL script enclosed with this mail. regards, Kumar.

Select variable based upon sub query - I have the following SQL statement (It's actually MYSQL but the principal is the same ;-) ) that selects all the values...

Change sub query variable based upon sub query - I have the following SQL statement (It's actually MYSQL but the principal is the same ;-) ) that selects all the values...

Detecting ALTER or CREATE PROCEDURE?? - Can't get this working - whinges about ALTER/CREATE statement syntax ?? Help? IF (SELECT count(name) FROM sys.sysobjects WHERE (type = 'P') and name = 'SPNAME')...

Limit when a trigger runs - Is there any way to limit the trigger, so that it only runs when the app is a .Net SqlClient...

When NULL IS NOT NULL - To all my SQL friends out there. While trying to construct a 1M row test harness I ran across an...

CAN ANY ONE WRITE QUERY FOR BELOW DESCRIPTION! - 345 0 Test Lane 0 0, Binder, CA 00002 (MLS ID: PD1LST32) 6 N Training Road 0, Binder, CA 00006 (MLS...

SQL Server 2008 : SQL Server Newbies

Explanation of LIKE '%[0-9]%'? - From time to time I need to check if a column is completely numeric (or usually, check for the row...

Eager Spool - Dear All I am deleting rows from huge table. I am doing it in the batch of 1000 rows. This tables...

SQL Server 2008 : SQL Server 2008 High Availability

Very slow for running Query in Standby database? - Hi. Log shipping setup on of the table total Records count 1228976 in standby database, user have read access and using...

How to find uncommitted transactions in all Replications. - Hi, How to find the uncommitted transactions in Replication. We have replication monitor, but other than that, do we have...

Transactional Replication Sloooow - Hi I have setup transactional replication between two sql 2008 instances and it is very slow in replicating. We have some jobs...

After changing port on a cluster the proper way, default connection without port specified still working - I have a strange issue on a SQL 2008 cluster (non-R2) that I changed the default port on. I went...

Splitting and shrink a Windows Volume without Cluster's downtime? - Ok. Got a quick question, maybe for Perry or whoever can clarify. Got a SQL 2012 failover instance running on Windows 2008...

SQL Server 2008 : SQL Server 2008 Administration

Guidance with shrink and rebuild/reorganise indexes - Hi, I'm not really very offay with database shrinking per se. I know how to do it but there are some...

Alert-tempdb freesapce? - Hi, I had received alert for Tempdb free sapce and reach the below threshold values. I want to know.. Tempdb location and...

Generate job script from existing jobs - We have around 40+ jobs in the server box which hosts 5 DB instances , of which i need to script...

Career : Employers and Employees

Client does not want to pay overtime. How to deal with it ? - I am hourly-paid employee of a consulting company, but work all the time at client site. Sometimes I have to...

Programming : General

Source Control for Mixed RDMS/Dev Environment - Greetings, After doing a search for the topic of "Source Control", I found quite a few answers that focused mostly on...

SQLServerCentral.com : Anything that is NOT about SQL!

Deltek GCS Premier Supporting Database System - I need to create a linked server in SQL 2008 to the dbms we have that support our Deltek GCS...

Who administers the SQL Backups in your company - Recently, our company has decided to go with CommVault as an enterprise backup and archiving solution. As a result, a...

Reporting Services : Reporting Services

Excel found unreadable content - SSRS 2008 Export Issue - Hello - Whenever I export my report to excel and open the downloaded file, I am getting the following error - "Excel...

Data Warehousing : Integration Services

Deltek GCS Premier Supporting Database System (DW) - I need to create a linked server in SQL 2008 to the dbms we have that support our Deltek GCS...

pls help: how to backfill the data since some day - hello, I am very new to SSIS. I just want write a IS package that can integrate the data from source...

Flat File Source -> DB table overwrite in T-SQL 2008R2 - Hello SQLSC, I am extremely new to SQL. As you can tell is my first post on the forum, I have...

Problem with Data source, Pls help me - Hi All, Greetings! I have requirement like, -- We are maintaining queries in a table -- By using single ssis Package we need to...

Data Warehousing : Analysis Services

How to Define a schema for the fact table, and the dimensional tables in SQL from a relational schema? - I am very new to Data warehouse and OLAP, and I dont know how to create OLAP database from a...

DAX - I trying to create a type of inverse filter using DAX. For Ex: [b][u]Filter Table[/u][/b] [u]Column1[/u] A B C If a user filters by A, then...

User defined heirchy levels and Excel Pivot Table - SSAS 2008 R2 Excel 2010 In SSQL Management Studio connected to an SSAS instance i am able to browse a cube. I...

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