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

A Sad Story about Upgrading to Windows 10

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

This is a sad story about a guy that didn’t do backups. It involves his personal computer, which was running fine with Window 8.1. He saw that he could upgrade it for free to Windows 10.  What did his wife say? “Make sure all my pictures don’t get lost from the upgrade,” was her one request. This was the first warning he should have taken to heart and right then and there copied those pictures to the backup external hard drive. 

Sadly he didn’t and went on blindly thinking, “What could possible go wrong with a Windows upgrade?” He also assumed he had backed up the pictures not too long ago. The truth was it had been over a year since he had backed up her pictures to the external hard drive. The computer had a RAID1 array, but no backups had been done of the computer itself.

Here is what went wrong.  He didn’t realize that during the Windows 10 upgrade you are allowed to login, but the login was with a temporary user that later got deleted. What he did notice was that all the pictures were gone. He panicked, but found them in the windows.old folder. Instead of copying the pictures to the backup external drive he moved them into the temporary profile. If this guy would have just copied them to the temporary profile things would have been fine.

Of course, it gets worse. So the next time he logs in the pictures are gone again. The temporary profile was deleted along with all the picture he moved to that profile. This time he used a shadow drive program to find the deleted pictures. Sadly again he didn’t copy them to the backup external hard drive; he just copied them on to the existing hard drive. This, of course, further corrupts the very pictures he was trying to recover.

You can imagine this guy’s wife was very upset since the pictures were gone. So what can we learn from this story? First backup important stuff. When you don’t and bad things happen take the opportunity to back them up then. Second, take time to think through what you are doing in an emergency situation. Don’t rush into a solution that just makes things worse.

Currently this guy has bought some custom software to scan the hard drive to try and recover any pictures that have not been corrupted. You can imagine it isn’t going well and his wife is still upset.

Please feel free to share your backup or upgrade to Windows 10 horror story.

Ben Kubicek from SQLServerCentral.com

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

ADVERTISEMENT
SQL Compare

Once Upon a Time in Compareland…

Jack spent two days manually checking his database upgrade script for mistakes. Then his boss sent him the license key to their newly purchased SQL Compare. “It’s so fast” he sobbed as tears of joy quietly plopped into his beer at 6, hours before he thought he’d be able to leave the office that night. Read more about SQL Compare.

DLM Patterns & Practices

Library of articles for Database Lifecycle Management

Discover a collection of articles covering important checkpoints on the journey of database lifecycle management - including team processes, version control and release management. Find out more on Simple-Talk.

SQL Search

How do you search your database schema?

"I use SQL Search regularly and think it's great." Gregor Suttie, Senior Software Engineer, Pulsion Technology. Download Red Gate SQL Search while it's free.

Featured Contents

 

How to execute an SSIS package from the command line or a batch file

Stan Kulp from SQLServerCentral.com

An SSIS package that is executed on an ad hoc basis can be run from Business Intelligence Development Studio easily enough, but a package that is going to be run on a regular schedule is best executed through a batch file using the DTExec.exe command line utility. More »


 

Releasing Databases in VSTS with Redgate SQL CI and Octopus Deploy

Additional Articles from SimpleTalk

You can still do Database Lifecycle Management (DLM) workflows in the hosted version of Team foundation Server (TFS) in Visual Studio Team Services (VSTS) . If you are doing your database development in SSMS, you can use a mix of tools to set up the functionality in VSTS. Jason Crease demonstrates how to build and deploy a simple database into the test environment using SQL CI, SQL Source Control, Octopus Deploy, tSQLt, SQL Cop and SQL Release, all with the minimum of hassle and effort. More »


 

From the SQLServerCentral Blogs - Excel Tip #30: Excel Services Visual Limitations – Displaying Images

DataOnWheels from SQLServerCentral Blogs

As I mentioned in my original post, Exploring Excel 2013 as Microsoft’s BI Client, I will be posting tips regularly... More »


 

From the SQLServerCentral Blogs - Consider removing the NON EMPTY key word from the COLUMNS axis

Sherry Li's BI Corner from SQLServerCentral Blogs

You might have seen error message like this from a SQL job that pulls data from an OLAP cube using... More »

Question of the Day

Today's Question (by Steve Jones):

I am looking to write a script that performs an action based on the database collation. How should I structure my IF statement inside the parenthesis?

 IF () = 'SQL_Latin1_General_CP1_CI_AS' BEGIN -- do some work END 

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

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

ADVERTISEMENT

SQL Server Hardware will provide the fundamental knowledge and resources you need to make intelligent decisions about choice, and optimal installation and configuration, of SQL Server hardware, operating system and the SQL Server RDBMS.

Pick up your copy of this great book from MVP Glenn Berry at Amazon today.

