
Get SQL database backup details with PowerShell
Quickly get SQL Server backup .bak file header information using PowerShell and SQL Server Management Objects (SMO). Determine the name of the SQL server that wrote the backup set.
Quickly get SQL Server backup .bak file header information using PowerShell and SQL Server Management Objects (SMO). Determine the name of the SQL server that wrote the backup set.
Here is a small T-SQL snippet that creates an additional (extra) SQL Server Login (User) for contained databases in SQL Server. It sets memberships too.
In this article I’ll show you how to force a failover in SQL Server 2017+, in an SQL Server Database Mirroring configuration. This can only be initiated from the principal SQL Server server, and the mirrored database must be synchronized (that is, when the database is in the SYNCHRONIZED state).
Drop all tables, SPs, triggers, constraints and dependencies in an SQL Server database in one SQL statement.