SQL Server DBA and Azure SQL Insights
Welcome to SQLDBANow.com! This blog, created by Bandaru Ajeyudu, is dedicated to learning and sharing knowledge about SQL DBA and Azure SQL. Join us as we explore insights, tips, and best practices in the world of SQL Database Administration and Azure SQL.
Long Running SQL Agent Jobs - How I Monitor Them Automatically
How to Remotely Log Off a Stuck RDP Session
Sometimes when working on a remote server, you may see "Signing out" stuck forever. In such cases, you can forcefully log off the session without restarting the server.
Using Command Prompt:-
qwinsta /server:ServerName
logoff <SessionID> /server:ServerName
Example logoff 2 /server:SP-SQL-BI
Using PowerShell:-
quser /server:ServerName
logoff <SessionID> /server:ServerName
Fast PowerShell Script to Copy Latest SQL Backups Over Network
.bak files from one server to another within the same domain and on a high-bandwidth connection, this PowerShell + robocopy script is optimized for speed and reliability.Automate Emailing of Latest Excel Reports from Shared Folders Using PowerShell
Unable to Drop a User from SSISDB?
I ran into an issue when trying to drop a user from SSISDB (the Integration Services Catalog database).
The database principal has granted or denied permissions to catalog objects in the database and cannot be dropped.
The transaction ended in the trigger. The batch has been aborted.
How to solve it?
Find where the user has permissions
USE SSISDB
go
SELECT *
FROM catalog.object_permissions
WHERE grantee_sid = SUSER_SID('YourUserName');
--change YourUserName to your actual username
Revoke permissions
REVOKE READ ON OBJECT::[folder_name] TO [YourUserName];
REVOKE MODIFY ON OBJECT::[project_name] TO [YourUserName];
Drop the user
DROP USER [YourUserName];