Yesterday's Question of the Day

Yesterday's Question (by Carlo Romagnano):

What's the order of values of the last select?

 DECLARE @T TABLE(i INT NULL) INSERT @T SELECT -1 AS i UNION ALL SELECT NULL UNION ALL SELECT 0 UNION ALL SELECT 1 ORDER BY i DESC -- what's the order? SELECT * FROM @T ORDER BY i 

Answer: NULL,-1,0,1

Explanation:

NULL,-1,0,1 is the correct answer. Directly from BOL for ORDER BY clause:


ASC | DESC
    Null values are treated as the lowest possible values.


https://msdn.microsoft.com/en-us/library/ms188385%28v=sql.120%29.aspx


» Discuss this question and answer on the forums

Featured Script

Part 1 -- Restore a database to another instance...

Haden Kingsland (theflyingdba) from SQLServerCentral.com


This sproc MUST be created in the destination instance for the restore, so that all related users can be killed off and an exclusive lock put on the database to be overwritten by the restore.

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 2014 : Administration - SQL Server 2014

SQL Service Account (Local or network or domain) ? - Hi, I have installed SQL Server 2012 on standalone server. Please let me know which under which account (domain admin / domain/...

Table Using up Much More Space When Transferring to New FileGroup - I have a database on SQL Server 2014 SP1 CU5 with .mdf that is about 1.45 TB. I found one...

roughly :Server groups or single server and database groups - Hey folks, I know this topic might sound rough , but I though this could open up a great discussion about...

How to Move MS SQL Cluster to Standalone - Hi We need to move MS SQL Cluster to Standalone SQL Server, what are the steps we need to follow & how...

Default constraints OR INSERT trigger for Audit columns (create date time/user) - Which is the best practice to implement in audit columns for create datetime and create user, INSERT trigger or default...

The distribution agent failed to create temporary files in 'C:\Program Files\Microsoft SQL Server\120\COM' directory. System returned errorcode 5. - Hi Publisher: SQL 2008 Distributor: upgraded from SQL 2012 to SQL 2014 Subscribers: SQL 2008 / 2012 Current error on transactional replication: The distribution...


SQL Server 2012 : SQL 2012 - General

Unable to start SQLAgent - MSDB is Read-Only - I am unable to start the SQLAgent service. It is reporting that MSDB is read-only. I have checked in SQL...

Comparing data from two database for a list of selected tables more than 400 out of 1000+ tables - Comparing db schema is easy using VS 2013 and up versions and we can compare two databases without any problem....

Bit of a "Newbie" question. Compare and join databases. - Hello all, greetings from a cold-winter Sweden. I have a problem that i need help with, tried to seach the forum...


SQL Server 2008 : SQL Server 2008 - General

story went global people from all over - [url=https://reddit.com/4a9fml/]Good Sam 500 Live Streaming[/url]

Single Sign On between Forests - We have a W2k8r2 forest. One rootdomain, local.com, and 2 child domains, child1.local.com and child2.local.com. About 400 Windows 7 clients. We...

Move to new row - I'm having issue to move data to new row for my txt output. sample data resultA resultB resultC resultD chicago ID123 20pax ID123 austria...


SQL Server 2008 : SQL Server 2008 Administration

Index rebuild Job - Hi All, We have an index rebuild job running over night, unfortunately it fails many time due to activity on system...


SQL Server 2008 : SQL Server 2008 Performance Tuning

Changing data type to optimize performance - Hi All, I have read many articles recommending use of varchar instead on nvarchar as first one only reserves the amount...

How minimice the transaction log file growth during maintenance plain - Hello, I have a database with the recovery mode defined as FULL. I have defined a index maintenance plain to run...


Data Warehousing : PowerPivot

PowerBI Desktop - CALENDAR() function - I have a working PBIX file that looks at symptom data over time, and I was trying to do the...


Database Design : Design Ideas and Questions

Tagging Data for Searches - Heya All, [b]Requirement:[/b] Data is accessed by users from different organisations. Users will enter a text used search to find relevant data....


SQL Server 2005 : Administering

Comparing multiple SQL databases - Hi there, I'm not sure if I posted this question in the correct forum, but here it is : I have multiple...


SQL Server 7,2000 : T-SQL

10 digit random unique alpha-numeric number - Hi How to generate 10 digit random unique alpha-numeric string in sql server 2000? Thanks in advance.


Career : Certification

70-462 Exam Practice Lab Ex. 5 Page 50 - Dear all, I'm doing the practice exercises from 70-462 Exam Training Kit book. Currently I'm stuck at exercise 5 from page...

This email has been sent to [email protected]. To be removed from this list, please click here.
If you have any problems leaving the list, please contact the [email protected].
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 ©2015 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
Contact: [email protected]