Activity overview
Latest activity by gm0593
Also, when I click to cancel running the query that seems to be "stuck", I get an error message from SSMS: Object reference not set to an instance of an object. / comments
Also, when I click to cancel running the query that seems to be "stuck", I get an error message from SSMS: Object reference not set to an instance of an object.
Sorry it has been a while. The following script causes the issue where the query window gets stuck executing as outlined above.
USE [TRIDocumentStorage09];
GO
IF EXISTS
(
SELECT *
FROM sys.server_principals
WHERE name = 'AD-DOMAIN\ADUSERNAME'
)
AND NOT EXISTS
(
SELECT 1
FROM sys.database_principals
WHERE name = 'AD-DOMAIN\ADUSERNAME'
)
BEGIN
PRINT 'CREATE USER [''AD-DOMAIN\ADUSERNAME''] FOR LOGIN [''AD-DOMAIN\ADUSERNAME'']';
CREATE USER [AD-DOMAIN\ADUSERNAME] FOR LOGIN [AD-DOMAIN\ADUSERNAME];
END;
GO
IF EXISTS
(
SELECT 1
FROM sys.database_principals
WHERE name = 'AD-DOMAIN\ADUSERNAME'
)
BEGIN
PRINT 'EXEC sp_AddRoleMember ''db_datareader'', ''AD-DOMAIN\ADUSERNAME''';
EXEC sp_addrolemember 'db_datareader', 'AD-DOMAIN\ADUSERNAME';
END;
GO
IF EXISTS
(
SELECT 1
FROM sys.database_principals
WHERE name = 'AD-DOMAIN\ADUSERNAME'
)
BEGIN
PRINT 'EXEC sp_AddRoleMember ''db_datawriter'', ''AD-DOMAIN\ADUSERNAME''';
EXEC sp_addrolemember 'db_datawriter', 'AD-DOMAIN\ADUSERNAME';
END;
GO
IF EXISTS
(
SELECT 1
FROM sys.database_principals
WHERE name = 'AD-DOMAIN\ADUSERNAME'
)
BEGIN
PRINT 'EXEC sp_AddRoleMember ''db_executor'', ''AD-DOMAIN\ADUSERNAME''';
EXEC sp_addrolemember 'db_executor', 'AD-DOMAIN\ADUSERNAME';
END;
GO
/ comments
Sorry it has been a while. The following script causes the issue where the query window gets stuck executing as outlined above.
USE [TRIDocumentStorage09];
GO
IF EXISTS
(
SELECT *
FROM s...
Yes, I do get full results back. The script appears to be done (no longer returning any results in the background). However, I'm unable to continue to use the query window. I have to copy my script to clipboard, close the query window, open a new one, and paste my script back into it. Not the end of the world, but annoying. I would be happy to work with you on the ticket. I will pay attention to the next time it happens and save off the script for the ticket. / comments
Yes, I do get full results back. The script appears to be done (no longer returning any results in the background). However, I'm unable to continue to use the query window. I have to copy my scr...
I have updated, both SSMS and SQL Prompt. The issue still happens. New version info: SQL Server Management Studio 15.0.18384.0 SQL Server Management Objects (SMO) 16.100.46367.54 Microsoft Analysis Services Client Tools 15.0.19535.0 Microsoft Data Access Components (MDAC) 10.0.19041.1 Microsoft MSXML 3.0 6.0 Microsoft .NET Framework 4.0.30319.42000 Operating System 10.0.19042 SQL Prompt 10.6.10.19533
/ comments
I have updated, both SSMS and SQL Prompt. The issue still happens.New version info:SQL Server Management Studio 15.0.18384.0SQL Server Management Objects (SMO) 16.100.46367.54Microsoft A...
SQL prompt query window stuck executing
When I execute SQL inside a SQL Prompt query window in SSMS, the query executes and gives back my results and in the messages tab it gives me a completion time. However, the query window still say...