Send Email to recipients with Attachment using PowerShell
If you have a requirement to send email to recipients with attachment, can use the script.
2019-05-03 (first published: 2016-05-17)
3,147 reads
If you have a requirement to send email to recipients with attachment, can use the script.
2019-05-03 (first published: 2016-05-17)
3,147 reads
If you want to monitor few specific alerts for SQL Replication (Merge and Transnational), you can may consider adding these 14 alerts.
2019-05-03 (first published: 2015-06-16)
1,489 reads
DBA many a times need to shrink the log files if that grows very large. Though I am not recommending to do it daily or often but if space is an issue and you want to release space to OS, you may use the script.
2019-05-03 (first published: 2016-09-22)
934 reads
If you have any requirement where you want to find out all the SPIDs running on a database along with the program/application name of the SPID and the login details. You can run the procedure to get the details very easily.
2019-05-03 (first published: 2014-06-30)
4,114 reads
If you have a requirement to setup with a default global dbmail profile and account you can use my script.
2019-05-03 (first published: 2015-05-28)
1,083 reads
Wrote the script to take compressed backup with combining many other features.
2019-05-03 (first published: 2015-04-29)
1,059 reads
If you have Always On and need to stop running database backups to the stand by server, use the script.
2019-05-03 (first published: 2016-11-01)
284 reads
2019-05-03 (first published: 2015-03-30)
3,910 reads
This script is to verify which login accounts have SID values that don’t match the correct SID values defined on the machine or in the domain.
2019-05-03 (first published: 2014-12-24)
1,642 reads
We decided to build a quick worker thread alert so we know when we are near the limits.
2019-05-02
1,595 reads
If you’ve been watching AI roll through the data community and thinking, “this seems...
By Arun Sirpal
Not every production incident is a database in RECOVERY_PENDING or a corrupted event (like...
It is Friday, the queries are running, and nobody is watching the bill. That...
Comments posted to this topic are about the item SQL Art, Part 4: Happy...
Hi All I am trying to find 'bad' characters that users might type in....
WhatsApp: 0817839777 Kw. Industri Pulogadung, Jl. Raya Bekasi Km. 21, Ruko No.A2/18-19, RW.3, Wil,...
I set up a few users on my SQL Server 2022 instance.
CREATE LOGIN User1 WITH PASSWORD = 'Demo12#1' CREATE USER User1 FOR LOGIN User1 GO CREATE LOGIN User2 WITH PASSWORD = 'Demo12#2' CREATE USER User2 FOR LOGIN User2 GO CREATE LOGIN User3 WITH PASSWORD = 'Demo12#3' CREATE USER User3 FOR LOGIN User3 GOI then created a schema that one of them owned. Under this schema, I added a table with some data.
CREATE SCHEMA MySchema AUTHORIZATION User1
GO
CREATE TABLE Myschema.MyTable(myid INT)
GO
INSERT MySchema.MyTable
(
myid
)
VALUES
(1), (2), (3)
GO
SELECT * FROM MySchema.MyTable
GO
I granted rights and verified that User2 could access this table.
GRANT SELECT ON Myschema.MyTable TO User2 GO SETUSER 'USER2' GO SELECT * FROM MySchema.MyTable GOThis worked. Now, I move this schema to a new user.
ALTER AUTHORIZATION ON SCHEMA::Myschema TO User3; GOWhat happens with this code?
SETUSER 'USER2' GO SELECT * FROM MySchema.MyTable GOSee possible answers