In this issue

Featured Contents

Editorial

Featured Script

 
 advertisement
 
SQL Backup Hosted 5GB free hosted storage with SQL Backup Pro
Download SQL Backup Pro and securely copy your backups to secure hosted storage. You’ll get your first 5GB of storage free. Try it now.
 
Deployment Manager How to automate your .NET and SQL Server deployments
Deploy .NET code and SQL Server databases in a single repeatable process with Red Gate Deployment Manager. Start deploying with a 28-day trial.
 
SQL DBA Bundle Top 5 hard-earned Lessons of a DBA
New! Part 4, ‘Disturbing Development’ by Grant Fritchey, features the return of Joe Deebeeay and a server-threatening encounter with ORMs - read it here.

In This Issue

How Maintenance Plans are a Big Plus for SQL Server Administration

SQL Server 2012 makes your database maintenance jobs easy by proving an effective Maintenance Plan Wizard. This wizard does a fair job of creating core maintenance plans for your database. More »


SQLServerCentral Hosts AdventureWorks on Azure

SQLServerCentral and Red Gate software have agreed to host the AdventureWorks database on the Azure platform and give free access to anyone that wants to practice querying it. More »


Connecting to AdventureWorks on Azure

A quick guide for connecting to our free copy of AdventureWorks on the Azure platform. More »


Azure SQL Database Maintenance

It is increasingly likely that DBAs are now given responsibility for maintaining Azure SQL databases as well as conventional SQL Server databases. What is likely to be required by way of maintenence? What are the differences? Grant Fritchey covers what you need to know. More »


From the SQLServerCentral Blogs - Roll Logs – Backup Recovery

Rolling log files for a day, especially with 15 or even 5 minute log backups is a pain at best.... More »


Editorial - Morphing Microsoft

Microsoft is trying to change from a software vendor to a devices and services company? They are trying, according to this piece from Mary Jo Foley. With a Developer and Platform Evangelism group that is trying to bridge the gap between internal Microsoft developers and those external professionals in the real world, it appears this group will try to provide more code, samples, and frameworks that others can use. Perhaps they will even give us strong architectural examples that stand up to the real world. 

Personally I'd like to see them disclose code that works in real situations. Give us the code behind MSDN or the Microsoft Store. Prove to us you have code that not only works, but it written to meet your standards and needs. If you want to start with something that's not open to the Internet because of security concerns, how about showing us how one of the internal MS systems really works? Maybe the annual employee review app? 

If the code isn't enterprise ready, or of the quality that should be used as an example, why not? I know there are the same pressures building systems at Microsoft that many of us face, but if that's the case, I'd hope Microsoft would tackle some of those issues in their tooling and platforms. They could then show us not only how to do things, but prove it can be done as well.

I do think there is some truth to the fact that in many of the applications we build, the platform developers use is not just be the OS and local APIs. There is a richness gained by including data from services, data that exists outside of the organization. Whether that's on the open web or from business partners, we need architectures that help us build applications that can survive some workload burst, tolerate individual machine failures, and do so at a reasonable cost. That doesn't necessarily mean cloud services to me, but it does me better software patterns, practices, and models for developers.

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

I create the following two (2) tables , and insert the data as shown.

CREATE TABLE t1(x INT,A INT IDENTITY(1,1)); 

INSERT INTO t1 VALUES (10),(20),(4),(20),(10);

CREATE TABLE t2(y INT,B INT IDENTITY(15,15) PRIMARY KEY);

INSERT INTO t2 VALUES (1),(20),(3);

I then execute the following T-SQL statenent

SELECT x AS 'Answer' FROM t1 EXCEPT SELECT y FROM t2

The question is: How many rows are returned by the SELECT statment ?

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

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

CREATE TABLE [dbo].[test]
(
      [ID] [int] IDENTITY(1,1) NOT NULL,
      [PK_col] [int] PRIMARY KEY,
      [Col1] [int] NULL,
      [Col2] [int] NULL,
      [Col3]  AS ([col1]+[col2])
)

SELECT *
 INTO TEST1
FROM TEST

---Statement1
INSERT INTO test
VALUES (1,2,3)

---Statement2
INSERT INTO TEST1
VALUES (1,2,3)

What will be output of these two statements?

Answer: Statement 1 will executes successfully but Statement 2 will throw an error

Explanation: When a computed column is included in the select list, the corresponding column in the new table is not a computed column. Indexes, constraints, and triggers defined in the source table are not transferred to the new table, while new table inherits the IDENTITY property.

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

» Discuss this question and answer on the forums

SQL Server 2012 Data Integration Recipes

SQL Server 2012 Data Integration Recipes provides focused and practical solutions to real world problems of data integration. Need to import data into SQL Server from an outside source? Need to export data and send it to another system? SQL Server 2012 Data Integration Recipes has your back. You'll find solutions for importing from Microsoft Office data stores such as Excel and Access, from text files such as CSV files, from XML, from other database brands such as Oracle and MySQL, and even from other SQL Server databases. You'll learn techniques for managing metadata, transforming data to meet the needs of the target system, handling exceptions and errors, and much more.

Get your copy from Amazon today.


Featured Script

How to Backup All SQL Server Databases

How to backup all SQL Server databases at once. 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

Order of joins - Which one is better? - Seems like order of joins completely changes the execution plan. In my first query ,i am joining on a column...

