Using UTF-8 in SQL Server 2016 - sql-server

We are installing a new application, the pre-requisite of which says that your database must be configured to use the UTF-8 character set.
We are currently using SQL Server 2016, enterprise edition.
Our database team mentioned to us that SQL Server doesn't support UTF-8 and have suggested to use nChar and nVarchar datatype for UTF-8 character set support.
I am not a database expert unfortunately. Could someone please help understand what exactly could be done here?

Related

Is that possible to restore a SQL server 2016 backup with different default language?

In our old server we have a MSSQL server 2012 with the German language as its default language. In our new server, we would like to install MSSQL server 2016 with the English language as its default language and then we want to migrate to the new server. Is that possible to restore the sql2012 backup (defualt language: German) on the new Sql server 2016?
I could not find anything against this strategy in Internet, but before buying the ISO file, I would like to be sure if this strategy works.
I appreciate for any help.
Despite SQL Server supports all languages that are supported by Windows operating systems, localized versions of SQL Server can only be upgraded to localized versions of the same language, and cannot be upgraded to the English-language version. Visit https://learn.microsoft.com/en-us/sql/sql-server/install/local-language-versions-in-sql-server?view=sql-server-ver16. This is why I was concerning if restoring a database in a different language of sql server is possible and then I asked this question here.
As I tested this senario, I could create a backup using DE Sql server 2012 and then restore it in En SQL server 2016 (both standard edition). Upgrading the database version was also successful. I wanted to share the result here, perhaps this may help some one at future.

Equivalent to Oracle Data Masking in SQL Server?

I used to work with Oracle ETL/database tools and now I have transferred to a Microsoft working environment. In Oracle SQL Developer there was a feature named Data Masking which would mask selected column values with *** characters. Is this also possible with Microsoft SQL Server 2016?
As others commented, you are probably looking for Dynamic Data Masking which is available in all versions of SQL Server 2016 SP1, even Express and the embedded LocalDB. The equivalent in Oracle is Data Redaction
You'll find a nice overview in Use Dynamic Data Masking to obfuscate your sensitive data

SQL Linked Server to UTF-8 database

I am trying to create a linked server from SQL Server 2008 R2 to an SAP IQ database, which has the UTF-8 Charset.
I am unable to get the correct characterset viewable on queries using this linked server.
I have tried everything, using native OLE DB provider of SAP IQ, using ODBC connectivity, playing with different connection strings, but my major concern is that it's impossible because SQL Server does not support UTF-8.
Correct characters when viewing in Interactive SQL:
Messed up characters in SQL Management Studio:
Any thoughts?
Finally solved it, after a few hours of debugging. :)
You have to use an ODBC connection, with the CharSet parameter set to 'windows-1252'. Then it works perfectly.

Microsoft SQL server 2008 and UTF-8

A colleague tells me that there is no way to bulk insert UTF-8 encoded data into a Microsoft SQL server 2008.
Can this be true? Is there any stuff you would recommend him to read or look at?
UTF-8 isn't a part of SQL Server's Unicode strategy (unfortunately). However, UTF-8 is well supported in .NET. If you are willing to write .NET code, you could use the System.Data.SqlClient.SqlBulkCopy class in conjunction with a System.IO.StreamReader and/or `System.Text.Encoding.UTF8'.
Another option is Integration Services. For file connections, you can choose code page 65001 (UTF-8).
It is true. The documentation for BULK INSERT says 'SQL Server [2008] does not support code page 65001 (UTF-8 encoding)'.
There was once a Microsoft Connect Page about this issue, but Connect is now gone.

Client collation and SQL Server 2005

We're upgrading an existing program from Win2k/SQL Server 2k to Windows 2003 and SQL Server 2005 as well as purchasing a new program that also uses 2k3/2k5. The vendor says that for us to host both databases we need to get the Enterprise version because the softwares clients use different collation for the connections and only Enterprise supports this.
I cannot find anything on MS's site to support this and, honestly, don't want to pay the extra for Enterprise if the Standard edition works. Am I missing some not talked about feature of SQL Server or is this, as I suspect, a vendor trying to upsell me?
All editions of SQL Server 2000/2005/2008 support having multiple databases, each using their own collation sequence. You don't need the Enterprise version.
When you have a database that uses a collation sequence that is different from default collation for the database server, you will need to take some extra precautions if you use temporary tables and/or table variables. Temp tables/variables live in the tempdb database, which uses the collation seqyuence used by by the master databases. Just remember to use "COLLATE database_default" when defining character fields in the temp tables/variables. I blogged about that not too long ago, if you want some more details.

Resources