What is meant by Hostname and Application in SQL Server Profiler - sql-server

Now I am trying SQL Server Profile. There new trace has been created and filter- TextData like 'select%'. It is running fine with output saved on SQL table.
I got required query. Beside I notice some rows have random alpha-numeric for ApplicationName and HostName(same data are given). Google explains like
what meant by those columns?
why this columns are used?
But my question is:
why random alpha-numeric exist for ApplicationName and HostName?
select distinct top 5 ApplicationName,HostName from UploadDocInsert
order by ApplicationName
ApplicationName HostName
NULL NULL -- Trace start event
00apymnvw4 aipjkkic0q
00db67a5h5 1fztcmcn5i
00doj84va4 st0mjhfqh0
00kob4z7lf i7p379kbdb
Edit 1:
select ##version
Microsoft SQL Server 2019 (RTM) - 15.0.2000.5 (X64)
Sep 24 2019 13:48:23
Copyright (C) 2019 Microsoft Corporation
Express Edition (64-bit) on Linux (Ubuntu 18.04.3 LTS) <X64>
Note: This SQL Server is installed on Linux server.

Related

Why does SELECT ##VERSION return previous version after installing new SQL Server

First I installed SQL Server 2012 for learning. Because it doesn't take too much memory.
But later I need a SQL Server for development so I installed the latest version of SQL Server 2019 Developer edition.
After installation, I check the version of SQL Server in SSMS using
SELECT ##VERSION
and I get:
Microsoft SQL Server 2012 - 11.0.2100.60 (X64) Feb 10 2012 19:39:15
Copyright (c) Microsoft Corporation
Enterprise Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200:)
I don't know how to fix this.
If you already had SQL Server 2012 installed, then the SQL Server 2019 Developer edition wasn't installed as the "default, unnamed" instance - since there can only ever be one of those.
So when you installed SQL Server 2019, you must have chosen an instance name - use that instance name when connecting, e.g. use .\INSTANCE or (local)\INSTANCE to connect to the new version of SQL Server installed

SQL Server FORMAT with culture parameter not working

I am using SQL Server 2017 and try to use culture in the Format function. When running this Query on the server the result is incorrect:
SELECT ##VERSION --> Microsoft SQL Server 2017 (RTM-CU17) (KB4515579) - 14.0.3238.1 (X64) Sep 13 2019 15:49:57 Copyright (C) 2017 Microsoft Corporation Enterprise Edition (64-bit) on Windows Server 2012 R2 Standard 6.3 <X64
SELECT FORMAT(SYSDATETIME(), N'Y', 'fa'); --> February 2020
But when running this in another server with SQL server 2017 the script works fine:
SELECT ##VERSION --> Microsoft SQL Server 2017 (RTM-CU3-GDR) (KB4052987) - 14.0.3015.40 (X64) Dec 22 2017 16:13:22 Copyright (C) 2017 Microsoft Corporation Enterprise Edition (64-bit) on Windows 10 Enterprise 10.0 <X64> (Build 16299: )
SELECT FORMAT(SYSDATETIME(), N'Y', 'fa'); --> بهمن, 1398
What has configuration must be checked?
P.S: I realized that this problem occurres on Windows Server 2012 R2 and lower versions.
Finally, I found the problem. This feature depends on the version of Windows which SQL server installed on it. Persian calendar was added in Windows Server 2012 R2 And Windows 10.
This image shows the date format for fa culture in Windows Server 2012 R2 and Windows 10
And this image shows the date format for fa culture in the older version of Windows
In fact, the problem is at Windows Server where the SQLServer is installed.
For any language you want to use, Windows Server must have this language installed at OS level.
To install in "Windows Server 2012 R2" or later, just follow these steps:
Search for "Control Panel" and open it
Select "View by: Large Icons"
Click on "Languages"
Add the Language you need, and after that also install the "Language Pack" for the new language added.
After this, your parameter in FORMAT function will be accepted.

Create a graph table in SQL Server 2016

I am trying to create a simple node table, using:
CREATE TABLE Person (ID INTEGER PRIMARY KEY, name VARCHAR(100)) AS NODE
But whatever I try I get an error:
Incorrect syntax near the keyword 'as'.
as if it doesn't understand the 'As Node' part.
I am using SQL Server 13.0.1601.
Database compatibility: SQL Server level 2016(130)
SSMS: v17.2
##version: "Microsoft SQL Server 2016 (RTM) - 13.0.1601.5 (X64) Apr 29 2016 23:23:58 Copyright (c) Microsoft Corporation Express Edition (64-bit) on Windows 10 Pro 6.3 (Build 14393: ) (Hypervisor)"
You can't do CREATE TABLE (SQL Graph) in earlier versions of SQL Server, because it applies to SQL Server 2017.
See the documentation.

SQL2016 Not able to create Column Master Key

I just installed SQL 2016 Standard Edition because I wanted to use the 'Always Encrypted' feature.
However, when I tried to created a Column Master Key under Security->Always Encrypted Keys->Column Master Key, I got the following error:
productversion: 13.0.160.5, productlevel:RTM, edition:Standard Edition 64bit
Any ideas? Thanks!
I was having the same issue. I fixed it by updating to Sql Server 2016 SP1 from Sql Server 2016.
Previously ##version was:
Microsoft SQL Server 2016 (RTM-GDR) (KB3194716) - 13.0.1722.0 (X64) Sep 26 2016 13:17:23 Copyright (c) Microsoft Corporation Standard Edition (64-bit) on Windows 10 Pro 6.3 (Build 14393: )
Now ##version is:
Microsoft SQL Server 2016 (SP1) (KB3182545) - 13.0.4001.0 (X64) Oct 28 2016 18:17:30 Copyright (c) Microsoft Corporation Standard Edition (64-bit) on Windows 10 Pro 6.3 (Build 14393: )
Note also that my SSMS is totally up to date.
Tools > Check for Updates > Details - 13.0.16100.1
A coworker has a slightly older build of SSMS and does not even see the option to encrypt columns.
The issue was probably caused by restoring a SQL2014 database. I backed up a 2014 database and then restored it in 2016. SQL may have seen it as a 2014 schema and therefore complained Column Master Key not supported.
How I resolved it: In SSMS 2016, generate .sql script for the imported database (in Advanced settings, choose SQL 2016 script)
Install a new SQL 2016 instance (which may not be necessary will test) and run the .sql generated, rather than the restore option
"Always Encrypted is available in SQL Server 2016 (13.x) and SQL Database. (Prior to SQL Server 2016 (13.x) SP1, Always Encrypted was limited to the Enterprise Edition.)"
Source: https://learn.microsoft.com/en-us/sql/relational-databases/security/encryption/always-encrypted-database-engine?view=sql-server-2017

I applied SQL Server SP2 but SSMS displays 11.0.3153 still

The SQL Server version I'm running is 2012 (11.0.3153) in our dev environment..
I've just applied SQL Server SP2 to my database but the version appears unchanged. I need the version level at 11.0.5058 to match our production.
There was no errors during the installation.
Any idea what's going on?
Select ##version shows:
Microsoft SQL Server 2012 (SP1) - 11.0.3153.0 (Intel X86)
Jul 22 2014 15:41:01
Copyright (c) Microsoft Corporation
Standard Edition on Windows NT 6.2 (Build 9200: ) (WOW64) (Hypervisor)
However I tried applying the patch again and I get this:
Upgrade Status: Installed.
There's not supposed to be a need for a restart but I'm doing that anyway.
Restart did not work either.

Resources