Sample Header Ad - 728x90

Database Administrators

Q&A for database professionals who wish to improve their database skills

Latest Questions

2 votes
2 answers
8204 views
how to add a user to local sql server when one has only windows admin rights on the server
I'm in the admin group of a server, but yet I don't have access to the sql server, is there anyway to add myself without the need to reinstall the sql server?
I'm in the admin group of a server, but yet I don't have access to the sql server, is there anyway to add myself without the need to reinstall the sql server?
Mindan (137 rep)
Dec 11, 2020, 01:49 AM • Last activity: Aug 6, 2025, 12:03 PM
1 votes
1 answers
18476 views
Log-in as service account in SQL Server Management Studio
The stored procedure that performs a CTE in production is being executed using a service account. However, the stored procedure returns empty and I tried checking this using SSMS but I my domain account has no execute functionality in production. I tried logging into SQL Server Management Studio usi...
The stored procedure that performs a CTE in production is being executed using a service account. However, the stored procedure returns empty and I tried checking this using SSMS but I my domain account has no execute functionality in production. I tried logging into SQL Server Management Studio using the service account but I ran through some problems. First was resolved by following this link - https://dba.stackexchange.com/questions/173785/the-certificate-chain-was-issued-by-an-authority-that-is-not-trusted However, once that is executed, it returns as if no user name was provided: enter image description here Question is, can I login using a service account in SQL Server Management Studio?
Patrick (111 rep)
Oct 21, 2018, 07:27 AM • Last activity: Aug 5, 2025, 11:07 PM
0 votes
1 answers
149 views
SSMS IntelliSense not working with sa user
In SSMS (versions 17 and 18), IntelliSense is not working with the sa user, but it is working with another user. If I connect to a SQL database with the sa user and create a query window, IntelliSense does not work in this window. However, if I make a second connection to the same database with anot...
In SSMS (versions 17 and 18), IntelliSense is not working with the sa user, but it is working with another user. If I connect to a SQL database with the sa user and create a query window, IntelliSense does not work in this window. However, if I make a second connection to the same database with another user and create a query window, IntelliSense works. If change back to the query window with sa user, IntelliSense again does not work. IntelliSense AutoComplete
KostasM (1 rep)
Aug 4, 2020, 07:22 AM • Last activity: Aug 1, 2025, 01:01 AM
0 votes
1 answers
145 views
Keeping track of client logged-in OS user when connecting to a database server
We are implementing a monitoring solution that keeps track of logins to SQL Server. We need to capture the following event: a user logs in to a Windows client and from there logins to a remote SQL Server using SQL Authentication. When this occurs, we need to keep track of the Window user that logged...
We are implementing a monitoring solution that keeps track of logins to SQL Server. We need to capture the following event: a user logs in to a Windows client and from there logins to a remote SQL Server using SQL Authentication. When this occurs, we need to keep track of the Window user that logged into the Windows client. Is there any chance to configure SSMS to pass the credentials of currently logged-in Windows user to the SQL Server it is connecting to?
Andrea (210 rep)
Jun 26, 2023, 10:19 AM • Last activity: Jul 22, 2025, 02:03 AM
1 votes
0 answers
40 views
How do I fix mixed line endings in SSMS?
I have no idea how this happens, but in SSMS (version 21) occasionally the line endings go wrong. I’m teaching online to users with Windows and SSMS and suddenly they get errors with the `GO` keyword. This is apparently due to the fact the line endings have got mixed and there isn’t the proper `CRLF...
I have no idea how this happens, but in SSMS (version 21) occasionally the line endings go wrong. I’m teaching online to users with Windows and SSMS and suddenly they get errors with the GO keyword. This is apparently due to the fact the line endings have got mixed and there isn’t the proper CRLF line ending around the GO keyword. This is with new files created in SSMS on Windows, so I don’t see where the other line endings are coming from. More importantly, I can’t find a simple way of fixing these line endings. I can open the file in another text editor, such as Pulsar, and fix it that way, but I can’t ask the students to do that; besides, there must be a way within SSMS to do this.
Manngo (3145 rep)
Jul 21, 2025, 03:28 AM • Last activity: Jul 21, 2025, 03:35 AM
5 votes
5 answers
20229 views
SQL Server Management Studio (SSMS) is way too slow in its GUI
I know this question has been asked before [here][1] and [here][2]. But none of them could solve my problem. I have this environment: 1. Windows 10, build 1903 (freshly installed) 2. Microsoft SQL Server 2016 (SP2) (KB4052908) - 13.0.5026.0 (X64) Mar 18 2018 09:11:49 Copyright (c) Microsoft Corporat...
I know this question has been asked before here and here . But none of them could solve my problem. I have this environment: 1. Windows 10, build 1903 (freshly installed) 2. Microsoft SQL Server 2016 (SP2) (KB4052908) - 13.0.5026.0 (X64) Mar 18 2018 09:11:49 Copyright (c) Microsoft Corporation Enterprise Edition (64-bit) on Windows 10 Enterprise 10.0 (Build 18362: ) 3. SSMS v17.3 (14.0.17199.0) Any activity I want to do in it, from opening, to connecting to a database engine, to right-clicking on a database, to creating a new database, to opening up a new query window, to browsing tables, any activity that is not query takes like 5 to 10 seconds to perform. It's clearly apparent that SSMS is doing something for each activity, and it gets stuck somewhere. Here are the things I've done so far, without effect: 1. Blocked Microsoft's certificate URL (adding 127.0.0.1 crl.microsoft.com to hosts file) 2. Downloading certificate and installing it from http://crl.microsoft.com/pki/crl/products/MicrosoftRootAuthority.crl 3. Connecting to "local" instead of "." 4. Resetting user-defined settings in "C:\Users\user\AppData\Roaming\Microsoft\SQL Server Management Studio" 5. No antivirus is installed (only Windows Defender, the default of Windows) It's a shame that a program from such a reputable company can't work smooth out of the box, and troubleshooting it is very difficult. How can I diagnose what's wrong with SSMS? Update: This problem exists even with SSMS v18.2 (15.0.18142.0)
Saeed Neamati (1515 rep)
Sep 21, 2019, 10:16 AM • Last activity: Jul 16, 2025, 09:36 AM
1 votes
1 answers
393 views
How do I open a table from a query in SSMS?
In Oracle SQL Developer, I am able to Ctrl+Click on a table name within a query and the table definition automatically opens. This is useful it alleviates my need to manually navigate the database tree to find the table I'm looking for. Is there a similar feature in SSMS that lets me quickly open a...
In Oracle SQL Developer, I am able to Ctrl+Click on a table name within a query and the table definition automatically opens. This is useful it alleviates my need to manually navigate the database tree to find the table I'm looking for. Is there a similar feature in SSMS that lets me quickly open a table referenced in a query? I found a question related to accomplishing this in Oracle , but nothing for SSMS.
Code Novice (275 rep)
Sep 10, 2019, 07:58 PM • Last activity: Jul 15, 2025, 03:37 PM
-1 votes
0 answers
19 views
SnowFlake/DataView connection to SSMS
Has anyone successfully connected SnowFlake/DataView to SSMS whether it was through VS or other means, if so, may I please know how you did it? Essentially, I am trying to get the SnowFlake data into SSMS. I have read their articles and they helped some, I talked to their techs and they told me they...
Has anyone successfully connected SnowFlake/DataView to SSMS whether it was through VS or other means, if so, may I please know how you did it? Essentially, I am trying to get the SnowFlake data into SSMS. I have read their articles and they helped some, I talked to their techs and they told me they cannot help with my VS issue. See, I have been able to bring in some tables into our server via VS package. The problem is that when I have SSMS run the package I have to run it in 32bit instead of 64bit. I have the driver for both, please correct me if I am wrong, but I think SSMS only supports 32bit? This change is making the small amount of tables I am bringing in take over 5 hours to run, and this is after the MANY creative modifications I do before bring in the tables so that the package does not time out. Another way I have tried was through a linked server; However, in the catalog section, the databases do not show up. It looks like it connected but if I cannot access the database, is it really connected? you know what I mean? I also tried to talk to their techs about this and they directed me to an article where they said they do not support linked servers. Now I have ran out of options and need you guy's help. If you want to know why I want to bring in the data into SSMS, it is bc Snowflake SQL is VERY limiting making it difficult to query the data, which is not the issue with SSMS.
Gianpiero Loli (1 rep)
Jul 15, 2025, 11:33 AM
0 votes
1 answers
182 views
public role restrictions on a shared server prevent IntelliSense from working
I have an SQL Server 2016 database. This database is hosted on a **shared** server, and is managed by a central DBA team. In an effort to harden data security on the Production server, the DBA team has taken the approach to revoke/disable all public roles (i.e. DENY everything to the public role). I...
I have an SQL Server 2016 database. This database is hosted on a **shared** server, and is managed by a central DBA team. In an effort to harden data security on the Production server, the DBA team has taken the approach to revoke/disable all public roles (i.e. DENY everything to the public role). I believe this was done to limit (meta)data access to *other* databases on the same server, presumably along these lines: https://dba.stackexchange.com/questions/220225/is-it-best-practice-to-revoke-server-permissions-to-the-server-public-role-on The problem is that this setup prevents IntelliSense from working on Microsoft SQL Server Management Studio. I think it's the situation Aaron Bertrand cautions on here: https://dba.stackexchange.com/a/116814/180921 I have elevated access rights (RWED) to my database, but am not a full admin (this role is restricted to members of the DBA Production team). **Is there a possible solution here? How can IntelliSense be made to work on my database, while respecting DBA desire to limit metadata view for *other* databases**
Roberto (119 rep)
Jul 18, 2022, 01:13 PM • Last activity: Jul 10, 2025, 06:03 AM
1 votes
1 answers
859 views
Run MSSQL stored procedures containing SSIS packages using Windows Authentication from another computer
I am new to MSSQL. I have a question about executing MSSQL Stored Procedure. Let me briefly talk about my development environment first: - **PC400 (Computer/Server A)**, where SQL Server 2012 is installed - **PC401 (Computer/Server B)**, where Java application is running on PC400 has SSIS project &...
I am new to MSSQL. I have a question about executing MSSQL Stored Procedure. Let me briefly talk about my development environment first: - **PC400 (Computer/Server A)**, where SQL Server 2012 is installed - **PC401 (Computer/Server B)**, where Java application is running on PC400 has SSIS project & package(s) deployed to its SSISDB. Of course, I have no problem in executing the packages **LOCALLY in PC400**. But this is not what I need. I want the java application installed on PC401 to be able to execute those packages stored in PC400. I have no problem in using a sa/temp user account with "SQL Server Authentication" to login the server: enter image description here But based on my research, "SQL Server Authentication" does not allow me to deploy/execute packages in SSISDB. Then, I found the following advice: https://dba.stackexchange.com/questions/39614/connect-to-sql-server-using-windows-authentication-from-another-pc-without-activ Let say the windows user account of PC401 is "HKB\Hello123". By creating an identical Windows user under "MSSQL -> Security -> Logins" in PC400: enter image description here my java program is able to use the following codes to execute a stored procedure in PC400 using "Windows Authentication": con = DriverManager.getConnection("jdbc:sqlserver://HKA-PC400:1433;DatabaseName=TempTest;integratedSecurity=true"); CallableStatement cs = null; cs = this.con.prepareCall("{call SP_ETL_B}"); cs.execute(); But is there any other methods to achieve this? Besides, ***I hope my java program would be able to use a sa/temp user account("SQL Server Authentication") to pretend to be a "Windows Authentication" one OR simply connect to an existing Windows user account, then to trigger Stored proc/SQL Server Agent job to run the packages in PC400.***
garethlam (11 rep)
May 4, 2022, 10:01 AM • Last activity: Jul 5, 2025, 03:01 PM
1 votes
2 answers
521 views
SSMS21 on windows 2022 server opens a new instance every time I double click a sql file
When I installed SSMS21 on windows 2022 server I noticed the extremely disruptive new feature where it will not use the open and logged in instance of SSMS when I double click a .sql file. Instead, it opens a new instance is SSMS, taking forever and eating resources. I tried lots of registry hacks p...
When I installed SSMS21 on windows 2022 server I noticed the extremely disruptive new feature where it will not use the open and logged in instance of SSMS when I double click a .sql file. Instead, it opens a new instance is SSMS, taking forever and eating resources. I tried lots of registry hacks posted here and there on the internet, and even enlisted the help of chatgpt and copilot to try to fix it. No success. Imagine my surprise when Brent sent me this link https://14days.brentozar.com/ssms.mp4 showing him double clicking on a sql file and it using the open instance of SSMS 21! According to Brent, the only difference here is he is using Windows 2025. Unfortunately, I do not have access to windows 2025 yet. I build a clean VM with the following specs: Windows Server 2022 Standard 21H2 OS Build 20348.3807 SSMS SQL Server Management Studio 21.3.7+3.36221.1 I launch SSMS and log in to the database. Then I use windows explorer to find my sql files and double click on one. A brand new instance is SSMS slowly launches! Grrrr! I know it can work because I see Brent's video. Anyone know the magic sauce to make it work for me?
davethegeek (21 rep)
Jul 1, 2025, 10:45 PM • Last activity: Jul 3, 2025, 03:47 PM
0 votes
1 answers
581 views
Error in Login securables - SQL Server
I am using SQL Server 2017 and the latest SSMS version. When I click securables of login in SSMS, I see this error: >Object reference not set to an instance of an object. (SqlMgmt) > >------------------------------ >Program Location: > > at Microsoft.SqlServer.Management.SqlMgmt.PermissionsData.Secu...
I am using SQL Server 2017 and the latest SSMS version. When I click securables of login in SSMS, I see this error: >Object reference not set to an instance of an object. (SqlMgmt) > >------------------------------ >Program Location: > > at Microsoft.SqlServer.Management.SqlMgmt.PermissionsData.Securable.GetImage(SecurableType type)\ at Microsoft.SqlServer.Management.SqlMgmt.PermissionsSecurableSelector.InitializeBitmaps() at Microsoft.SqlServer.Management.SqlMgmt.PermissionsSecurableSelector..ctor(IHelpProvider helpProvider, IServiceProvider serviceProvider, Principal principal, PermissionsDetailsGrid permissionsGrid, Object connectionInfo, Boolean yukonOrGreater)\ at Microsoft.SqlServer.Management.SqlMgmt.PermissionsOfPrincipalsCore.InitializeSecurableSelector()\ at Microsoft.SqlServer.Management.SqlMgmt.PermissionsOfPrincipalsCore..ctor(IHelpProvider helpProvider, IServiceProvider serviceProvider, Principal principal, Object connectionInfo, Boolean yukonOrGreater, Boolean showColumnPermissionsInDetailsGrid)\ at Microsoft.SqlServer.Management.SqlMgmt.PermissionsServerPrincipal.InitializePermissionsCore()\ at Microsoft.SqlServer.Management.SqlMgmt.PermissionsServerPrincipal.OnInitialization()\ at Microsoft.SqlServer.Management.SqlMgmt.ViewSwitcherControlsManager.SetView(Int32 index, TreeNode node)\ at Microsoft.SqlServer.Management.SqlMgmt.ViewSwitcherControlsManager.OnBeforeSelection(Object sender, TreeViewCancelEventArgs e) What can be the problem? I first thought it might be permission problem, but even if I use sysadmin login, I see this error every time.
Farid Zahidov (41 rep)
Sep 8, 2023, 01:23 PM • Last activity: Jun 30, 2025, 07:03 PM
4 votes
1 answers
222 views
T-SQL: Iteration vs. Set-Based Operations When Independence of Ancillary Data is Needed
BACKGROUND ---------- I am using Microsoft SQL Server Management Studio v18.9.1 on Windows 10. I've created a database to store test results of our company's widget (not yet being produced). I am working on a stored procedure to populate that database with random test result records. The purpose of...
BACKGROUND ---------- I am using Microsoft SQL Server Management Studio v18.9.1 on Windows 10. I've created a database to store test results of our company's widget (not yet being produced). I am working on a stored procedure to populate that database with random test result records. The purpose of this is to have a data set to use for query development while waiting for real widgets to start being produced and tested. In what follows, our test suite is composed of multiple subtest types. For this post, I've created only one subtest type. The example below runs the test suite one time (with a **[test_id]** of 0). Within a test, a given subtest may be run multiple times if the tester deems it necessary for any reason. In the example below, the one subtest I show is run five times for illustrative purposes. The subtest I show has two parameters, the first of which can take on two discrete values, and the second of which can take on three discrete values. All subtests must be run over all parameter combinations. So, a subtest result consists of 2 * 3 = 6 partial results (one for each parameter combination). When a parameter combination is tested, either anomalies are not observed (pass) or one or more anomalies are observed (fail). If any of the six parameter combinations produces one or more anomalies, the subtest as a whole fails. A subtest result record contains the following columns: - **[test_id]** - **[subtest_run_number]** - **[parameter_1]** - **[parameter_2]** - **[anomaly_id]** - **[anomaly_magnitude]** - **[subtest_type]** If testing with a given parameter combination produces no anomalies, this is noted by creating a single subtest record containing the two parameter values, an **[anomaly_id]** of 0, and an **[anomaly_magnitude]** of NULL. If testing with a given parameter combination produces N anomalies, this is noted by creating N subtest records. Each subtest record contains the parameter values that produced the anomaly. Each subtest record also contains a 1-based anomaly ID for one of the anomalies seen as well as the "magnitude" of that anomaly. In producing this data set of random test results, I am trying to use set-based operations rather than iteration. As can be seen below, I did have to use iteration when 1) looping over the number of times the subtest would be run and when 2) looping over the (randomly-chosen) number of anomalies that were to be created for a given parameter combination. Where I was able to use set-based operations was when creating test result data for every parameter combination. This was a natural place to use a cross join since each parameter has a table defining its valid values. However, there's a problem... THE PROBLEM ----------- Within a subtest run, every parameter combination has the same number of anomalies associated with it. What I want is for the anomaly count associated with each parameter combination to be able to vary independently. AN UNDESIRABLE SOLUTION ----------------------- The only way I can think of accomplishing this is to forego set-based operations and iterate as follows: DECLARE @parameter_1 as INT = 1; DECLARE @parameter_2 as INT = 1; DECLARE @anomaly_count AS INT; EXEC [dbo].[rand_int] @a = 0, @b = 2, @random_int = @anomaly_count OUTPUT; WHILE @parameter_1 0 AND [anomaly_magnitude] IS NOT NULL) OR ([anomaly_id] = 0 AND [anomaly_magnitude] IS NULL) ) ); GO -- Stored Procedure CREATE PROC [dbo].[rand_int] @a AS INT, @b AS INT, @random_int AS INT OUTPUT AS SET NOCOUNT ON; SET @random_int = FLOOR(RAND() * (@b - @a + 1)) + @a; GO -- Stored Procedure CREATE PROC [dbo].[generate_random_subtest_type_1_data] @test_id AS VARCHAR(20) AS SET NOCOUNT ON; DECLARE @subtest_type_1_count AS INT = 5; DECLARE @subtest_type_1_loop AS INT = 0; WHILE @subtest_type_1_loop 0 SET @subtest_result = 'fail'; ELSE SET @subtest_result = 'pass'; INSERT INTO [dbo].[test_runs] ([test_id], [subtest_run_number], [subtest_type], [subtest_result]) VALUES (@test_id, @subtest_type_1_loop, 'subtest_type_1', @subtest_result); IF @anomaly_count = 0 BEGIN INSERT INTO [dbo].[subtest_type_1_data] ([test_id], [subtest_run_number], [parameter_1], [parameter_2], [anomaly_id], [anomaly_magnitude]) SELECT @test_id AS [test_id], @subtest_type_1_loop AS [subtest_run_number], [parameter_1_value] AS [parameter_1_value], [parameter_2_value] AS [parameter_2_value], 0 AS [anomaly_id], NULL AS [anomaly_magnitude] FROM [dbo].[parameter_1_values] CROSS JOIN [dbo].[parameter_2_values]; END; ELSE BEGIN DECLARE @anomaly_loop AS INT; SET @anomaly_loop = 1; WHILE @anomaly_loop <= @anomaly_count BEGIN -- Instead of RAND(), use ABS(CHECKSUM(NewId()) / 2147483647.0). -- This is because RAND() gets invoked only once in the INSERT statement below. -- -- By using an expression based on NewID(), every row will be assigned its -- own random number. INSERT INTO [dbo].[subtest_type_1_data] ([test_id], [subtest_run_number], [parameter_1], [parameter_2], [anomaly_id], [anomaly_magnitude]) SELECT @test_id AS [test_id], @subtest_type_1_loop AS [subtest_run_number], [parameter_1_value] AS [parameter_1_value], [parameter_2_value] AS [parameter_2_value], @anomaly_loop AS [anomaly_id], ABS(CHECKSUM(NewId()) / 2147483647.0) AS [anomaly_magnitude] FROM [dbo].[parameter_1_values] CROSS JOIN [dbo].[parameter_2_values]; SET @anomaly_loop = @anomaly_loop + 1; END; END; SET @subtest_type_1_loop = @subtest_type_1_loop + 1; END; GO **SCRIPT 2** -- Script 2 -- Delete old data, generate a new data set of random test results, and display it DELETE FROM [dbo].[subtest_type_1_data]; DELETE FROM [dbo].[test_runs]; GO EXEC [dbo].[generate_random_subtest_type_1_data] @test_id = '0'; GO SELECT * FROM [dbo].[test_runs]; SELECT * FROM [dbo].[subtest_type_1_data]; GO EXAMPLE OUTPUT (current, incorrect) ----------------------------------- In the example output below: - All parameter combinations within subtest run 0 have the **same number** (0) of anomalies - All parameter combinations within subtest run 1 have the **same number** (0) of anomalies - All parameter combinations within subtest run 2 have the **same number** (1) of anomaly - All parameter combinations within subtest run 3 have the **same number** (0) of anomalies - All parameter combinations within subtest run 4 have the **same number** (2) of anomalies I would like each parameter combination's anomaly count to be able to vary independently of any other parameter combination's anomaly count.
test_id subtest_run_number  parameter_1 parameter_2 anomaly_id  anomaly_magnitude   subtest_type
    ------- ------------------  ----------- ----------- ----------  -----------------   ------------
    0       0                   1           1           0           NULL                subtest_type_1
    0       0                   1           2           0           NULL                subtest_type_1
    0       0                   1           3           0           NULL                subtest_type_1
    0       0                   2           1           0           NULL                subtest_type_1
    0       0                   2           2           0           NULL                subtest_type_1
    0       0                   2           3           0           NULL                subtest_type_1
    0       1                   1           1           0           NULL                subtest_type_1
    0       1                   1           2           0           NULL                subtest_type_1
    0       1                   1           3           0           NULL                subtest_type_1
    0       1                   2           1           0           NULL                subtest_type_1
    0       1                   2           2           0           NULL                subtest_type_1
    0       1                   2           3           0           NULL                subtest_type_1
    0       2                   1           1           1           0.8730268           subtest_type_1
    0       2                   1           2           1           0.5566615           subtest_type_1
    0       2                   1           3           1           0.4599889           subtest_type_1
    0       2                   2           1           1           0.9322677           subtest_type_1
    0       2                   2           2           1           0.3515796           subtest_type_1
    0       2                   2           3           1           0.872755            subtest_type_1
    0       3                   1           1           0           NULL                subtest_type_1
    0       3                   1           2           0           NULL                subtest_type_1
    0       3                   1           3           0           NULL                subtest_type_1
    0       3                   2           1           0           NULL                subtest_type_1
    0       3                   2           2           0           NULL                subtest_type_1
    0       3                   2           3           0           NULL                subtest_type_1
    0       4                   1           1           1           0.6965834           subtest_type_1
    0       4                   1           1           2           0.4588626           subtest_type_1
    0       4                   1           2           1           0.1284888           subtest_type_1
    0       4                   1           2           2           0.4331938           subtest_type_1
    0       4                   1           3           1           0.3083588           subtest_type_1
    0       4                   1           3           2           0.8907238           subtest_type_1
    0       4                   2           1           1           0.4016767           subtest_type_1
    0       4                   2           1           2           0.8041269           subtest_type_1
    0       4                   2           2           1           0.5932015           subtest_type_1
    0       4                   2           2           2           0.5389434           subtest_type_1
    0       4                   2           3           1           0.7058043           subtest_type_1
    0       4                   2           3           2           0.749176            subtest_type_1
EXAMPLE OUTPUT (desired) ------------------------ Below, I show an example of what desired output might look like. (Here, I show only rows associated with **[subtest_run_number]** = 0. Of course, what's being demonstrated here holds for all **[subtest_run_number]** values.) In the example output below: - The parameter combination (1, 1) has one anomaly (**[anomaly_id]** value is only 1) - The parameter combination (1, 2) has zero anomalies (**[anomaly_id]** value is only 0) - The parameter combination (1, 3) has two anomalies (**[anomaly_id]** values are 1, 2) - The parameter combination (2, 1) has one anomaly (**[anomaly_id]** value is only 1) - The parameter combination (2, 2) has zero anomalies (**[anomaly_id]** value is only 0) - The parameter combination (2, 3) has three anomalies (**[anomaly_id]** values are 1, 2, 3) The salient point is that the number of anomalies per parameter combination can vary within a given value of **[subtest_run_number]**. In the incorrect example output shown earlier, the number of anomalies per parameter combination could not vary within a given value of **[subtest_run_number]**.
test_id subtest_run_number  parameter_1 parameter_2 anomaly_id  anomaly_magnitude   subtest_type
    ------- ------------------  ----------- ----------- ----------  -----------------   ------------
    0       0                   1           1           1           0.5095024           subtest_type_1
    0       0                   1           2           0           NULL                subtest_type_1
    0       0                   1           3           1           0.5062660           subtest_type_1
    0       0                   1           3           2           0.3940517           subtest_type_1
    0       0                   2           1           1           0.6216237           subtest_type_1
    0       0                   2           2           0           NULL                subtest_type_1
    0       0                   2           3           1           0.5802680           subtest_type_1
    0       0                   2           3           2           0.5673455           subtest_type_1
    0       0                   2           3           3           0.5517588           subtest_type_1
MY QUESTION ----------- Is there a way I can continue to use set-based operations but have each parameter combination have its own, independent anomaly count? Or, must I resort to iteration?
Dave (197 rep)
Nov 2, 2022, 01:58 PM • Last activity: Jun 25, 2025, 03:06 PM
0 votes
1 answers
198 views
What will happen if master goes down in peer to peer replication?
In case of Peer to peer replication, if Master goes down, will the other two nodes continue synchronizing or not?[![enter image description here][1]][1] [1]: https://i.sstatic.net/c8J6I.jpg
In case of Peer to peer replication, if Master goes down, will the other two nodes continue synchronizing or not?enter image description here
Rauf Asadov (1313 rep)
Jun 21, 2019, 10:49 AM • Last activity: Jun 23, 2025, 01:03 PM
1 votes
1 answers
201 views
Is there a plugin to add a map behind the spatial results?
Using SSMS 18.5.1 and dealing with spatial results. I would like to visualize this data against a map of the world using Google Maps, Bing Maps, or any other mapping software. Is there a plugin or a way to accomplish this within SSMS? [![enter image description here][1]][1] [1]: https://i.sstatic.ne...
Using SSMS 18.5.1 and dealing with spatial results. I would like to visualize this data against a map of the world using Google Maps, Bing Maps, or any other mapping software. Is there a plugin or a way to accomplish this within SSMS? enter image description here
Jonas Stawski (367 rep)
Sep 17, 2020, 07:48 PM • Last activity: Jun 23, 2025, 12:06 AM
0 votes
1 answers
264 views
Unable to view linked server tables list in SSMS object explorer
I'm using SQL2022 I have a linked server to another SQL server, security is set with a defined username/password. My issue is that when logged into the server with a standard account I cannot see a list of the tables/views on my linked server within the object explorer. I can query the linked server...
I'm using SQL2022 I have a linked server to another SQL server, security is set with a defined username/password. My issue is that when logged into the server with a standard account I cannot see a list of the tables/views on my linked server within the object explorer. I can query the linked server just fine, but cannot expand the tables tree to see what tables are available. If I log into the server with my SA account, I can expand the tree and see all the tables and views on the linked server. What permission do I need to set on my standard login to be able to view the tables in the object explorer.
Matt (101 rep)
Aug 20, 2024, 12:54 AM • Last activity: Jun 16, 2025, 07:04 PM
4 votes
3 answers
1056 views
Extensions in SSMS 21
I have just installed SSMS in Windows 11. There is an extension I have used in previous version to run single statements. It’s called SSMSExecutor (https://github.com/devvcat/ssms-executor). Since the extension appears to have been largely put to rest, this extension needs to be installed manually,...
I have just installed SSMS in Windows 11. There is an extension I have used in previous version to run single statements. It’s called SSMSExecutor (https://github.com/devvcat/ssms-executor) . Since the extension appears to have been largely put to rest, this extension needs to be installed manually, though I have written an installer to simplify this. In versions before 21, I can put the extension in a directory such as: C:\Program Files (x86)\Microsoft SQL Server Management Studio 20\Common7\IDE\Extensions\ depending on the version. I have tried installing the extension in the following location for SSMS 21: C:\Program Files\Microsoft SQL Server Management Studio 21\Release\Common7\IDE\Extensions\ The extension appears after a restart, but it’s greyed out and doesn’t work. Is there something else I can do to get this going?
Manngo (3145 rep)
May 26, 2025, 06:56 AM • Last activity: Jun 2, 2025, 09:11 AM
1 votes
1 answers
667 views
Why does Bitlocker intermittently require SQL service restart after sleep?
I have a development machine that has two drives: C:\ - Operating system (Win 10 Ent) and SQL Server 2012 Standard installation D:\ - SQL Server databases, backups, logs I recently activated [BitLocker][1] on both drives, then activated auto-unlock because I realised that SQL Server can't access the...
I have a development machine that has two drives: C:\ - Operating system (Win 10 Ent) and SQL Server 2012 Standard installation D:\ - SQL Server databases, backups, logs I recently activated BitLocker on both drives, then activated auto-unlock because I realised that SQL Server can't access the databases unless the drive is unlocked. Now with SQL (and only SQL, all other services/programs are fine), on an **intermittent** basis I see the following behaviours occur: 1. After waking from sleep mode, and then starting SSMS, I cannot log in (login fails with invalid credentials error). This occurs for the Windows login account only 2. If login succeeds, or if I login using the **sa** account, then all databases are in the Pending Restore state I guess both of these are due to the drive becoming locked during sleep (or perhaps not?)? After waking from sleep, if I restart the SQL Server service, and then restart SSMS, everything works fine. I wondered what might cause this to be intermittent please, or if my assumptions are wrong, what is actually causing this? *PS. Perhaps a BitLocker tag might be useful, as I see there are plenty of other questions relating to this???*
EvilDr (860 rep)
Jul 17, 2017, 08:13 AM • Last activity: May 29, 2025, 08:09 PM
1 votes
1 answers
280 views
Publication Properties window in SSMS hung when attempting to update
We have a SQL 2012 Database that is mirrored. It also has one publication with 3 subscribers. After a problem occurred (a view that couldn't replicate) during a snapshot push to one of the subscribers, I attempted to change the properties so that view was not in the list of articles to push. I click...
We have a SQL 2012 Database that is mirrored. It also has one publication with 3 subscribers. After a problem occurred (a view that couldn't replicate) during a snapshot push to one of the subscribers, I attempted to change the properties so that view was not in the list of articles to push. I clicked OK and the window hung. Upon inspection in the Activity Monitor, I have 9 different SIDs with a Wait time in excess of an hour. Most of them are "SELECTS" in the SSMS Application. I presume I can kill these with no issues. 2 are in SSMS but are "UPDATE" commands. I also have 3 SQLAgent SIDs that are hung: one is an "OPEN CURSOR" one is a "DELETE" and one is a "SELECT". There is also a "Distribution History" application SID SELECT that is hung. These SIDs are all in a "SUSPENDED" state. They all are waiting on a resource LOCK (mostly shared) This is a critical production database and I am nervous about just killing SSMS while it's in the midst of trying to do something. Can someone recommend one of: A - kill the SSMS interface B - kill various SIDs. If so, should I only kill certain types? Which ones? C - something else.
SMWilliams (11 rep)
Nov 1, 2021, 05:12 AM • Last activity: May 29, 2025, 01:02 PM
4 votes
3 answers
14929 views
Unable connect to SQL Server on SSMS and Got error 10054
I have an issue with connecting to a server on SSMS SQL Server. I got this error 10054 when i tried to connect : [SQL Server error 10054](https://i.sstatic.net/aY3BU.png) > =================================== > Cannot connect to . > =================================== > A connection was successfully...
I have an issue with connecting to a server on SSMS SQL Server. I got this error 10054 when i tried to connect : [SQL Server error 10054](https://i.sstatic.net/aY3BU.png) > =================================== > Cannot connect to . > =================================== > A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - An existing connection was forcibly closed by the remote host.) (Framework Microsoft SqlClient Data Provider) > > ------------------------------ > For help, click: https://docs.microsoft.com/sql/relational-databases/errors-events/mssqlserver-10054-database-engine-error > ------------------------------ > Server Name: > Error Number: 10054 > Severity: 20 > State: 0 > ------------------------------ > Program Location: > > at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) > at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) > at Microsoft.Data.SqlClient.TdsParserStateObject.SNIWritePacket(SNIHandle handle, SNIPacket packet, UInt32& sniError, Boolean canAccumulate, Boolean callerHasConnectionLock) > at Microsoft.Data.SqlClient.TdsParserStateObject.WriteSni(Boolean canAccumulate) > at Microsoft.Data.SqlClient.TdsParserStateObject.WritePacket(Byte flushMode, Boolean canAccumulate) > at Microsoft.Data.SqlClient.TdsParser.TdsLogin(SqlLogin rec, FeatureExtension requestedFeatures, SessionData recoverySessionData, FederatedAuthenticationFeatureExtensionData fedAuthFeatureExtensionData, SqlClientOriginalNetworkAddressInfo originalNetworkAddressInfo) > at Microsoft.Data.SqlClient.SqlInternalConnectionTds.Login(ServerInfo server, TimeoutTimer timeout, String newPassword, SecureString newSecurePassword) > at Microsoft.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover, Boolean isFirstTransparentAttempt, Boolean disableTnir) > at Microsoft.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout) > at Microsoft.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance) > at Microsoft.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, ServerCertificateValidationCallback serverCallback, ClientCertificateRetrievalCallback clientCallback, DbConnectionPool pool, String accessToken, SqlClientOriginalNetworkAddressInfo originalNetworkAddressInfo, Boolean applyTransientFaultHandling) > at Microsoft.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) > at Microsoft.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions) > at Microsoft.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) > at Microsoft.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) > at Microsoft.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) > at Microsoft.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) > at Microsoft.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry, SqlConnectionOverrides overrides) > at Microsoft.Data.SqlClient.SqlConnection.Open(SqlConnectionOverrides overrides) > at Microsoft.Data.SqlClient.SqlConnection.Open() > at Microsoft.SqlServer.Management.SqlStudio.Explorer.ObjectExplorerService.ValidateConnection(UIConnectionInfo ci, IServerType server) > at Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser() > =================================== > An existing connection was forcibly closed by the remote host I've tried on other laptop, some of the laptop can connect it, some cannot. I also have tried different SQL Server version (19 and 22) and also tried different SSMS version (19.0.1, 19.0.2, 19.1) I already tried adding additional connections parameters too in the SSMS options on Connect to Server Menu [Additional Connection Parameters](https://i.sstatic.net/OPKSW.png) I also tried and checked solution in this website but still nothing works https://learn.microsoft.com/en-us/troubleshoot/sql/database-engine/connect/tls-exist-connection-closed I have tried to open inbound and outbound firewall for port 1433 too I did find error on C:\Program Files\Microsoft SQL Server\MSSQL16.SQL_SERVER\MSSQL\Log when I try to restart the SQL Server service > 2023-07-15 22:04:03.71 Server The SQL Server Network Interface > library could not register the Service Principal Name (SPN) [ > MSSQLSvc/Davin:SQL_SERVER ] for the SQL Server service. Windows return > code: 0xffffffff, state: 63. Failure to register a SPN might cause > integrated authentication to use NTLM instead of Kerberos. This is an > informational message. Further action is only required if Kerberos > authentication is required by authentication policies and if the SPN > has not been manually registered. > 2023-07-15 22:04:03.71 Server The SQL Server Network Interface > library could not register the Service Principal Name (SPN) [ > MSSQLSvc/Davin:51166 ] for the SQL Server service. Windows return > code: 0xffffffff, state: 63. Failure to register a SPN might cause > integrated authentication to use NTLM instead of Kerberos. This is an > informational message. Further action is only required if Kerberos > authentication is required by authentication policies and if the SPN > has not been manually registered. Hope anyone can help me, thanks
Davin (41 rep)
Jul 15, 2023, 05:25 AM • Last activity: May 28, 2025, 10:32 PM
Showing page 1 of 20 total questions