If you have access to DNS you can create a CNAME, or alias, with the name you want and point it to your server. If you don't have access to DNS you could also add an entry to your "Hosts" file on the server which will create the same kind of redirect as DNS only locally. If you decide to use a Hosts file make sure you document it well so in the ...
I don't think there's much specific variance on why to use one over the other, as far as SQL Server is concerned, rather they're just multiple options to accomplish the same thing. Likely it just depends on which drivers you have installed on the host server to your SQL instance, so not all of those options may always be applicable.
Additionally, the ...
The issue you're running into is you have the same CustomerId ordering on the same OrderDate multiple times, so the COUNT() function will be inclusive of dupe dates.
You can simply use the DISTINCT keyword inside the aggregate COUNT() method to minimally change your existing query like so:
SELECT MAX(c.FirstName) as FirstName, COUNT(DISTINCT o.OrderDate) as ...
The reason why you can see incorect result is that COUNT(o.OrderDate) returns number of rows where o.OrderDate is not null. While you are looking for distinct values. You may use code as per below, but I think that there should be an easier way (with one of the window functions)
with CTE AS
SELECT Distinct c.FirstName as FirstName,
Some great advice above, but just a quick question before you do anything drastic - is the 92GB you quoted the size of the transaction log file, or is that the amount of space that is in use within a larger file?
If only a few GB is in use within the transaction log then the transaction log backup will be a lot smaller than you might be expecting.
Also you ...
Assuming this is a standalone instance and the database isn't part of an AG, you should be able to abandon the current log chain and start over, by:
switch to simple recovery model
run CHECKPOINT; twice
DBCC SHRINKFILE(filename, 1);
ALTER DATABASE db MODIFY FILE(name = filename, size = <some appropriate size>);
I usually do this in multiple steps if ...
No, there is no concept of a "partial transaction log backup".
Do you need to maintain the transaction log chain for restores, or otherwise hold on to the 92GB of transaction log backups?
If you want to just get rid of it & start over, and can confidently say "I don't need to do point in time recovery to a point in time before now!" ...
No, you can't do partial log backups to split this work into multiple files.
What you can do depends on your goals.
If you need to maintain the log backup chain, your only option is to provision more storage (locally, or via a network share) and do a complete log backup
If you don't need to maintain the log backup chain, and your goal is simply to get this ...
Possible? Yes. A good idea? Perhaps not.
Here is one possible way to use a calculated column to facilitate placing rows onto individual partitions based on a composite value.
Do this in tempdb, so we don't inadvertently clobber your work:
DROP TABLE dbo.Units;
DROP PARTITION SCHEME units_ps;
DROP PARTITION FUNCTION units_pf;
Create the ...
Turns out that the stats were bad-ish...
If I run:
SELECT o.name as tablename, s.name as statsname, s.stats_id, sp.object_id, sp.stats_id, sp.step_number, sp.range_high_key, cast(sp.range_rows as bigint) as range_rows, cast(sp.equal_rows as bigint) as equal_rows, cast(sp.distinct_range_rows as bigint) as distinct_range_rows
, cast(sp.average_range_rows as ...
Short answer to your questions:
See above (this doesn't happen, because of above)
But there are exceptions:
The client app can have defined a timeout less then indefinite, meaning it will send an "abort" (formally called "attention") on the TDS protocol after that many seconds. SQL Server receives the attention signal and ...
It's anybody's guess why the UI is preventing you from being able to use the copy-only checkbox. So I can't give you an answer and don't think it would be productive to throw out guesses. I can offer a workaround (and generally, this is a better way to accomplish just about anything a pointy-clicky UI tries to do for you):
Press the Script button
Copy the ...
This link should answer your question:
There is no max memory size for memory-optimized tables, but that doesn't mean you can't "run out of memory", based on the Edition you're running.
Bottom line is that if you are running ...
The JSON you asked for is not valid. However, it looks like you may want a pretty similar JSON
"B": [1628424359816, 35]
"A": [1628424359816, 1]
"B": [1628424380816, 63]
"A": [1628424380816, 1]
For this, you can ...
Unfortunately not. This information comes from the sys.dm_os_ring_buffers DMV, where it uses the RING_BUFFER_SCHEDULER_MONITOR record type. This information is produced every minute, and that is not customizable. I.e., it isn't the reports "fault", it is the information that is lacking in the first place.
Below is the query that this report is ...