|
|
|
|
|
|
|
| Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
OPENQUERY Flexibility | |
| Which of these are valid OPENQUERY() uses? | |
Think you know the answer? Click here, and find out if you are right. | |
| Yesterday's Question of the Day (by Steve Jones - SSC Editor) |
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 Answer: This restore the database from the old backup, over the top of the existing database Explanation: There is no warning with REPLACE. The database is overwritten by the restore. Ref: RESTORE - https://learn.microsoft.com/en-us/sql/t-sql/statements/restore-statements-transact-sql?view=sql-server-ver17 |
| 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 2019 - Administration |
| Can an Azure App Service Managed Identity be used for SQL Login? - I'm fairly certain I know the answer to this from digging into it yesterday, but would like a second opinion. We're (finally) moving some applications to cloud-native, using Azure App Services and the developer would like to, if possible, use a Managed Identity and Key Vault for the application to connect to the SQL Server […] |
| Ola Hallengren Index Optimize Maintenance can we have data compression = page - I have a quick question on Ola Hallengren Index Optimize Maintenance . Do we have data_compression = page ? I have checked online and see @DataCompression = 'Page' --please add this line for IndexOptimize script . Not sure if it is true or not so checking with the experts. |
| SQL Server 2019 - Development |
| how to write this query? - hi everyone I am not sure how to write the query that will produce the expected results. Basically, I need to convert data found in columns and put them into rows. I have provided sample data and screenshot of expected result. Can someone please help me with this? Thank you Sample Data drop table if […] |
| how do i map the "current" object entry in for each to one variable - hi, in an ssis for each loop over an object variable called MyListVariable, i am trying to map the current list entry to a single variable called FileName. The evidence suggest i'm not doing this right as FileName isnt changing inside the loop. I set the name property in the flat file connector of a […] |
| SQL Azure - Administration |
| Azure Synapse database refresh - Hi Team, I am trying to refresh the Azure Synapse Dedicated pool from production to lower environment. Is there a standard documented process which we can follow similar to Azure SQL database. I have searched in various forums but none of them were worked in our environment due to policy restrictions. Please do the needful. […] |
| Azure SQL Database | CREATE EVENT SESSION [Blocking_Capture] ON DATABASE - Hello, Is there a way in Azure SQL Database to change the 'Blocking Process Threshold' like you can do in SQL Managed Instance? I tried but couldn't find anything that works. sp_configure is not supported. It seems to have a default of 20 or 30 seconds before logging a 'block'. Wanted to change it to […] |
| Editorials |
| Rollback vs. Roll Forward - Comments posted to this topic are about the item Rollback vs. Roll Forward |
| Having a Little Fun at SQL Server Central - Comments posted to this topic are about the item Having a Little Fun at SQL Server Central |
| Article Discussions by Author |
| Foreign Keys - Foes or Friend? - Comments posted to this topic are about the item Foreign Keys - Foes or Friend? |
| Fun with JSON I - Comments posted to this topic are about the item Fun with JSON I |
| A Quick Restore - Comments posted to this topic are about the item A Quick Restore |
| Guarding Against SQL Injection at the Database Layer (SQL Server) - Comments posted to this topic are about the item Guarding Against SQL Injection at the Database Layer (SQL Server) |
| Designing SQL Server Pipelines That Are Ready for AI Before You Actually Need AI - Comments posted to this topic are about the item Designing SQL Server Pipelines That Are Ready for AI Before You Actually Need AI |
| String Similarity I - Comments posted to this topic are about the item String Similarity I |
| SQL Server 2022 - Development |
| Simulating Mercury’s Orbital Motion Using Pure T-SQL (NASA 2025 Dataset) - SQL Server is typically viewed as a transactional or analytical database engine. However, it is also a deterministic numerical computation environment capable of handling large-scale scientific data. This article demonstrates how Microsoft SQL Server can: Store astronomical datasets Compute derived physical quantities Reconstruct velocity from an algebraic invariant Compare simulation results against real observational data […] |
| |
| ©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |