The Scary DBA

Blog Post

Two Clustered Indexes?

Everyone knows that you only get a single clustered index, right? Wouldn’t it be great though if you could have two clustered indexes? Well, you can. Sort of. Let’s...

2022-01-31 (first published: )

447 reads

Blog Post

Why Is “WHERE 1=0” Slow?

I saw a question the other day, questioning why they’re creation of temporary tables was so slow. What they were doing was (a much more complicated version of) this:...

2022-01-24 (first published: )

898 reads

Blog Post

Identifying Recompile Causes

Strictly speaking, a recompile isn’t really a performance tuning problem. In fact, a lot of time, recompiles are desired because they reflect changes in statistics which are likely to...

2022-01-12 (first published: )

280 reads

Blog Post

Login Timeouts

I was recently approached at work about a company that was seeing tons of timeouts in SQL Server. I was asked how to troubleshoot this. There are lots of...

2021-10-06 (first published: )

579 reads

Blog Post

Login Timeouts

I was recently approached at work about a company that was seeing tons of timeouts in SQL Server. I was asked how to troubleshoot this. There are lots of...

2021-09-27

5 reads

Blog Post

Containers: A Short Rant

I find myself doing more and more work with containers. Yet, I also find that a lot of people seem to be resistant to the concept. I’m always surprised...

2021-09-29 (first published: )

482 reads

Blogs

AI: Blog a Day – Day 8: RAG – Retrieval Augmented Generation

By

RAG — Retrieval Augmented Generation. we have covered so far — embeddings, vectors, vector...

AI: Blog a Day – Day 7: Vector and Vector Databases

By

Continuing from Day 6 we learned Embeddings, Semantic Search and Checks, on Day 7...

AI: Blog a Day – Day 6: Embeddings – How AI Understands

By

Continuing from Day 5 where we covered notebooks, HuggingFace and fine tuning AI now...

Read the latest Blogs

Forums

Not Just an Upgrade

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Not Just an Upgrade

Restoring On Top I

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Restoring On Top I

Designing Delta Tables with Liquid Clustering: Real-World Patterns for Data Engineers

By mehul.bhuva@gmail.com

Comments posted to this topic are about the item Designing Delta Tables with Liquid...

Visit the forum

Question of the Day

Restoring On Top I

I am doing development work on a database and want to keep a backup so I can reset my database. I make some changes and want to restore over top of my changes. When I run this code, what happens?

USE Master
BACKUP DATABASE DNRTest TO DISK = 'dnrtest.bak'
GO

USE DNRTest
GO
CREATE TABLE MyTest(myid INT)
GO
USE master
RESTORE DATABASE DNRTest FROM DISK = 'dnrtest.bak' WITH REPLACE

See possible answers