Forum Replies Created

Viewing 15 posts - 106 through 120 (of 709 total)

  • Reply To: Explanation of SQL Code

    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...

    • This reply was modified 6 years, 3 months ago by Eddie Wuerch. Reason: formatting

    Eddie Wuerch
    MCM: SQL

  • Reply To: Find Strings Containing Hex Range

    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...

    • This reply was modified 6 years, 3 months ago by Eddie Wuerch. Reason: added more comments to the code

    Eddie Wuerch
    MCM: SQL

  • Reply To: TDE for Always on databases

    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...

    Eddie Wuerch
    MCM: SQL

  • Reply To: EST to IST

    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...

    Eddie Wuerch
    MCM: SQL

  • Reply To: Web page listing SQL code

    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. You can...

    Eddie Wuerch
    MCM: SQL

  • Reply To: Language conversion Japanese to English for MSSQL Server DB

    See SET LANGUAGE for setting the language SQL Server uses for the connection for system messages and month/day names:

    https://docs.microsoft.com/en-us/sql/t-sql/statements/set-language-transact-sql?view=sql-server-ver15

    Instructions for installing an English-language SSMS on a non-English OS are available...

    • This reply was modified 6 years, 5 months ago by Eddie Wuerch. Reason: Original sample I posted was in Japanese, but the code editor barfs on Unicode :P

    Eddie Wuerch
    MCM: SQL

  • Reply To: TDE for one of the database

    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...

    • This reply was modified 6 years, 5 months ago by Eddie Wuerch. Reason: fixed a typo

    Eddie Wuerch
    MCM: SQL

  • Viewing 15 posts - 106 through 120 (of 709 total)