Add User Mapping not working - I'm trying to add a user mapping to an already existing login. In the Login Properties for the login, I...

.mdf question - hi all, In my database i want to create new *.mdf file and i want to transfer selected tables frmo old...

some sql dba question - 1. SP1 version number like (2047) 2. How many type of mirroring 3. Difference between transaction replication and merge replication 4. If your database primary...

SQL Server 2005 : Development

Android Development - Hi, i am newbie to Andorid development .. suggest me good material to this journey thanks

SQL Server 2005 : SQL Server 2005 Performance Tuning

One interviewer asked me this following question - Hi, One interviewer asked me this following question. A 200 lines stored procedure working fine till yesterday, but today morning it is...

SQL Server 2005 : SQL Server 2005 Integration Services

no matter how large the destination column eg. nvarchar(max), excel source choke on column - I'm using VS2010 BIDS, importing from Excel 97-2003 .xls worksheet. I've got the following config: Excel Source -> Conversion Split Transform...

SQL Server 2005 : T-SQL (SS2K5)

How to count active jobs at the end of each month across a period of time - My apologies if this question has been answered elsewhere but I can’t find a solution. I need to count the...

OPENROWSET() Intermittently Fails to Read Excel File - I've had this problem a number of times: every so often, I receive errors like this when trying to query...

Problem With Linked Server - I created a Linked Server Object with Sql Authentication to connect to another server. I am executing this some time well,...

SQL Server 7,2000 : Administration

SQL Exception: Timeout - We have a web application manufactured by a company that no longer exists. I'm running the front end on a...

view the data from the sysmail_sentitems and sysmail_unsentitems and sysmail_faileditems without giving sysadmin role MSDB databasse - sysmail_sentitems sysmail_unsentitems sysmail_faileditems these are the views in msdb and without giving sysadmin role MSDB databasse, how to access the data???? Plzz help...

SQL SERVER services get stopped - Hi, Everyday we notice SQL SERVER services get stopped and we have to manually then start both services and agent.We...

Cannot Kill Process stays in KILLED/ROLLBACK status - Hi I have killed one spid bu its still showing this KILLED/ROLLBACK status Sugest me to resolve this with out restating...

Profiler Questions - I am battling with profiler trying to trace all select, insert, delete, and updates against a specific table.  I have...

SQL Server 7,2000 : General

Newbie Question - Sorry for this newbie question, but what is the best way to push out data from a development server to...

SQL Server 2008 : SQL Server 2008 - General

How to select max based on condition. - Hi Friends, I want to select maximum date data based on some condition i.e. if alloc_dt column has value for c_id, then...

msdb acronym? - Seeking pointless trivia & failing to find it; is the acronym of msdb known? I can't recall seeing/hearing it in books/videos...

snapshot agent is not running - Hi, Friends I am working on sql server 2008 r2 and I want to replicate data by using snapshot replication, when...

Conversion varchar value overflowed an int column in sql server - Hi All, I get the error above when trying to update a table. UPDATE Table1 SET Field1='XYZ', WHere Field2='8880348233' Field2 is Varchar(25) I know...

Update values for dynamic columns - I've been looking at dynamic SQL update statements and have been trying to tailor one specific to what I need. I...

Best way to find certain records. - I have to find certain data from a table based on date range & and activity. So, if a records is 60...

space issue - We donot have space in database ,and the disk is fulled because of mdf's . how to release space on the...

Could not allocate space for object because the 'PRIMARY' filegroup is full - I have a SQL Server 2008 running on Windows 2008. The main database is located on the D: drive and...

SQL Alert question - I thought the SQL alert are trigged when SQL Agent found error message in SQL Error log.But when i diabled...

Questions about SSRS in 2008 - Hi guys, Here are my questions about SSRS 2008? 1-Is it possbile to add Notification email to the reports that has been...

SQL Server 2008 : T-SQL (SS2K8)

sqlCursor - Hi,all. I am beginner of learning sql cursor. Can someone help me to edit the following sql statement. I would...

SQL Server 2008 : SQL Server Newbies

Counting duplicates - newbie question I am trying to count the number of diabetic patients who have had their blood pressure checked twice or...

SQL Server 2008 : SQL Server 2008 Administration

Moving System Databases - Is it safe to move the system databases (excl TEMPDB in this question) to another location from the default install...

Automated audit of all SQL Servers over multiple domains - I recently joined a company that has merged with another. Both companies had Enterpise licensing and seem to have set...

help out for some questions in the mirroring , replication - HI All I need to test the following things , then i need to implement. Questions: 1) can i do the mirroring aaaand replication...

Career : Certification

70-462: Can the Hyper-V environment be downloaded somewhere? - Hi all, When I just opened the 70-462 TK I saw a six server Hyper-V environment is neccesary to complete the...

Career : Employers and Employees

Dilemma between Microsoft BI developer or Application Developer - I am stuck in a dilemma; at my workplace I have to choose my career track between as Microsoft BI...

Programming : General

Best way to implement transactions in a procedure with If statements - Hello, I'm writing a complex stored procudere with a lot of IF statements, inside of each IF statement is an...

Programming : XML

sp_xml_preparedocument does not recognize validated xml variable - Can anyone help I am trying to Shred a XML document into a data table in SQL Server.I am using...

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

Reporting Services : Reporting Services

SSRS Interview Questions - Hi Guys, Can anyone please respond to below interview questions, I need some understanding. I tried to google it but no-luck...