Viewing 15 posts - 106 through 120 (of 700 total)
Looks like a lot of work to build an 8-digit string that means 'yesterday', one date part at a time.
First, it determines what year was yesterday.
The part that sets the...
March 9, 2020 at 7:11 pm
Embed your search argument in a variable, and use that in the function:
-- sample data
CREATE TABLE #Testr(id int not null primary key, MyField varchar(128))
GO
INSERT #Testr(id, MyField)
SELECT...
February 29, 2020 at 10:45 pm
TL;DR: just get the encryption Certificate loaded on every AG instance before encrypting, and it will just work.
TDE encryption is performed as normal transactions against a database. When you perform...
February 21, 2020 at 5:10 pm
In order to protect against DST settings, just run the job 5 minutes past every hour. At the start of the job, check to see if it's the 'correct' time...
February 20, 2020 at 7:50 pm
To format the SQL on-the-fly, search for 'syntax highlighter'. One I've used is the open-source GeSHi tool (https://en.wikipedia.org/wiki/GeSHi), although its T-SQL coloring was last publicly updated a while ago....
January 23, 2020 at 3:33 pm
See SET LANGUAGE for setting the language SQL Server uses for the connection for system messages and month/day names:
Instructions for installing an English-language SSMS on a non-English OS...
December 26, 2019 at 2:13 am
Also, be very protective of that Certificate. You will need it to restore backups of databases encrypted with it. The database backup will not have the Certificate; you must separately...
December 20, 2019 at 7:08 pm
"What happens if the DB is already part of AG and I enable TDE on the DB on primary? How does TDE work in that situation?"
SQL Server encrypts the database...
December 20, 2019 at 7:03 pm
Define the column names of the derived table when specifying the derived table's alias:
SELECT * INTO #TEMP_Entry
FROM (SELECT DISTINCT
...
December 18, 2019 at 9:23 pm
Synology NAS devices support creating and exposing iSCSI LUNs, allowing you to map a local drive or mount a folder to the storage on the device. I have a little...
December 4, 2019 at 5:59 pm
Open transactions at the time of an AG failover experience the same thing as they would when you force the database offline or the server crashes: those transactions will be...
November 29, 2019 at 1:09 am
You can only encrypt a database that exists and is fully recovered. Restore only re-paints the disk pages as it copied them from the source database.
Either encrypt the database before...
November 29, 2019 at 1:05 am
You can't reference Action values in the predicate. Here are the values on which you can filter:
-- What Predicates (fields on which we can filter) are available?
SELECT...
November 29, 2019 at 12:43 am
You can solve this problem in the JOIN clause, by JOINing the tables #minmaxvals and tablea on a range:
/* matches original query, rows that match MinVal and...
November 20, 2019 at 11:20 pm
String manipulation (such as concatenating lots of small strings into a big one) is messy under the covers; avoid when possible.
SQL Server treats carriage returns and line feeds as text...
November 12, 2019 at 5:20 pm
Viewing 15 posts - 106 through 120 (of 700 total)