|
|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
The Backup File Extension | |
I run this command in SQL Server 2022. What is the extension of the backup file?
BACKUP DATABASE HerdofTwo TO DISK = 'HerdOfTwo_20240501' | |
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) |
Two Table Hints What happens when I run this code: SELECT p.ProductName , p.ProductCategory FROM dbo.Product AS p WITH (NOLOCK, TABLOCK); Answer: This returns an error about conflicting hints. Explanation: This returns an error, as you can only have one locking hint in a query. If the hints conflict, you get this error: Msg 1047, Level 15, State 1, Line 4 Conflicting locking hints specified. Ref: Table Hints - https://learn.microsoft.com/en-us/sql/t-sql/queries/hints-transact-sql-table?view=sql-server-ver16#remarks |
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 2017 - Administration |
Data Archival: 1 table (Database A) to 1 table (Database B) - I'm currently in the process of building an archival & reporting solution and just want to run through a bunch of scenarios and determine what would be best in my situation. I can easily achieve this multiple ways but I don't know if this is the "right way" or the "best" method My objective is […] |
Principal owns a service? - This is one I haven't seen before. I'm trying to drop a database user and got the below message. The login doesn't own any roles or schemas or other objects and everything I google on the error comes up with "principal owns a schema" which is not what this error is. When I try googling […] |
Degraded Performance in 2017 vs 2008 R2 with inserts - We're finally upgrading from SQL Server 2008 R2 Enterprise to SQL Server 2017 Standard and have moved our test database to the new server. Both VMs are on similar hardware with 4 vCPUs. Of course, given the chasm of versions we expected much better performance. Unfortunately, that's not the case. Our inserts on the 2008 […] |
SQL Server 2016 - Development and T-SQL |
SQL Server Semantic Search (Find Text in External Files) - Dear community, I am trying to search word documents (docx) for a particular drug name and return the file name of a successful match. I am in the testing phase and with the assistance of Daniel Calbimonte article (link below) I have a better understanding on how to achieve this. The issue I am faced […] |
Slow update on temp table - I have a job running each night starting at 4:30AM and usually finishing at around 6:30AM or shortly thereafter doing some number crunching. Occasionally, this job slows down taking much longer...today it ran until about 8:45AM. This statement, normally would take a second or two...the table is about 250,000 rows with 8 columns...today it took […] |
SQL Server 2019 - Administration |
Backing up and Restoring a 3 terabyte database takes over 5 hours - I have a 3 terabyte database that is taking over 5 hours to backup and restore. I'm utilizing multiple files to do the backup. We are on an Azure VM and backing up to Azure Storage. Just wondering if there is anything else I can do to speed up the backup restore of this database. […] |
Table Partitioning - remove null range - hi guys, I have a partitioned table AM_ITM_INSTNC_MSS and I want to get rid of MYDW_TPData2015 filegroup, how can I achieve that? |
Backup of encrypted databases failing - I've had some backups of my encrypted databases failing with the error "BACKUP 'DBName' detected an error on page (10:12345) in file 'D:\path\DBName_File.ndf' The databases were originally encrypted on a production server and restored to a DEV environment, which may be relevant. All the databases on the DEV server are encrypted, but only two were […] |
SQL Server 2019 - Development |
Create Copy of DB in same server. - Hi I want to create a copy of a DB on the same server. The account that creates the copy DB should NOT be able to read from the original DB but have full rights to the copy DB. Cannot use a snapshot, Changes will be made to the copy and the copy will be […] |
Reporting Services |
SSRS Expression IIF Zero then ... Got #Error - Hello, Need some help for SSRS. The column % expression is =iif(sum(Fields!ColumnA.Value) = 0 or sum(Fields!ColumnB.Value) = 0,0,sum(Fields!ColumnB.Value) / sum(Fields!ColumnA.Value)) But I am getting #Error if ColumnA is zerro and no error if ColumnA and B had no value. Please advise. Thank you. |
Analysis Services |
Issues backing up Analysis Services databases - silent failures - I have a PowerShell script that I use to automate the backup of Analysis Services databases - allows for handling new/dropped databases, dynamic filenames, etc. However, on some occasions the backup fails but no output is reported stating why. I get a success message when it works but nothing when it fails. I've tried adding […] |
Strategies and Ideas |
Do I need a recursive query for this? bill of materials (sort of) - I am working on a data warehouse project for a bakery. For the most part, the basic structure is like this: Purchase--(M,1)--Ingredient--(1,M)--Recipe--(M,1)--Product with one exception the "Recipe" part works fine. (IngredientKey, ProductKey, Weight). The part I'm having trouble with is that one ingredient (starter) consists of other ingredients (kinda like a subassembly, if you wanted […] |
Do I need a recursive query for this? bill of materials (sort of) - I am working on a data warehouse project for a bakery. For the most part, the basic structure is like this: Purchase--(M,1)--Ingredient--(1,M)--Recipe--(M,1)--Product with one exception the "Recipe" part works fine. (IngredientKey, ProductKey, Weight). The part I'm having trouble with is that one ingredient (starter) consists of other ingredients (kinda like a subassembly, if you wanted […] |
Integration Services |
Hardcoded filter vs filter by parameter - I am trying to set a date filter on several large transaction tables to limit the years loaded. When I use a hardcoded filter like: DATEFROMPARTS ( DATEPART(yyyy, GETDATE()) - 4, 1, 1 ) to get running year and previous 4 years the dataflow starts reading data immediately and data is loaded in 10 seconds. […] |
Hardware |
Disk (SCSI) Controllers - Parallel Disk I/O - Hey For SQL Server VMs I use the max number of SCSI controllers supported by the relevant hypervisor. But for the first time in a loooong time I am looking at a physical implementation. The most logical thing I can think of is to have multiple disk controllers and place each SQL disk on a […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |