T-SQL: Add group to each user database
Below is an example script which adds a windows domain group to each database, with the db_reader role.
I.T. minded
Below is an example script which adds a windows domain group to each database, with the db_reader role.
You may use the T-SQL code below to find the last logon dates for the SQL accounts.
The T-SQL query below will list the users configured within the database, and the permissions which this users has.
The PowerShell script below logs off a disconnected session if the session has been idle for XX minutes, and it also excludes specific users. Additionally, the script writes a log file that includes the memory usage of the session
You can use the script below download a file from a certain location, to a temporary file, do a small check, and then copy it to a location. It also sends an email with some feedback.
Below example code which you can use to add users from a local CSV file (with their UPN) to a active directory group.
Below is a high-level approach on how you might achieve this using PowerShell and the Azure CLI:
Use the powershell command below to get the list of processes on a remote Windows computer, sorted by CPU usage.
Yes, Hogwarts Legacy runs great on your little buddy, the Steam Deck! But of course, it’s never perfect. Are you for looking for some performance improvements, you can try to add the options below. Open desktop mode (or use ssh/scp), open dolphin/file explorer and edit the following file: Or with…
To identify the queries that are responsible for high-CPU activity currently, run the following statement: If queries aren’t driving the CPU at this moment, you can run the following statement to look for historical CPU-bound queries:
If you still have a Windows system somewhere, and you want to transfer files to the deck, you can easily transfer those files using SSH default, the deck has a ssh server installed, but this isn’t started.You can easily enable that using a terminal on the deck, and execute: Once…
With the powershell script below, you can check TLS settings on Windows Server .
Well, SQL statements can use a log of log space, and you most probably want to find out which SQL statement is using all of your log space. The T-SQL code below will show you the SQL statements using the log space, including the size that it’s using.
First off you don’t ever shrink a database file unless you known it won’t need the space back again. (There’s some caveats to that statement but it mostly holds true) If that’s the space the file has consumed generally that’s the space the file needs. Shrinking just means the file…
Personally I didn’t like installing special plugins on the Steam Deck, just because..I don’t know :). Then I noticed that they is a plugin for ‘SteamGridDB’. What is SteamGridDB? Well, that’s a website which has a LOT of artwork for a lot of games for the steam client. If you…
In order to enter the BIOS of your Steam Deck, you can follow the procedure below. 1. Hold the Power button on your Steam Deck. 2. Turn off your Steam Deck by selecting Shut Down from the options that appear on the screen. 3. Press and hold the Power and Volume Up buttons until you hear a beep. 4. Select Setup…
After a while,the msdb database can be overloaded with backup history, and clearing that history can be a pain. You can use the t-sql code below to clear the msdb backup history, in incremental steps of 1 week.